Different line gap between styles of the same font

thomaspaillot's picture

Hi,

I have a problem with the line gap of my font when using it on windows 7 with Wordpad (no problem on open office and on my mac).

I made a font family with 4 styles (regular, italic, bold and bold italic) and when I use it with Wordpad, I ended up with unconsistent linegap. Italic, bold & bold italic have the same line gap but regular has a larger one.

I use Fontlab to made the font and my settings in "Truetype Specific metrics" are the same for all 4 styles (see below).

OS/2 TypoAscender = 1600
OS/2 TypoDescender = -500
OS/2 TypoLineGap = 400
OS/2 WinAscent = 1900
OS/2 WinDescent = -600
hhea Ascender = 1900
hhea Descender = -600
hhea LineGap = 0

A screenshot of the regular and bold version at the same size :

I tried various settings in "Truetype Specific metrics" but none of them solve the issue. I don't know why the line gap calculated by wordpad is different for regular and bold despite that they have the same settings… Maybe you know…

Sorry for my english… I hope someone could help me !

George Thomas's picture

Just some thoughts for you to consider:
1. Are you absolutely certain that the largest numbers in your Regular are 1900 and -600? Did you do a Recalculation to check that weight?
2. Does your Wordpad file have a Carriage Return at the end of the last line? A long shot but it may affect it.
3. Have you tried it with both LineGap settings at zero? I know this is contrary to all recommendations but it may force Wordpad to work with it. If you changed this number you would also have to set your Typo numbers to match Win & hhea. It will affect your output in all apps.

Assuming this is a font you are making for sale, if it were my font I wouldn't worry about using it in Wordpad. How many people use Wordpad in an office or professional setting?

jasonc's picture

OK, now this one's a longshot, but did you cache the VDMX table? If your autohinting is off, that could cause weird settings in the VDMX. This would only happen at some sizes, though, so if you see the issue at a large range of sizes, that's not the cause.

Nick Shinn's picture

It may be a problem with the bounding box.
In FontLab:
> Metrics and Dimensions > Key dimensions

Font BBox: (-xxx, -xxx) - (xxxx, xxx)

Make sure that the y-axis/vertical values (which I have indicated in bold) are the same for every font.

Go through all the glyphs and check the position of the highest (usually the ring accent over cap A) and lowest details—these are used to determine the bounding box.

thomaspaillot's picture

Thank you for your replies !

@George Thomas:
1. I check my vertical dimension and effectively 1900 is not my largest number, it's 1929.
2. Not a problem with a carriage return.
3. I havn't tried to set the 2 linegap to 0, will try it to see if it change something.

I tried my font on wordPad because I didn't have word on PC (I work on a mac) and I assume that if there is an issue in wordPad, this issue may appear on other software as well.

@jasonc :
I have the issue at all sizes…

@Nick Shinn:
My Font BBox are different, see the values below:
Regular: (-99, -710) - (3132, 1920)
Italic: (-139, -711) - (3070, 1920)
Bold: (-130, -710) - (3141, 1928)
Bold Italic: (-198, -711) - (3235, 1929)

Do I need to change my font design to fit in the same bounding box ?

I will do more test today, and I'll let you know if I make any progress !

Again, thank you !

dberlow's picture

I think styles of the same family and size master should share the same em proportions. This does not mean, e.g. the heights or depths of all the glyphs need to be the exactly the same, but they should be fairly close.

thomaspaillot's picture

I tried various "Truetype specific settings" but none of them fix the issue. I change the tallest glyphs in the bold version so that regular and bold fit in the same bounding box (xxx, -710) - (xxx, 1920) but it didn't change anything. I tried to set the 2 linegap to 0… same result.

If someone has another idea I'll take it!

thomaspaillot's picture

I finally fix the issue… it was components in some fractions (1/4, 3/4…) that wasn't decompose !

Thanks for your help !

Nick Shinn's picture

How did that create the problem?

thomaspaillot's picture

I use the component "1" and "4" and scale them down to make the glyph "1/4", so my guess is that the original hinting of the glyph "1" and "4" cause the issue… Does it make sense to you ?

Syndicate content Syndicate content