[glyf] enable OVERLAP_COMPOUND composite flags

it might be deprecated or ignored in some rasterizers, but I don't
see why we should discard it, if it's present in the input font.

This also allows to set the flag, which may turn out to be useful
in some circumstances.

cf. https://github.com/googlei18n/fontmake/issues/253#issuecomment-335600887
This commit is contained in:
Cosimo Lupo 2017-10-12 18:42:01 +01:00
parent 739075e245
commit 704e26b41d

View File

@ -1057,7 +1057,7 @@ class GlyphComponent(object):
haveInstructions = self.flags & WE_HAVE_INSTRUCTIONS
self.flags = self.flags & (ROUND_XY_TO_GRID | USE_MY_METRICS |
SCALED_COMPONENT_OFFSET | UNSCALED_COMPONENT_OFFSET |
NON_OVERLAPPING)
NON_OVERLAPPING | OVERLAP_COMPOUND)
return more, haveInstructions, data
def compile(self, more, haveInstructions, glyfTable):
@ -1066,7 +1066,7 @@ class GlyphComponent(object):
# reset all flags we will calculate ourselves
flags = self.flags & (ROUND_XY_TO_GRID | USE_MY_METRICS |
SCALED_COMPONENT_OFFSET | UNSCALED_COMPONENT_OFFSET |
NON_OVERLAPPING)
NON_OVERLAPPING | OVERLAP_COMPOUND)
if more:
flags = flags | MORE_COMPONENTS
if haveInstructions: