Open GoogleCodeExporter opened 9 years ago
peterbrant wrote on 11.01.2010 02:45:23 +0100:
You'll get no argument from me that the current formula is weird, but the
suggested fix can't be correct (or more specifically it's only correct for the
Ahem font).
The ascent and descent returned from FSFontMetrics are the values provided by
the font and not based on the individual glyphs passed in the string. It just
so happens that for Ahem these are the same.
I think your suggestion is a good one though: push the x-height calculation into
the TextRenderer implementation and base it off the actual size of 'x' (with
some fallback if it doesn't exist) (e.g. with getGlyphPixelBounds() for Java2D).
This should be pretty easy to implement for all the supported output devices.
Original comment by pdoubl...@gmail.com
on 16 Feb 2011 at 9:47
Original issue reported on code.google.com by
pdoubl...@gmail.com
on 16 Feb 2011 at 9:47