Creates triangulated meshes from text font.
Use PathText
to create line path from text font, and use GlyphUtil
to create triangulated meshes from line path.
let pathText = PathText.init(
text: "ABCDE",
fontName: "AppleSDGothicNeo-Bold",
fontSize: 10,
bounds: .zero,
pivot: .zero,
textAlignment: .natural,
verticalAlignment: .center,
kern: 0,
lineSpacing: 0,
isClockwiseFont: true
)
let triangulatedMesh = GlyphUtil.MainFunctions.triangulate(pathText.calculatedPaths, isClockwiseFont: true)
Original algorithms are from https://github.com/Hi-Rez/Satin. Translated from obj-c code to Swift, and made some modifications. License text is written directly in the source code.
Original code is obtained from https://github.com/iShape-Swift/iGeometry. Some modifications are made for convenience. See LICENSE
Original code is obtained from https://github.com/iShape-Swift/iShapeTriangulation. Some modifications are made for convenience. See LICENSE