Sam Edwards cfsworks@gmail.com wrote:
This change only affects malformed fonts that have glyphs with splines that go above the maximum ascent as specified in the font's hhea/os2 table. For that reason, any tests for this change would have to include a malformed font, so I did not write tests. If we want in-tree tests, we'll need to figure out how to include a malformed font to test against.
Please add a test case, Wine test suite already includes custom fonts, you can either use an existing font, or add a new one.
On 04/19/2013 02:46 AM, Dmitry Timoshkov wrote:
Sam Edwards cfsworks@gmail.com wrote:
This change only affects malformed fonts that have glyphs with splines that go above the maximum ascent as specified in the font's hhea/os2 table. For that reason, any tests for this change would have to include a malformed font, so I did not write tests. If we want in-tree tests, we'll need to figure out how to include a malformed font to test against.
Please add a test case, Wine test suite already includes custom fonts, you can either use an existing font, or add a new one.
As I understand it, some fonts deliberately have glyphs larger than their metrics bounding boxes. Clipping them is almost certainly not a good idea.
On 04/19/2013 10:32 AM, Max TenEyck Woodbury wrote:
As I understand it, some fonts deliberately have glyphs larger than their metrics bounding boxes. Clipping them is almost certainly not a good idea.
Forgive my disbelief, but can you provide an example? It seems like Windows has the same clipping behavior (see my test http://source.winehq.org/patches/data/95792).
From my understanding, the intent of the ascent metric is that it indicates the maximum ascender on any glyph in the font (and likewise for descent), so the only real reason for the ascent/descent metrics to be wrong is if the font designer made a mistake. (And some tools, like FontForge, will automatically set the ascent/descent metrics correctly for you on export.)
I can't think of any reason why a font author would want to create a font with an invalid ascent/descent metric.
P.S. This is a resend because I accidentally sent this to wine-patches the first time... Sorry! That was dumb of me. :)