Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Thank you very much, I appreciate this piece of information!

________________________________
From: Khaled Hosny <khaledhosny@eglug.org>
Sent: Saturday, August 27, 2016 12:02:22 PM
To: Nate Bellowe
Cc: libreoffice@lists.freedesktop.org
Subject: Re: Line Spacing Calculations

On Fri, Aug 26, 2016 at 06:14:09PM +0000, Nate Bellowe wrote:
- Word is using a different process than we are to calculate the
  "leading" of a font. We don't parse the font files ourselves,
  instead rely on libraries to get font sizing information, and
  perhaps in the "world of font files" I am missing something, and
  word is parsing the fonts directly and differently.

I have no insight on how Word might be calculating line spacing, but
this would be my first guess. Fonts has 3 different set of parameters
that can affect line height calculations and different applications can
use different parameters:
* sTypoAscender, sTypoDescender, and sTypoLineGap, from OS/2 table[1].
* usWinAscent and usWinDescent, also from OS/2 table.
* Ascender, Ascender and LineGap from hhea table[2].

Ideally applications should use the Typo set, falling back to the hhea
if OS/2 table is missing, but the reality is that many Windows
applications tend to abuse Win set for line spacing, and Mac
applications tend to prefer hhea one.

So for realistic comparison, you need to get the values of those three
sets of parameters and compare Word’s line spacing to them.

Regards,
Khaled

1. https://www.microsoft.com/typography/otspec/os2.htm
2. https://www.microsoft.com/typography/otspec/hhea.htm

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.