TrueType hinting, pixel decimals

Frode Bo Helland's picture

Does Windows throw away all hinting information if the font size is a decimal of a full pixel? The reason I'm asking is I having some issues with a jumpy hyphen. I’m hinting in Fontlab. I assume it wont listen to delta hints, as those are size specific. Links on the other hand …

John Hudson's picture

You mean if the font size is a fraction of a full pixel? How are you getting that?

dberlow's picture

This question was definitively answered in: "Body text point sizes: whole increments or in between?"

Frode Bo Helland's picture

John: Yes. I am getting this in all web browsers on Win 7. There’s some text sized with percent instead of pixels.

DB: Can’t find that, except an Adobe forum thread that is missing.

Frode Bo Helland's picture

Ok, DB: found it, I guess: If you are refering to your usual cryptic mode, I’m not getting smarter. There is nothing, as far as I can tell, that relates to my question in that post of yours. I am not asking about delta hints, I am asking about links: my hyphen jumps from one to two pixels and back again at random, seemingly disregarding the control value table. It is not a case of CVT cut-in (Fontlab equivalent) neither.

dberlow's picture

from referenced thread... "If delta hints are hints that trigger adjustments at certain sizes, are there ramifications for delta-hinted fonts of using fractional point sizes?"

FF: "Yep."

The answer is no.

From this thread:"Does Windows throw away all hinting information if the font size is a decimal of a full pixel?"

The answer is still no.

FF: "There is nothing, as far as I can tell, that relates to my question in that post of yours..."


FF:"I am asking about links: my hyphen jumps from one to two pixels and back again at random..."

Probably not. TT does not do random rounding. You've probably made another mistake.

Frode Bo Helland's picture

Sure I’ve made a mistake :) I’m just trying to figure out what. If I size something to a fractional pixel size it goes crazy in Windows. Any idea what it might be?

I’ve read arguments against PPEM specific delta hints (in Fontlab?), claiming they don’t work for fractional sizes. I think from Beat, but I don’t remember. Maybe I was wrong.

Are you considering my workflow now, or are you talking about an ideal VTT world?

John Hudson's picture

Can you clarify what you mean by 'fractional pixel size'. Do you mean fractional 'px' size in CSS, or do you mean fractional ppem size? If the latter, how are you doing this?

Frode Bo Helland's picture

I mean px size in CSS.

Frode Bo Helland's picture

GDI rounds fractional sizes to full pixels right? How does this affect the hinting? If it does at all? I am reluctant to believe otherwise, as I've seen similar issues before corrected by specifying the font size in full pixels.

dberlow's picture

FF>"I mean px size in CSS."

You mean fractional px sizes in CSS?

I see documentation for spaces but not type sizes. But... I'm fairly certain that if the web designer can and does specify fractional px sizes for fonts, that all instructions should turn off.

Does your instructed hyphen behave "normally", i.e. jump from 1 to 2 to 3 pixels thick smoothly at whole point sizes?

Yes, I am thinking of your process.

Frode Bo Helland's picture

Yes, the jump from 1 to 2 to 3 pixels is as expected and "normally".

Frode Bo Helland's picture

I don’t know the exact sizes. These are steps on a slider, and my Firebug plugin returns a full pixel size, which I’m pretty sure it’s not. The hyphen differs from the other letters in that it only uses a double link.

I did generate these files with Fontsquirrel’s generator. It has an option of auto adding hyphens. I’ve double checked that it was turned off, so I don’t think that’s it neither. It would also be wierd for it to override the hyphen that is already in the font.

John Hudson's picture

Note that CSS 'px' is not a true device pixel. CSS px is an absolute value measurement of 1/96 inch, i.e 1 1/3 pts.

I believe what happens for text spec'd in px is exactly the same as text spec'd in any other size unit: it gets scaled to logical units, rounded and displayed at the nearest whole ppem size.

John Hudson's picture

Let's see a screenshot of the FL y direction hints for the hyphen glyph, including the program.

Frode Bo Helland's picture

This if FLS 5.1.1 for Mac: as you can see the rendering engine is broken, but it does get the y-direction right at least. Apologies for the large image.

Frode Bo Helland's picture

So, I’ve modified the slider to round all sizes to a full pixel, but that didn’t help. In the end I tested raw files (thanks Karsten), and also a different font (both raw and Fontsquirrel-generated) and it turns out the problem lies with Fontsquirrel.

I’m not exactly sure what it is though. For example, my accented a’s all render differently than their base glyph.

(It should be mentioned they have a y-direction double link to control the distance to diacritica. The base glyph a is locked to alignment zones, but none of the diacritis are.)

JamesT's picture

Something of a shot in the dark but try moving the hyphen vertically (either up or down) a little bit. My guess would be because it is directly between two horizontal rows on the pixel grid, slight variations in rendering and sizing could lead to this sort of outcome.

John Hudson's picture

Is Fontsquirrel dumping your hints and applying its own autohinting?

Frode Bo Helland's picture

I don't know. That might be the case. I tweeted him, but no response yet.

ahyangyi's picture

I find that you can choose between "use FontSquirrel's Truetype Hinting" and "Keep Existing Hinting" when you choose the expert mode.

Could this be the problem?

Frode Bo Helland's picture

The very issue here is that I select "keep existing" but get something different.

jasonc's picture


Richard Fink's picture


Over the past few weeks and still, I believe, the Font Squirrel Generator is going through a complete rebuild. A lot of changed behavior. However, I 'm sure they want to hear about whatever problems/bugs you run into and you'll hear back from them soon if you haven't already.

Frode Bo Helland's picture

Update: It was an issue with the Fontsquirrel generator, and it also affected composite glyphs. Fixed now.

Syndicate content Syndicate content