[Webkit-unassigned] [Bug 186804] New: Variable fonts: FeatureVariations conditions on multiple axes seem to be ORed, not ANDed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 19 07:35:33 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=186804
Bug ID: 186804
Summary: Variable fonts: FeatureVariations conditions on
multiple axes seem to be ORed, not ANDed
Product: WebKit
Version: Safari 11
Hardware: Macintosh
OS: macOS 10.13
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: lorp at lorp.org
Created attachment 343053
--> https://bugs.webkit.org/attachment.cgi?id=343053&action=review
A TrueType font with 2 variation axes and 2-dimensional FeatureVariations
FeatureVariations in variable fonts allow glyph substitution to happen based on location in the designspace, as specified by CSS font-variation-settings (and other methods of setting axis positions). The spec allows substitutions to be made in any "rectangular" region of the font's designspace, by means of sets of conditions. For example, a small rectangle within a 2-dimensional designspace can be defined by giving a min and max in axis 0 and a min and max in axis 1. In the language of the spec, this would be one ConditionSet containing two ConditionTables. From the spec:
https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#featurevariations-table
“For a given condition set, conditions are conjunctively related (boolean AND): all of the specified conditions must be met in order for the associated feature table substitution to be applied.”
As the spec states, for such multi-dimensional ConditionSets to resolve correctly, the ConditionTables must process the ConditionTables in a chain of AND relations. All of the ConditionTables need to resolve to true for the ConditionSet to resolve to true.
However, Safari seems to use a chain of OR relations, so that ConditionSets are resolveing to true too often.
This CodePen uses a test font that contains two glyphs: u and u.alt (a square looking like a missing glyph), to demonstrate the issue. When handled correctly, FeatureVariations in the font cause the "u" in parts of the 2-dimensional designspace to switch to "u.alt". The total region for the substitutions in this font are non-rectangular and non-contiguous, are are defined by multiple ConditionSets.
https://codepen.io/lorp/pen/RMmRVB
It works on Chrome, but on Safari we see no substitutions. See screengrabs and attached font.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180619/b83cf2ba/attachment-0001.html>
More information about the webkit-unassigned
mailing list