by Armadillo <reply@[EMAIL PROTECTED]
>
Mar 20, 2008 at 11:08 AM
> If this is OK so far, then I'm on the right track. However from what I
> can see, the glyph widths in the hmtx->advance structure are in "font
> design units". How do I convert from these to (say) points (e.g. as
> would be returned from the postscript stringwidth operator?
This is how it looks from font design point of view but I do not know if
it applies to stringwidth calculation at all.
Fonts use fractions of 'em' as basic design unit. In metal type em was a
squre piece of metal which means that in 10 point text em width was 10
points. The height (point size) is roughly the vertical space between
ascenders and descenders. But since typefaces can be very different you
can't tell the character size if you know the point size.
Type1 PS fonts usually use 1000 units/em and TrueType fonts 2048 units/em.
So if you have a 12 point Type1 character with 500 width it should be 6
points wide. - Me thinks.
If kerning is used the widths will overlap according to the kerning table
and the total with will be something else.
Jukka