Font kerning support (TTF embedded kerning information)

RESOLVED WORKSFORME

Status

()

Firefox
General
--
enhancement
RESOLVED WORKSFORME
11 years ago
8 years ago

People

(Reporter: Jose Fandos, Unassigned)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

True type fonts have embedded kerning information within them. This information is currently not being used by Firefox when rendering the fonts.

The CSS Text Level 3 Working Draft 6 March 2007 mentions support for "Fullwidth Punctuation Kerning: the 'punctuation-trim' property" but leaves kerning support to the Fonts module ("'kerning-mode: contextual'  has been replaced with 'punctuation-trim: adjacent'. Any further controls for kerning will likely be delegated to the Fonts module.") 

The Font module (CSS3 module: Fonts; Working Draft 2 August 2002) is still quiet about kerning as of today.

I suggest full kerning support for True Type Fonts in Gecko 2.0 for Firefox 4.0.

Comments in the following article (http://blog.wired.com/underwire/2007/04/the_math_behind.html) are suggested reading, in particular the following two comments:

http://blog.wired.com/underwire/2007/04/the_math_behind.html#comment-67133010
Sorry, many of the posters here are wrong: most of the current browsers do not do kerning.
You are confusing kerning with proportional fonts.

Try this:
AVAVAVAVAV
AAAAAVVVVV

If your browser does kerning, and the fonts has kerning info, the two strings should NOT have equal width.

Now try this in MS Word. Still equal.
Then select "Format" -> "Font" -> "Character Spacing" tab, check "Kerning for fonts" and choose a small size (let's say 3 points and above).
Words will start doing kerning.
Then try various fonts. Arial and Times New Roman have kerning info. Arial Unicode MS does not.

http://blog.wired.com/underwire/2007/04/the_math_behind.html#comment-67152188
Mihai is correct; browsers generally don't respect kerning information. If you have a Mac and Safari with the debug menu enabled, you can get a dramatic demonstration of that by just turning on the "Use ATSU text" option, reloading the page, and watching what happens to the AAAAVVVV strings posted above. In addition to that, browsers have lousy justification algorithms and none of them, as far as I know, have hyphenation algorithms. (Firefox won't even respect manual "hinting" with the soft hyphen entity!)

Reproducible: Always
(Reporter)

Updated

11 years ago
Depends on: 105800

Comment 1

11 years ago
see bug 157967
(Reporter)

Updated

11 years ago
Depends on: 157967

Comment 2

10 years ago
There's support for kerning in Fx3. Is it good enough to close this bug?

Comment 3

8 years ago
no comment, closing this bug
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 4

8 years ago
Missed comment 2 a couple years ago. Yes, the kerning is indeed working as per this bug's description. Shouldn't resolution be changed to Fixed? Not sure of the protocol (i.e. it's worksforme because the fix wasn't in this bug proper?)

Comment 5

8 years ago
It was is was chnaged to FIXED, then it would be counted in the number of bugs that was fixed for a particular release. WORKSFORME is better than INVALID or WONTFIX or whatever.

Normally it should be duplicated to the exact bug (or bugs) in which kerning was added, but that's way too much work.
You need to log in before you can comment on or make changes to this bug.