Talk About Network

Google





Graphics > Typefaces, fonts > Re: Calculate s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 3651 of 3839
Post > Topic >>

Re: Calculate stringwidth of opentype font

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
 




 5 Posts in Topic:
Calculate stringwidth of opentype font
Steve Baldwin <steve.b  2008-03-20 08:44:51 
Re: Calculate stringwidth of opentype font
Armadillo <reply@[EMAI  2008-03-20 11:08:42 
Re: Calculate stringwidth of opentype font
Steve Baldwin <steve.b  2008-03-20 10:32:16 
Re: Calculate stringwidth of opentype font
Vid the Kid <vidthekid  2008-03-21 21:23:38 
Re: Calculate stringwidth of opentype font
xymarkd <devries@[EMAI  2008-03-27 08:25:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 12:19:36 PST 2009.