Skip to content

Commit

Permalink
Merge pull request #3 from yukiny0811/fix-fontturn-auto-detection
Browse files Browse the repository at this point in the history
fix: fontturn auto detection
  • Loading branch information
yukiny0811 authored Feb 4, 2024
2 parents 2ec7295 + d1ab869 commit 4e91bc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public extension GlyphUtil {

public static func triangulate(_ calculatedPaths: [LetterPath]) -> [TriangulatedLetterPath] {
var triangulatedPaths = triangulate(calculatedPaths, isClockwiseFont: true)
if triangulatedPaths.count == 0 {
if triangulatedPaths.reduce(0, { r, elem in r + elem.glyphLines.count }) == 0 {
triangulatedPaths = triangulate(calculatedPaths, isClockwiseFont: false)
}
return triangulatedPaths
Expand Down

0 comments on commit 4e91bc1

Please sign in to comment.