https://bugs.freedesktop.org/show_bug.cgi?id=68735

--- Comment #11 from Khaled Hosny <[email protected]> ---
There are three sets of vertical metrics in OpenType/TrueType fonts:

1) ‘hhea’ table’s Ascender, Descender and LineGap: Those are the ones preferred
by Apple, recent versions of FreeType and LibreOffice 4.1 on Linux. In those
fonts ‘hhea’ LineGap is 1000 i.e as big as Ascender and Descender combined,
that is the font designers choice, not us.

2) ‘OS/2’ table’s sTypoAscender, sTypoDescender and sTypoLineGap: Those are the
recommended values for typographic line spacing in OpenType spec, regardless of
the setting of the “Really use typo metrics” bit (this bit was introduced
because some applications kept ignoring the typo metrics as a strong
indication, but the spec does not require it being set for the typo metrics to
be used). FreeType and LibreOffice 4.1 on Linux, fallback to this if ‘hhea’
table is missing from the font. Again, those fonts have a 1000 sTypoLineGap, so
it is still the designers choice not us.

3) ‘OS/2’ table’s usWinAscent and usWinDescent: Those should only be used for
bitmap clipping of the rendered text and its use in calculating line spacing is
strongly discouraged by the OpenType spec, yet many Windows applications still
use it regardless of this. FreeType and LibreOffice 4.1 on Linux, fallback to
this if the font has ‘OS/2’ sTypoAscender and sTypoDescender set to zero.


The offset thing is just a FontForge feature to auto-calculate the values as
offset from glyph heights when generating the font, fonts only contain the
absolute values.

Line spacing is already a mess due to many historical and backward
compatibility reasons, and I believe our current approach is the most sensible
and there is no compelling reason to mess it even more by throwing more options
to the mess. You should really just a) complain to font vendors, b) use other
fonts or c) modify the fonts yourself (within legal constraints of course).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to