When using -moz-feature-settings:"frac" with old versions of Gabriola font, denominators > 9 are wrong

RESOLVED INVALID

Status

()

Core
Layout: Text
RESOLVED INVALID
6 years ago
5 years ago

People

(Reporter: teoli, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

6 years ago
On Mac OS X 10.6, with latest Nightly. (Official one, built from http://hg.mozilla.org/mozilla-central/rev/94ce5f33a9ea )

When displaying 12/10 using OpenType "frac" w/ Gabriola, "frac" does work, but denominator is 21 (each digit is off by one).

Denominator <= 9 are ok, but when >= 10, each digit is off by one.

STR:
1) Go to: data:text/html,<p style="font-family:Gabriola;-moz-font-feature-settings:'frac'">12/10</p>

Result:
12/21 12/10 displayed using Gabriola w/ "frac" glyphs

Expected result:
12/10 displayed using Gabriola w/ "frac" glyphs
What specific version of the Gabriola font are you using?

On Win7, with Gabriola 5.90, I'm seeing correct denominators only for 8 and 9. For 7, I see the expected "7" glyph, but in the numerator position; and for denominators < 7, I'm seeing d+1.

Comment 2

6 years ago
It would also be good to test with IE10 (part of Win8 preview build) to see whether this is something harfbuzz-related or a font problem.
(Reporter)

Comment 3

6 years ago
It looks like I have Gabriola 5.90 too:
Gabriola.ttf :

  Type :	TrueType
  Valide :	Oui
  Activé :	Oui
  Emplacement :	/Library/Fonts/Microsoft/Gabriola.ttf
  Styles :
Gabriola :
  Nom complet :	Gabriola
  Famille :	Gabriola
  Style :	Regular
  Version :	Version 5.90
  Fournisseur :	Microsoft Corporation
  Nom unique :	MicrosoftCorporation: Gabriola: 2008
  Concepteur :	John Hudson
  Copyright :	© 2008 Microsoft Corporation. All Rights Reserved.
  Marque déposée :	Gabriola is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries.
  Contour :	Oui
  Valide :	Oui
  Activé :	Oui
  Doublon :	Non
  Protégé contre la recopie :	Non
  Intégrable :	Oui

Just retried more cases:
 1/1 gives 1/2  (in the correct superscript/subscript form) NOT OK
 2/1 gives 2/2  (in the correct superscript/subscript form) NOT OK
 3/1 gives 3/2  (in the correct superscript/subscript form) NOT OK
 4/1 gives 4/2  (in the correct superscript/subscript form) NOT OK
 5/1 gives 5/2  (in the correct superscript/subscript form) NOT OK
 6/1 gives 6/2  (in the correct superscript/subscript form) NOT OK
 7/1 gives 7/1  (in the incorrect superscript/superscript form) NOT OK
 8/1 gives 8/2  (in the correct superscript/subscript form) NOT OK
 9/1 gives 9/2  (in the correct superscript/subscript form) NOT OK
10/1 gives 10/2 (in the correct superscript/subscript form) NOT OK
11/1 gives 11/2 (in the correct superscript/subscript form) NOT OK

1/2  gives 1/3 (in the correct superscript/subscript form) NOT OK
1/3  gives 1/4 (in the correct superscript/subscript form) NOT OK
1/4  gives 1/5 (in the correct superscript/subscript form) NOT OK
1/5  gives 1/6 (in the correct superscript/subscript form) NOT OK
1/6  gives 1/7 (in the correct superscript/subscript form) NOT OK
1/7  gives 1/7 (in the incorrect superscript/superscript form) NOT OK
1/8  gives 1/8 (in the correct superscript/subscript form) OK
1/9  gives 1/9 (in the correct superscript/subscript form) OK
1/10 gives 1/21 (in the correct superscript/subscript form) NOT OK
1/11 gives 1/22 (in the correct superscript/subscript form) NOT OK
1/12 gives 1/23 (in the correct superscript/subscript form) NOT OK
1/13 gives 1/24 (in the correct superscript/subscript form) NOT OK
1/14 gives 1/25 (in the correct superscript/subscript form) NOT OK
1/15 gives 1/26 (in the correct superscript/subscript form) NOT OK
1/16 gives 1/27 (in the correct superscript/subscript form) NOT OK
1/17 gives 1/27 (with the 7 in superscript! It reads: 1/2^7))  NOT OK
1/18 gives 1/28 (in the correct superscript/subscript form) NOT OK
1/19 gives 1/29 (in the correct superscript/subscript form) NOT OK

So it looks that on denominators: 0-6 are wrong (off by one, correctly positioned), 7 is wrong (superscript instead of subscript), 8 & 9 are correct and well-positioned.
Numerators are ok.

It may be a font problem. Does somebody know of another font (on Mac) that have such frac-specific glyphs too?
(Reporter)

Comment 4

6 years ago
My summary of wrong case doesn't cover the 7/1 where both are superscript.
The 7 at the end of the nominator seems to trigger this: 7/1 7/5 17/1 27/5 show the behavior (denominator in superscript, but values correct: 7/1 7/5 17/1 27/5) but 76/5 is positionally-correct (but display as 76/6).
(Reporter)

Comment 5

6 years ago
The problem is in the font: http://support.serif.com/KB/a294/troubleshooting-opentype-fractions-display-incorrectly.aspx

(I don't have tested with the fix itself).

As the culprit Gabriola 5.90 is installed by default on numerous systems (both Windows and Mac OS), is there a way to disable "frac" on it? (The bug is pretty nasty as values in a Web site are wrong...)

If not, we should resolved this bug as RESOLVED/INVALID.

I'm adding dev-doc-needed as I want to add a note about this under font-feature-settings in the MDN.
Keywords: dev-doc-needed
(Reporter)

Comment 6

6 years ago
Oh yes, W8 has 5.92 by default (thx to Ms2ger for that information)

Comment 7

6 years ago
If we noted all font bugs under the docs for font-features-settings it would be a long list...  And it would be difficult to keep this current with the specific version of font used (i.e. 5.9.2 vs. 5.9.0).
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
I installed the MS hotfix on my Win7 machine, which updated Gabriola from 5.90 to 5.92, and confirmed that the fractions now display correctly in Nightly.

While it's certainly a nasty bug, I don't think it justifies adding a font-specific hack to our code in order to recognize the broken version of the font and disable that feature. The 'frac' feature is not enabled by default, so this would only affect sites that specifically opt in to the (prefixed/experimental) font feature support.

I do think that a note under font-feature-settings on MDN would be useful, to warn authors investigating the font feature properties about the pitfalls of buggy fonts, and the need for testing to ensure the results are as expected. This one could be mentioned as an example, but we can't exhaustively document all the problems that are out there.
Summary: When using -moz-feature-settings:"frac", denominators > 9 are wrong → When using -moz-feature-settings:"frac" with old versions of Gabriola font, denominators > 9 are wrong
(Reporter)

Updated

5 years ago
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.