Resizing fonts and Changing Units per Em Values

Before asking a question on FontCreator look here for possible solutions and tutorials. Please do not post support requests here.
Locked
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Resizing fonts and Changing Units per Em Values

Post by Bhikkhu Pesala »

Some of my fonts use bizzare units per em values. I wanted to change this to the standard, the trouble is that this changes the spacing characteristics of the font. Books that were formatted with the older font, no longer format correctly.

Problem
My font used units of 1050 f-units per em.
After I changed the value from 1050 to 1024 the characters got slightly bigger on the screen and in my documents, which I didn't want.

Objective
To change the settings to 1024 f-units per em, without resizing the characters.

Solution
To check the effects of the changes, I used the Capital I as a reference point. These were the original metrics of the capital I.

Advance width = 323
Left bearing = 16
Caps height = 626

• I copied the entire font with Control A, Control C.
• I changed the units per em value back to 1024
• I pasted the characters back into the font

Resulting effect on my reference character

Advance width = 315
Left bearing = 15
Caps height = 610

Much to my surprise, hinting information was preserved.
So the font is still the same size on the screen and in documents, but the units per em value has been changed. I checked by opening a long book and comparing the last page to a PDF file. They seemed to be identical.

This is a very quick and satisfactory solution to changing unit per em values, or for making global changes to the size of characters.

Note: One important point that I overlooked is that while doing this composites will be converted to simple glyphs. To avoid this, you would need to copy only the simple glyphs and paste them back into the same positions.

From the Edit menu, Select Composites, then from the Edit menu, Invert selection. Now all simple glyphs (and empty glyphs) will be selected. Copy, change the funits/em, then paste without losing the selection.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
pia frauss
Posts: 9
Joined: Tue Aug 12, 2003 11:25 pm
Location: Bavaria
Contact:

Post by pia frauss »

Some of my fonts use bizzare units per em values. I wanted to change this to the standard
This is not a reply but a question, and please excuse me if it's a very daft one. Is this 1000 or 2048 standard absolutely necessary, and why? Sorry to bother you, but I'm just working on a font that would look best at 1600 units per em.

PF
Truth is the Daughter of Time
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Post by Bhikkhu Pesala »

As I understand it, it is a only a matter of efficiency. Binary computers work fastest with binary numbers. Whenever the font is scaled for the display (when the user zooms in or zooms out in their application), a bitmap has to be calculated to dsiplay each character from the vector data in the TTF. I wonder if anyone would even notice the difference. If the process took only 5 milli-seconds with an efficient font, would we notice if it took 20 milli-seconds with an inefficient one?

Maybe someone could offer some more objective advice.

The higher the value, the more precisely one can define fine detail that might show up on posters. The 1,000 units per em value is a legacy from the Mac while 2048 is the usual value used by Monotype fonts for Windows.

Using my method you can change the em-value of your font to 2048 without changing the proportions, but you will need to change some other values in the settings menu too. I'm not fully conversant with what needs to be changed or by how much.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
vanisaac
Posts: 337
Joined: Sun Mar 30, 2003 1:33 pm
Location: Washington State, USA

Post by vanisaac »

The difference is like asking you to divide 3 million by a thousand, then dividing 3 million by 814. I know which one I'd like to do. When a computer sees a number like "1024" or "2048", it gets all frothy like I do when I see "thousand" - it's too easy; just shift your decimal point. That's why 2048 and 1024 are really good per em values for your font.

And every milisecond counts in a computer, 'cause they add up to real seconds and minutes.
pia frauss
Posts: 9
Joined: Tue Aug 12, 2003 11:25 pm
Location: Bavaria
Contact:

Post by pia frauss »

Thank you so much! This is helpful indeed, and things do look a little less desolate now. Great idea, this copying and repasting glyphs! I had the experience in my early FC-days
that glyphs from differently sized fonts didn’t match after copying; but I never dreamt of how I could turn that into a big advantage!

The font in question is one of those that nobody in their right senses would ever wish to make: bs that scrape the clouds, ps that dig for coal, and just a flat shoe sole of a middle zone between, plus slender capitals that match the bs in height. At 1000 upem, the capitals grow too huge, and at 2048 upem you need an eyeglass to realize the middle zone. Now I see the solution of the problem as follows: I’ll have to resize (including readjusting the metrics) the font to 1600 upem, and when that is achieved satisfyingly, I’ll make a copy, resizing it to 2048 upem, and pasting the glyps of the 1600 upem-font into it. Then there are the ascenders and descenders to readjust . Have I forgotten anything? (BTW, one of my problems is that I don’t understand why there are two ascending and descending values in the Windows section, and how they are related. I never got the meaning of the explanation in the FC help file.)

@ vanisaac: if I understand you right, that 1000 units per em standard I’ve seen in most fonts I’ve opened isn’t exactly what my PC desires? To think that I chose it just because I thought I couldn’t blunder with what is done generally!


Thanks, again!

PF
Truth is the Daughter of Time
vanisaac
Posts: 337
Joined: Sun Mar 30, 2003 1:33 pm
Location: Washington State, USA

Post by vanisaac »

