Page 1 of 1

Transformation parameters

Posted: Wed Aug 08, 2018 7:43 am
by Leon Gauthier
At the risk of revealing my total ignorance of the subject, I will ask my question anyway. I am using the Medium to Bold.xml script on a font which only has 1000 units per em and the results are way out of the range of what I'd expected. In looking at the script file, I noticed that scale parameters were obviously in percentage terms (92.40) while other parameters are discrete units such as:
My question is: shouldn't these discrete values be adjusted by a factor of 1000/2048 or 0.49?
Obviously, the corrections I made to the original script resulted in a glyph with the same height as the original, which was not the case with the original script, and a much better ratio of stem height to stem width of 4.26. The adjusted parameters also resulted in a revised scale percentage. However, more adjustments are still needed on the serifs.

I just had to ask because I did not see this mentioned anywhere in the manual.
Transformation.png (8.13 KiB) Viewed 1275 times

Re: Transformation parameters

Posted: Wed Aug 08, 2018 8:19 am
by Bhikkhu Pesala
The scripts do not use the funits/em setting. The scale is by a percentage, but the bold transform is in funits.

Almost all of the scripts will need manual adjustment to suit each font. They were designed using my Verajja font (derived from Bitstream Vera), and won't be right for other fonts.

The scaling is intended to adjust to counteract the effect of adding vertical funits to the horizontal strokes, and the move is intended to maintain the baseline position.

Serifs, or any thin strokes, will be much too thick after a bold transformation because the transform is absolute, not proportional.

It would be better if it used percentages

If you regularly work with Mac fonts @ 1000 funits/em I suggest fixing them first to 2048 funits/em.

Resizing Fonts and Changing Units per em values

Or, just save all of the transform scripts as new scripts for Mac, or overwrite the existing scripts if you seldom work with 2048 funits/em fonts (which are by far the most common on Windows).

Re: Transformation parameters

Posted: Thu Aug 09, 2018 12:01 am
by Leon Gauthier
but the bold transform is in funits.
That was my point ... one must be aware of the difference the funits per em makes in these scripts. Now, I will have to play with changing the funits per em which I tried to do without success. Being an engineer, I prefer using reasoned values (numbers) as opposed to just guessing (or throwing darts) when attempting to accomplish a certain transformation from one Panose number to another.

Thanks for the links.

Re: Transformation parameters

Posted: Thu Aug 09, 2018 4:18 am
by Leon Gauthier
Bhikkhu, your method of changing the number of funits in an em made that a simple task. Thanks