Scaling UPM

Quincunx's picture

I'm working on a typeface which was first a personal project, but I'm now adapting it for a client. I originally designed it on a UPM of 2000. However, the client needs a Type 1 font for their system. I'm having difficulties with the vertical metrics when I test the Type 1, especially in InDesign.

It's prefectly fine when I export it as OpenType, but with the Type 1 it's as if the whole baseline shifts up (or the baseline stays put but the letters shift up, however you look at it). This makes all ascenders and caps to extend outside of the text-frame (which doesn't happen with the OTF). The cursor and selection box is of the right size, but the type is shifted up, so to speak.

I'm aware that Type 1 originally doesn't allow any nodes to extend outside the 2000 and -2000 boundaries, but also read on typophile somewhere that the real boundaries are more in the range of 4000. As far as I know I've set the vertical metrics correctly, with the help of the how-to on typophile and the pdf that is floating around made by Karsten Lücke.

It's possible that a 2000 UPM doesn't work, and that I need to scale it. Is there a good way to do this without too much nodes rounding of very crudely? Scaling to 1000 with the 'scale all glyphs...' option checked does cause quite a bit of rounding off changes.

Or maybe there are other tips you guys can give me?

Tomi from Suomi's picture

This is possibly a dumb question, but why did you make your font in 2000 UPM in the first place?

Quincunx's picture

No particular reason, and with TT and OTF it doesn't really matter that much. I was not planning on exporting it as Type 1, but now I am forced to.

Tomi from Suomi's picture

I've always worked with the lowest common denomerator, just in case.

Like yours. Sorry about that.

Quincunx's picture

Strangely enough, when exporting the Type 1, the Font BBox gets scaled down automatically to some random numbers, even when 'Use WinAscent and WinDescent as font vertical size' is ticked on in the PostScript-specific Settings.

I tried exporting with the Type 1 Export Terminal this time, and manually changed the BBox numbers to the ones that are shown in Key Dimensions (on the bottom). Tested the font in InDesign, and the glyphs are now back onto the baseline and nothing extends outside of the bounding box (apart from characters like Â, but that is obvious).

I have no idea why it changes the BBox size to something completely wrong on itself...

Quincunx's picture

Well, apparently exporting Type 1 automatically assumes the typeface is on a UPM of 1000. As a consequence, everything in my typeface gets halved. Font metrics, but also kerning.

Is there anyone that knows how I can prevent FontLab from doing this? Or perhaps knows about another way that I can generate a Type 1 without everything getting halved?

Or if that is not possible, how I can scale down the UPM to 1000, without getting too much rounding errors?

On a sidenote: strangely enough the font does display correctly in InDesign. For example, it says kerning between L en Y is -90, but it displays it as -180. If I reopen the exported font in FontLab, it says -180 again (while the afm clearly says -90). I have no idea how exactly this works. It seems weird.

hrant's picture

AFAIK it's not FontLab that's scaling anything down (except maybe in the
kerning?), it's the renderer in a given SW. That would be why InDesign
does it right while other apps don't.

I'm not sure because I've always stuck with 1000 (for PS) to be safe... :-/
It's probably worth going to the trouble fixing everything by hand.


Quincunx's picture

Well, everything in the .afm file is scaled down to 50%. I don't know if FontLab does this, but something does. It scales all values to 50%, but the glyph shapes themselves are larger than this, so I could see how this is problematic. I.e. The cap A is 1450 high and 1512 wide. But the afm shows it as 741 or something like that.

The font will be used in CCI (newspaper software), which is rather deprecated and weird software, so I'm trying to get it right so CCI will display everything correctly. They told me that the font prints properly, but that the screen display is showing squashed glyphs (the glyphs are compressed so that it almost looks like a condensed font). I thought this was caused by the scaled down BBox, but after that I noticed everything is scaled down, not only the BBox but also the metrics, kerning and the glyhs themselves.

And yes, I will also be sticking with UPM of 1000 from now on. But as I said, I was only planning for it to be for my own use, so OT or TTF only, and for those a UPM of 2000 is fine. But then someone decided to use the typeface, to which I obviously wouldn't object but for which did not plan, and they need Type 1 for CCI. ;)

Quincunx's picture

Correction, I noticed everything is scaled down, not only the BBox but also the metrics, kerning but not the glyphs themselves. I typed that the glyphs were also scaled down, but this is not the case.

.00's picture

and with TT and OTF it doesn’t really matter that much

Perhaps it matters more than you think!

CurveDoctor's picture

Type 1 fonts must have a UPM of 1000 by definition. FontLab's auto scaling is obviously buggy, so make a copy of the font on 1000 UPM and check everything by hand.

CurveDoctor's picture

See page 25 and 26 in this magnificent curve stuff:
Unfortunately FontLab does not do div for you.

Quincunx's picture

Thanks CurveDoctor. I knew about the 1000 UPM requirement, but not that FontLab will automatically scale all vertical metrics to 50% when you export Type 1, but just leaves everything else at the original size. This will obviously cause problems, as the original size glyphs won't fit into the halved vertical metrics / BBox. It would be more workable if FontLab tells you a UPM of 2000 isn't supported when you export Type 1, and that it will auto scale everything when you proceed. Now it tells you nothing, and just scale down the vertical metrics but leave the UPM at 2000.

Now that I know all this, it isn't longer a problem and I just check everything by hand.

This thread is basically me completely not understanding at all. I should have done some more research before starting it. But perhaps it can be of use to someone else having the same lack of understanding in the future. :)

Quincunx's picture

> Perhaps it matters more than you think!

Wel, I don't think so. :)

As far as I know the UPM standard of TTF is 2048. As for OTF; I think the official recommendation is 1000 (as it uses postscript outlines), but not a requirement, as OTF fonts work perfectly fine at 2000. And at seemingly random sizes as well, if I'm not mistaken.

johnnydib's picture

Scaling to 1000 with the 'scale all glyphs...' option checked does cause quite a bit of rounding off changes.

What happens when you do that?
What were some of the problems you got when you did it?

Quincunx's picture

@johnnydib: To answer your question, scaling with 'scale all glyphs...' causes rounding off issues. In other words, it simply causes some anchor points to move a little bit because the grid on which they have to line up is more coarse. But I've noticed the changes are tiny, so in my case I accepted it and moved on. :)

johnnydib's picture

Okay good to know. At least it's not buggy or anything.

twardoch's picture

In the most recent Adobe FDK for OpenType, a commandline tool named IS is included. It performs "intelligent scaling". It uses Type 1 hinting information attempting to keep the hinted stems and other elements the same width after the downscaling.

We plan to integrate Adobe's intelligent scaling into the upcoming versions of our applications.


Syndicate content Syndicate content