Well, there was something with the old Mac standard that really liked 1000 ppem, but on a PC, your 2^10 (1024) and 2^11 (2048) are going to work more efficiently. I don't know how or why Mac ever decided on the 1000 ppem standard, but it doesn't make a lot of sense from a hardware perspective. That said, it really doesn't matter a pair of fetid dingo's kidneys if you make your ppem 371 or any other number you make up - as long as no glyph's point coordinates exceed ±32767. I think the ppem might also have the 32768 or 65536 limit as well.
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Post by Erwin Denissen »

Valid range is from 16 to 16384. This value should be a power of 2 for fonts that have TrueType outlines.

This value is used to convert values in the pixel coordinate system by multiplying them by a scale. This scale is:

pointSize * resolution / ( 72 points per inch * units_per_em )

Guidelines from Microsoft:
http://www.microsoft.com/typography/dev ... %20&fsize=
unitsPerEm should be a power of 2, (2048 ideally).

2048 units were chosen for a few reasons.


It is a power of 2 value. (2^11)
2048 is a high enough value for good precision in rendering.
2048 is a low enough value to be processed efficiently by microcomputers.
In the Asian fonts for Windows, MS Mincho and MS Gothic it was necessary (at the time of their release) to choose a lower value (256 units) because of the file size of these font files.

The actual units per em value is a balance between the amount of processing power, the complexity and size of the font file, and the amount of precision that can be obtained with this value. A low units per em value would result in less quality in the output but be faster to process. A high units per em value would produce a higher quality output but be slower in processing.

Today computers are more powerful than ever and the use of large fonts with thousands of glyphs is becoming more common especially with Unicode and OpenType fonts. With today's computers we suggest the 2048 units per em value as still the best value for all fonts of any size including large Latin or non-Latin script fonts.
Erwin Denissen
High-Logic
Proven Font Technology
vanisaac
Posts: 337
Joined: Sun Mar 30, 2003 1:33 pm
Location: Washington State, USA

Post by vanisaac »

Whoops! I went one power of 2 too far there. That's what I get when I try to answer a question without FCP in front of me. :oops: Listen to Erwin, he actually knows what he's talking about - I pretty much shoot from the hip.
Jowaco
Posts: 331
Joined: Tue Oct 15, 2002 11:05 am
Location: York, UK

Post by Jowaco »

I've worked through Bhikkhu Pesala's extremely clear instructions to adjust the upem value of a font, in Format -> Settings -> General tab, and the sequence does exactly as he says. I have one or two observations:
  • any previous kerning is rendered unusable and kerning would need re-working from scratch
  • values for Win Ascent and Win Descent, in Format -> Settings -> Windows tab, would need to be adjusted in the same proportion as the change in upem value, in order to get line spacing correct
If alteration of the upem is to be used for re-scaling then an unusual value, in order to obtain the required size would need to be chosen and then the procedure, as set out, would need to be used to re-set the upem value to a standard one.

Joe.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Resizing fonts and Changing Units per Em Values

Post by Bhikkhu Pesala »

To scale a font up by 10%
  • Edit, Select Composites
  • Edit, Invert Selection
  • Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Header), and set funits/em to 1843 (assuming it is now 2048)
  • Edit, Copy
  • Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Header), and set funits/em back to 2048.
  • Edit, Paste
Composites may need to be recomposed and kerning may need to be adjusted. Hinting should still work OK if the change is not much more than 10%. To recompose composites:
  • Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Content and Layout), Version 5
  • Advanced Metrics, Calculate
  • Edit, Select Composites
  • Edit, Make Empty
  • Edit, Complete Composites
To scale a font down from 14 pt to 13 pt
  • Edit, Select Composites
  • Edit, Invert Selection
  • Format, Settings, Header, and set funits/em to 2206 (2048*14/13) (assuming it is now 2048)
  • Edit, Copy
  • Now that setting is found in Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Header), and set funits/em back to 2048.
  • Edit, Paste
Last edited by Bhikkhu Pesala on Sun Dec 15, 2019 6:48 pm, edited 1 time in total.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Resizing fonts and Changing Units per Em Values FC9

Post by Bhikkhu Pesala »

Updated for FontCreator 9.1

To scale a font up by 10%
  • Edit, Select Composites
  • Edit, Invert Selection
  • Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Header), and set funits/em to 1843 (assuming it is now 2048)
  • Edit, Copy
  • Font, Properties (shortcut Alt+Enter), General, Layout, (formerly in Format, Settings, Header), and set funits/em back to 2048
  • Edit, Paste
Composites may need to be recomposed and kerning may need to be adjusted. Use Autohinting on export to replace the original hinting. To recompose composites:
  • Font, Properties, General, Content and Layout, Version 3 or higher,
  • Metrics, Calculate
  • General, Calculate. Manually change values for Strikeout and Underline
  • Edit, Select Composites
  • Edit, Make Empty
  • Edit, Complete Composites
To scale a font down from 14 pt to 13 pt
  • Edit, Select Composites
  • Edit, Invert Selection
  • Font, Properties, General, and set funits/em to 2206 (2048*14/13) (assuming it is now 2048)
  • Edit, Copy
  • Font, Properties, General, and set funits/em back to 2048
  • Edit, Paste, etc.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Locked