adobe-fonts / source-sans

Sans serif font family for user interface environments
https://adobe-fonts.github.io/source-sans
SIL Open Font License 1.1
3.49k stars 229 forks source link

Incorrect USE_MY_METRICS for some composite glyphs in 2.040 #162

Closed sevmeyer closed 5 years ago

sevmeyer commented 5 years ago

I noticed a possible regression in release 2.040 (TrueType flavor). In all composite glyphs, the first reference is marked with USE_MY_METRICS (bit 0x0200). For some glyphs this seems incorrect and causes overlaps, at least on Linux:

ssp2040-firefox (OpenSuse Leap 15, Firefox)

ssp2040-fontforge (FontForge)

Affected glyphs up to U+00FF: U+0022 quotedbl U+0025 percent U+0060 grave U+00A8 dieresis U+00AB guillemotleft U+00AF macron U+00B4 acute U+00B8 cedilla U+00BB guillemotright U+00BC onequarter U+00BD onehalf U+00BE threequarters ...

Release 2.020 does not have this issue.

frankrolf commented 5 years ago

Thank you for the detailed report. This seems to be the same as #161. Unfortunately, I can reproduce some of what you’re seeing when saving a PDF with MS Word 2016 (16.0.9126.2336) using built-in “save” method. Using Microsoft’s “print to PDF” creates a better document, but with some character substitutions. However, I don’t see any issues at all when using “save as Adobe PDF”, which is a part of (paid) Acrobat DC.

Still investigating – originally this investigation was started to get to the bottom of #154 .

miguelsousa commented 5 years ago

@sevmeyer thanks for bringing this issue to our attention. I did a ttx dump of the percent glyph and it confirmed your findings. The incorrect flag was set by the ttfcomponentizer tool. See https://github.com/adobe-type-tools/afdko/issues/709

v2.020

    <TTGlyph name="percent" xMin="35" yMin="-12" xMax="790" yMax="668">
      <component glyphName="zero.dnom" x="0" y="266" flags="0x4"/>
      <component glyphName="fraction" x="369" y="0" flags="0x4"/>
      <component glyphName="zero.dnom" x="457" y="0" flags="0x4"/>
    </TTGlyph>

v2.040

    <TTGlyph name="percent" xMin="35" yMin="-12" xMax="790" yMax="668">
      <component glyphName="zero.dnom" x="0" y="266" flags="0x204"/>
      <component glyphName="fraction" x="370" y="0" flags="0x4"/>
      <component glyphName="zero.dnom" x="457" y="0" flags="0x4"/>
    </TTGlyph>
miguelsousa commented 5 years ago

The fix to the ttfcomponentizer is done. Need to fix a second issue before new TTF files can be made.

miguelsousa commented 5 years ago

Fixed in this release https://github.com/adobe-fonts/source-sans-pro/releases/tag/2.045R-ro%2F1.095R-it