Mon 09 Jun 2008 07:41:31 AM UTC, comment #4:
Matthais,
Good to hear from you!
You mention the "fmtx" structure, which, as I understand it, is an Apple Advanced Typography thing unsupported by FontForge, the program used to edit FreeFont.
http://fontforge.sourceforge.net/gposgsub.html#Unsupported
If this structure is populated at all, it is done in your system software, not in the font itself.
Determining vertical text placement based on the heights of characters of the string at hand is useful only in very special cases (it is likely to change for each string). I don't think it is right for the text box of your application.
Be aware that FreeFont has an overall line height set by (my) hand, because it contains some very high and low glyphs that would otherwise produce a very unpleasantly large line height. Most fonts don't have this problem, and the line height is just set to the font height. This setting changed between the 2006 and 2008 releases, because the 2006 version worked adequately in some applications and nowhere else. The 2008 one works in much more general environments.
This accounts for the change of behaviour of your application, but it should not have. If you were using the same metrics to measure the height as used in the other applications I tested (several on Linux, Windows, and Mac), it would only have resulted in a small change in the box height.
From what you say, I'm surprised that you ware working at such a low level to build applications. Unless there is a specific need, I usually rely on some third-party library's API for font metrics.
But it's your decision of course.
I haven't recently done such low-level applications programming with fonts, so I would have to look at the TrueType(/OpenType) docs to find out which is the appropriate structure for the overall font info. You might start here:
http://www.adobe.com/devnet/opentype/
But again, I would first look for a higher-level font API appropriate for your programming environment, that gives the correct metric values for any font.
If you would like, I could look at your code. Could you point me to the source file in question?
Cheers!
|