adobe-type-tools / afdko

Adobe Font Development Kit for OpenType
https://adobe-type-tools.github.io/afdko/
Other
1.06k stars 167 forks source link

[makeotf] glyph width collapsed to 0 if UFO contains advance height #1673

Closed frankrolf closed 1 year ago

frankrolf commented 1 year ago

Attached files: Dummy-Style_01.ufo (source data) Dummy-Style_01.otf (resulting OTF) test_hmtx.py (verification script)

The attached UFO Dummy-Style_01.ufo contains a glyph A with the following header specifying width (normal) and height (uncommon):

<glyph name="A" format="2">
    <unicode hex="0041"/>
    <advance height="600" width="400"/>
    <outline>

problem:

When making an OTF from this UFO, the A in the resulting OTF file will have an advance width of 0.

makeotf -r -f Dummy-Style_01.ufo

Reading that UFO with the test_hmtx.py script (attached):

Dummy-Style_01.otf
{'.notdef': (100, 0), 'space': (200, 0), 'A': (0, 47)}

expected:

The width of A should be 400, as specified in the UFO data

workaround:

remark:

I stumbled upon this when I worked with two interpolating UFO sources, one source with the height specified, the other without. All interpolated instances have the height information within, and therefore all instances have an affected 0-width glyph. The UFO sources were the result of a vfb3ufo conversion.

1673.zip

punchcutter commented 1 year ago

Same as https://github.com/adobe-type-tools/afdko/issues/1669

frankrolf commented 1 year ago

I can see that #1669 is a duplicate of this. (jinx!)