The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Correct ascender and decender in OS2 table

These changes was commited to the Birdfont repository Wed, 24 Sep 2014 17:56:47 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Wed, 24 Sep 2014 17:56:47 +0000]

Updated Files

libbirdfont/OpenFontFormat/Os2Table.vala
--- a/libbirdfont/OpenFontFormat/Os2Table.vala +++ b/libbirdfont/OpenFontFormat/Os2Table.vala @@ -107,9 +107,10 @@ fd.add_u16 (glyf_table.get_first_char ()); // usFirstCharIndex fd.add_u16 (glyf_table.get_last_char ()); // usLastCharIndex + + ascender = (int16) rint (font.top_limit * HeadTable.UNITS); + descender = (int16) rint (font.bottom_limit * HeadTable.UNITS); - ascender = glyf_table.ymax; - descender = glyf_table.ymin; fd.add_16 (ascender); // sTypoAscender fd.add_16 (descender); // sTypoDescender