-moz-font-feature-settings only works for some fonts

RESOLVED WORKSFORME

Status

()

Firefox
General
RESOLVED WORKSFORME
7 years ago
7 years ago

People

(Reporter: LummoxJR, Unassigned)

Tracking

8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20110928060149

Steps to reproduce:

I tried to get rid of the execrable Tr ligature in my toolbar and statusbar by using the Stylish add-on, but -moz-font-feature-settings:'liga=0,dlig=0,hist=0' had no effect. (I verified other properties like font-weight:bold worked.) I also was unable to see any effect by changing the styles (using Firebug) on various pages where the ligature appears. The Trebuchet MS font shows this problem quite clearly.


Actual results:

-moz-font-feature-settings had absolutely no effect--not only on ligatures, but also for other settings like small caps (smcp=1), in either XUL or in page CSS. The only time I have seen this feature work is when the font is installed via @font-face, as seen here:

http://people.mozilla.org/~jdaggett/webfonts/sugarspice.html


Expected results:

The font renderer should be taking -moz-font-feature-settings into account, but it only seems to apply this style to custom font faces.
Trebuchet MS doesn't have a "Tr" ligature, I believe. It does have kerning for the pair "Tr", which may be what you're seeing; but this is implemented as a legacy 'kern' table, not an OpenType feature, and so it is not currently affected by -moz-font-feature-settings. (This may change in future, I suspect.)

Feature settings *are* applied to installed fonts, as well as @font-face ones, but will do nothing unless the features are actually present in the font concerned. Trebuchet, for example, doesn't have a 'smcp' feature and so this cannot be expected to have any effect.
(Reporter)

Comment 2

7 years ago
Ah, this makes sense then. I hope kerning support gets changed in the future to allow for fixing the Tr issue then, but I guess this explains my issue.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

7 years ago
As a followup, I found a solution for the weirdly aggressive kerning in a forum post related to https://bugzilla.mozilla.org/show_bug.cgi?id=690806, which is to set gfx.font_rendering.harfbuzz.scripts to 0 (or at least disable bit 0). With that turned off, kerning behaves the way it used to.
You need to log in before you can comment on or make changes to this bug.