Vertical metrics in Java apps?

Primary tabs

4 posts / 0 new
Last post
David Perry's picture
Offline
Joined: 2 Mar 2003 - 1:27pm
Vertical metrics in Java apps?
0

A friend sent me a small word processor/dictionary program that he has written in Java. When I use one of my fonts with this program, the line spacing is noticeably too small. This comes right after I had redone the vertical metrics so that Mac and Windows display would match …

My friend says that he used only standard Java font handling routines, whatever those may be. I’m not a programmer so I have no clue what is going on. Only this one font is affected.

I can think of only one explanation: the font in question has many extra-tall characters. I therefore set the Line Gap values at zero and put more space in the Ascender/WinAscent values. Could the lack of any LineGap spacing be the problem? Any Java gurus here?

The font in question works fine in all regular Windows and Mac apps.

Thanks for any help - David

Thomas Phinney's picture
Offline
Joined: 3 Sep 2002 - 11:00am
0

I can’t guarantee that this is the source of the problem, but it seems likely….

Unfortunately, on the Windows side the font specs for TrueType/OpenType and the reality of what apps do are not the same.

John Hudson posted some good messages about this here: http://www.typophile.com/forums/messages/4101/48245.html#POST74420

I wouldn’t be surprised if the Java font handling is following the spec rather than matching the buggy behavior of many Windows apps.

T

David Perry's picture
Offline
Joined: 2 Mar 2003 - 1:27pm
0

Thanks, Thomas. It was another, more detailed post by John Hudson that I used to get the Mac and Windows linespacing to be consistent. The WinAscent, TypoAscender, and hhea Ascender values (all the same, BTW) provide plenty of clearance. Whichever system is used to calculate line spacing — the “typo” values as in Microsoft’s spec, the hhea values as in Apple’s spec, or the unofficial but widely used WinAscent — should not produce squished line spacing in this font. I set these values very carefully—so that’s why I’m puzzled.

David

Thomas Phinney's picture
Offline
Joined: 3 Sep 2002 - 11:00am
0

Urm. Maybe he’ll weigh in again. I know this stuff a bit, but right now my brain is made of mashed potatos. I need to take a nap.

T