unified-font-object / ufo-spec

The official Unified Font Object specification source files.
http://unifiedfontobject.org
175 stars 30 forks source link

Add public.truetype.overlap and public.truetype.compositeFlags #170

Closed moyogo closed 3 years ago

moyogo commented 3 years ago

Fixes https://github.com/unified-font-object/ufo-spec/issues/162.

This adds a glyph lib key public.truetype.overlap as a boolean and the component object-level lib keys public.truetype.useMyMetrics and public.truetype.roundOffsetToGrid as boolean as well.

The overlap can be used to set the TrueType Simple Glyph flags bit 6 (OVERLAP_SIMPLE) or the Component Glyph flags bit 10 (OVERLAP_COMPOUND).

The roundOffsetToGrid can be used to set the Component Glyph flags bit 2 (ROUND_XY_TO_GRID).

The useMyMetrics can be used to set the Component Glyph flags bit 9 (USE_MY_METRICS). In theory tools may use this to update the xOffset and yOffset of a component and the width, as well as height and verticalOrigin, of the composite glyph that contains it.

benkiel commented 3 years ago

This LGTM, but would like a second opinion before merging.

jenskutilek commented 3 years ago

Looks good to me, I have updated https://github.com/googlefonts/ufo2ft/pull/335 accordingly.