Default typefaces for fractions are a mess

UNCONFIRMED
Unassigned

Status

()

Core
Layout: Text
UNCONFIRMED
7 years ago
3 years ago

People

(Reporter: Julian D. A. Wiseman, Unassigned)

Tracking

({testcase})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 2 obsolete attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0

Fractions (½ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚) are rendered in inconsistent typefaces. Please see attachments.

Reproducible: Always
(Reporter)

Comment 1

7 years ago
Created attachment 528070 [details]
Test case: fractions, HTML
(Reporter)

Comment 2

7 years ago
Created attachment 528071 [details]
Test case: fractions, screen picture

Updated

7 years ago
Attachment #528070 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 3

7 years ago
Created attachment 528097 [details]
Test case: fractions, HTML (also showing monospace)
Attachment #528070 - Attachment is obsolete: true
(Reporter)

Comment 4

7 years ago
Created attachment 528098 [details]
Test case: fractions, screen picture (also showing monospace)
Attachment #528071 - Attachment is obsolete: true

Updated

7 years ago
Attachment #528097 - Attachment mime type: text/plain → text/html

Updated

7 years ago
Component: General → Graphics
Keywords: testcase
Product: Firefox → Core
QA Contact: general → thebes
The typeface selected for a character is typically the first one in the sorted list that has the character.  So isn't the real problem here the fact that you have a font early in the list which has some but not all of the characters involved?
Component: Graphics → Layout: Text
QA Contact: thebes → layout.fonts-and-text
(Reporter)

Comment 6

7 years ago
> the first one in the sorted list

Agreed: the problem may well be with the default font list.
I don't think there's much we can do about this. Many Latin-script fonts include only the three most "basic" fractions (½ ¼ ¾), as found in the ISO-8859-1 codepage; others have a few extras, and some have the full Unicode fraction repertoire.

The first-choice font in the CSS font-family list will often be a font with a very limited collection. We wouldn't want to switch away from the first-choice font just because a ½ character happens to occur - but then, if another fraction such as ⅓ occurs later, we have to fall back through the font list to find a font that supports it.

It's clearly not feasible to do something like "if _any_ fraction that's not in the first-choice font occurs _anywhere_ in the document, then _all_ fraction characters should magically fall back together to the same alternative font". But in the absence of some kind of magic like that, there are bound to be potential "mismatches" unless you take care to specify a first-choice font that covers the repertoire of fraction characters you need for your page - using @font-face, if necessary, to ensure its availability.
Oh, and with regard to the default fonts configured in the browser: I suppose we could try to favor fonts with a full collection of fraction characters, but this would be at the expense of something else - possibly other parts of the Unicode repertoire, as there's no such thing as a "complete" Unicode font, or possibly "just" aesthetics, if the preferred typeface designs are not the ones with all the fractions. I don't think this is a particularly useful way forward, and it could never solve all such issues. It's primarily up to page authors to specify appropriate fonts for the content they're publishing, if they're concerned about the details of appearance.
(Reporter)

Comment 9

7 years ago
Is it possible to pick a font present on Macs that has ‘nice’ fractions, all of them, and make that the first choice for any fraction? 

If yes, good. 

If not, then this is probably WONTFIX.
(In reply to comment #9)
> Is it possible to pick a font present on Macs that has ‘nice’ fractions, all of
> them, and make that the first choice for any fraction? 

To be used instead of what's specified in the page's CSS, you mean?
(Reporter)

Comment 11

7 years ago
> To be used instead of what's specified in the page's CSS, you mean?

The first example in the HTML example specifies only the likes of “font-size: medium;”, not a font, nor a font-family. So this is pure Firefox default, which is what I was hoping to improve.

Of course, if the CSS specifies a font, that would over-ride the default, and that font — good or bad — is then what happens.
But the default font is something that shouldn't depend on the content; in particular it's just something set in your preferences....
(Reporter)

Comment 13

7 years ago
Created attachment 529176 [details]
Inconsistent fractions on bugzilla.mozilla.org/show_bug.cgi?id=652508
(Reporter)

Comment 14

7 years ago
Created attachment 538743 [details]
Fractions as show in plain <p> typeface on iPad Safari

PNG shows an extract from www.jdawiseman.com/papers/trivia/characters-copy-paste.html, as rendered by Safari on an iPad. Observe that the fractions are not perfect, but much more similar than the Firefox test cases posted. Conclusions: if a closed system like an iPad can’t get this perfect, Firefox is unlikely to do so. But Firefox could do much better than it is.
(Reporter)

Comment 15

7 years ago
This might be (distantly) related to bug 663962.
(Reporter)

Comment 16

3 years ago
Still a mess. Still a bug, methinks.
You need to log in before you can comment on or make changes to this bug.