Page 1 of 1

Autometrics fixed width - Pixel conversion?

Posted: Fri Jul 23, 2021 11:25 pm
by TheOneMagos
How does the font program calculate the width?

For example if I advanced the width to 3000 and my font size (height) is 32 what would be the actual width in pixels?
What I'm really after is setting the width to 32pixels, the same as the height. How may I accomplish this? The way the program asks to define the width is very cryptic but I'm not font expert...

Also is there a way to LOCK part of a glyph I am working on? So it won't move or be selectable.



Edit:
According to my research 32 pixels is about 0,444 inches , 1,13 centimeters , 11,29 millimeters.
I still have no clue how to definitively set the width. It seems like a very basic question to ask...

Re: Autometrics fixed width - Pixel conversion?

Posted: Mon Aug 09, 2021 10:36 pm
by Erwin Denissen
This depends on the resolution of the output device.

Values in the em square are converted to values in the pixel coordinate system by multiplying them by a scale. This scale is:

(pointsize * resolution) / (72 points per inch * upem)

Where pointsize is the size at which the glyph is to be displayed, and resolution is the resolution of the output device. The 72 in the denominator reflects the number of points per inch. And upem is units per em as defined in the font.

For example, assume that the advance width of a glyph is 3000 units on a 96 dpi screen at 18 point. There are 2048 units per em. The following calculation reveals that it equals 35.16 pixels.

3000 * (18 * 96) / (72 * 2048) = 35.16

Hope this helps.