<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Thank you very much, I appreciate this piece of information! </p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Khaled Hosny <khaledhosny@eglug.org><br>
<b>Sent:</b> Saturday, August 27, 2016 12:02:22 PM<br>
<b>To:</b> Nate Bellowe<br>
<b>Cc:</b> libreoffice@lists.freedesktop.org<br>
<b>Subject:</b> Re: Line Spacing Calculations</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Fri, Aug 26, 2016 at 06:14:09PM +0000, Nate Bellowe wrote:<br>
> - Word is using a different process than we are to calculate the<br>
>   "leading" of a font. We don't parse the font files ourselves,<br>
>   instead rely on libraries to get font sizing information, and<br>
>   perhaps in the "world of font files" I am missing something, and<br>
>   word is parsing the fonts directly and differently.<br>
<br>
I have no insight on how Word might be calculating line spacing, but<br>
this would be my first guess. Fonts has 3 different set of parameters<br>
that can affect line height calculations and different applications can<br>
use different parameters:<br>
* sTypoAscender, sTypoDescender, and sTypoLineGap, from OS/2 table[1].<br>
* usWinAscent and usWinDescent, also from OS/2 table.<br>
* Ascender, Ascender and LineGap from hhea table[2].<br>
<br>
Ideally applications should use the Typo set, falling back to the hhea<br>
if OS/2 table is missing, but the reality is that many Windows<br>
applications tend to abuse Win set for line spacing, and Mac<br>
applications tend to prefer hhea one.<br>
<br>
So for realistic comparison, you need to get the values of those three<br>
sets of parameters and compare Word’s line spacing to them.<br>
<br>
Regards,<br>
Khaled<br>
<br>
1. <a href="https://www.microsoft.com/typography/otspec/os2.htm">https://www.microsoft.com/typography/otspec/os2.htm</a><br>
2. <a href="https://www.microsoft.com/typography/otspec/hhea.htm">https://www.microsoft.com/typography/otspec/hhea.htm</a><br>
</div>
</span></font>
</body>
</html>