Re: [GM-help] QueryFontMetrics and ascender value.
Swiss army knife of image processing
Brought to you by:
bfriesen
From: Bob F. <bfr...@si...> - 2012-10-12 21:46:17
|
On Fri, 12 Oct 2012, Derek Wueppelmann wrote: > Is there a preferred method to obtain the actual ascender height of the > font? I've read about complicated methods by placing the text on a blank > image and then scanning the image to find out where the place text's top > is located, but that's a bit expensive to do, if that's the only > reliable way I suppose I'll go that way, but I hope there is a better > method. Is this an issue with the fonts that I'm using? >From my (limited) experience, the only reliable way to place text is via the baseline. The claimed height of the text is really part of the font style. With some fonts the ascender and decender won't ever fill the claimed height. Trying to fit text so the top of rendered characters hit a particular point would be difficult. These are all decisions made by the glyph designer. GraphicsMagick returns the values computed by the FreeType library. FreeType library documentation is likely the best place to learn more details. Bob -- Bob Friesenhahn bfr...@si..., http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ |