Closed Bug 687778 Opened 13 years ago Closed 11 years ago

per-font feature settings are overridden by feature settings associated with a style rule

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: jtd, Assigned: jtd)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

Attached file testcase showing missing ligature (obsolete) —
The CSS3 Fonts spec allows both font feature settings on a per-font basis and within general style rules.  In other words, both forms below are allowed:

@font-face {
  font-family: MyFont;
  src: url(xxx);
  -moz-font-feature-settings: "dlig=1"; /* discretionary ligatures on by default */
}

p {
  -moz-font-feature-settings: "dlig=1";
}

However, the logic in gfxHarfBuzzShaper::InitTextRun only references the feature settings associated with the font if there are *no* style rule settings.  This is wrong, feature settings in style rules should override per-font settings but on a feature-by-feature basis.  With the content below, discretionary ligatures are not drawn:

@font-face {
  font-family: MyFont;
  src: url(xxx);
  -moz-font-feature-settings: "dlig=1"; /* discretionary ligatures on by default */
}

p {
  -moz-font-feature-settings: "xyzw=1"; /* random feature */
}
Added a test for not properly handling overridden features within the feature settings itself (i.e. "dlig=1, dlig=0" should be equivalent to "dlig=0").
Attachment #561130 - Attachment is obsolete: true
Depends on: 718539
This was fixed by bug 718539.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: