The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 24 Sep 2014 17:56:47 +0000 (19:56 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 24 Sep 2014 17:56:47 +0000 (19:56 +0200)
commit b18792908bd658c228fb2b08fab3297e07eed896
tree a7fd21edcf09ad3686bcefbfb0d0dbe984fabf8b
parent 427be251c4b92960b415f797be23de4d1da78121
Correct ascender and decender in OS2 table

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