fontbuild: remove component condition in composedGlyphIsNonTrivial
This commit is contained in:
parent
b2b8c14660
commit
a96f0d50f2
1 changed files with 11 additions and 12 deletions
|
|
@ -61,8 +61,6 @@ def fatal(msg):
|
||||||
def composedGlyphIsNonTrivial(g):
|
def composedGlyphIsNonTrivial(g):
|
||||||
# A non-trivial glyph is one that uses reflecting component transformations.
|
# A non-trivial glyph is one that uses reflecting component transformations.
|
||||||
if g.components and len(g.components) > 0:
|
if g.components and len(g.components) > 0:
|
||||||
if len(g.components) > 1:
|
|
||||||
return True
|
|
||||||
for c in g.components:
|
for c in g.components:
|
||||||
# has non-trivial transformation? (i.e. scaled)
|
# has non-trivial transformation? (i.e. scaled)
|
||||||
# Example of optimally trivial transformation:
|
# Example of optimally trivial transformation:
|
||||||
|
|
@ -70,7 +68,8 @@ def composedGlyphIsNonTrivial(g):
|
||||||
# Example of scaled transformation matrix:
|
# Example of scaled transformation matrix:
|
||||||
# (-1.0, 0, 0.3311, 1, 1464.0, 0) flipped x axis, sheered and offset
|
# (-1.0, 0, 0.3311, 1, 1464.0, 0) flipped x axis, sheered and offset
|
||||||
#
|
#
|
||||||
xScale, xyScale, yxScale, yScale, xOffset, yOffset = c.transformation
|
xScale = c.transformation[0]
|
||||||
|
yScale = c.transformation[3]
|
||||||
# If glyph is reflected along x or y axes, it won't slant well.
|
# If glyph is reflected along x or y axes, it won't slant well.
|
||||||
if xScale < 0 or yScale < 0:
|
if xScale < 0 or yScale < 0:
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Reference in a new issue