Closed Bug 975744 Opened 6 years ago Closed 6 years ago

enable font-variant-* / font-feature in release by default


(Core :: CSS Parsing and Computation, defect)

Not set



Tracking Status
relnote-firefox --- 34+


(Reporter: fb+mozdev, Assigned: jtd)


(Blocks 1 open bug, )


(Keywords: dev-doc-needed, Whiteboard: [DocArea=CSS])


(2 files)

+++ This bug was initially created as a clone of Bug #549861 +++

The CSS3-Font spec is in CR and the implementation made in Bug 549861 enabled in nightly since a few releases (iirc). This should be ready for pref-on in release now.
The pref is "layout.css.font-features.enabled".
Blocks: 835191
John, is Bug 961558 required before enabling-by-default? If so, please add as dependancy.

Also, the font-variant shorthand needs to learn about the new values, I think this can be done as part of this bug.
Flags: needinfo?(jdaggett)
The shorthand change should be done at the same time as flipping the pref.
Yes, we need fallback for font-variant: small-caps to function correctly. Without the fallback, it would only work in cases where the font explicitly supported small-caps alternates.
Depends on: 961558
Flags: needinfo?(jdaggett)
Depends on: 1024804
Depends on: 1041951
This removes the pref disabling the unprefixed font-feature-settings and font-language-override in release builds. It also switches the alias so that prefixed versions of these properties alias to the unprefixed versions. In addition, it removes the prefix from the @font-face font-feature-settings and font-language-override descriptors. I didn't put any code in to support the prefixed versions of these descriptors as I don't think they are in any sort of common use. The new pref 'layout.css.prefixes.font-features' controls whether the -moz- version is supported or not.
Attachment #8475088 - Flags: review?(dbaron)
In tests where both the prefixed and unprefixed property names are used, the prefixed version is trimmed out. For other tests, the unprefixed property name is now used.
Attachment #8475089 - Flags: review?(jfkthame)
Comment on attachment 8475089 [details] [diff] [review]
patch, unprefix font-feature-settings and font-language-override in tests

Review of attachment 8475089 [details] [diff] [review]:

::: layout/reftests/counters/counter-suffix-ref.html
@@ +10,1 @@
>      font-feature-settings: "tnum";

Switch this to "font-variant-numeric: tabular-nums;", like in the counter-style tests.
Attachment #8475089 - Flags: review?(jfkthame) → review+
Comment on attachment 8475088 [details] [diff] [review]
patch, unprefix font-feature-settings and font-language-override

r=dbaron, although it seems like there might be something more useful to do with test_bug892929.html
Attachment #8475088 - Flags: review?(dbaron) → review+
Assignee: nobody → jdaggett
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Whoop whoop!

Release Note Request (optional, but appreciated)
[Why is this notable]: moar control over fonts
[Suggested wording]: Implemented font-feature and font-variant-* from CSS3 Font Module allowing for better control over font representation.
[Links (documentation, blog post, etc)]: tbd (MDN)
relnote-firefox: --- → ?
Added with "CSS3 font-feature and font-variant-* implemented" as wording (the proposed one was too long).
(In reply to Sylvestre Ledru [:sylvestre] from comment #12)
> Added with "CSS3 font-feature and font-variant-* implemented" as wording
> (the proposed one was too long).

Um, this is wrong.

The properties below are now enabled by default:


The properties below have been unprefixed (the prefixed version is now an
alias to the unprefixed version):


In addition, the 'font-variant' property switches from a longhand property to
a shorthand for all the font-variant-xxx subproperties.

The significance of this is that authors can now control font features in a
much more natural way. What they could previously do with somewhat cryptic
'-moz-font-feature-settings' value can now be accomplished with a
'font-variant' value.


Within a table of numbers, it's very helpful to use tabular variants without
the need to explicitly switch to a monospaced font:

Old way:

  .tabular {
    -moz-font-feature-settings: "tnum" on;

With 'font-variant':

  .tabular {
    font-variant: tabular-nums;

Summarize this to whatever you feel is best but there's no 'font-feature' property. ;)
Uh, well, my bad … sorry!

How about: "(Added) CSS3 Font variants and features control (e.g. kerning) implemented."
Flags: needinfo?(sledru)
Updated. thanks.
Flags: needinfo?(sledru)
You need to log in before you can comment on or make changes to this bug.