Closed Bug 1529673 Opened 6 years ago Closed 6 years ago

Include Google Sans in font lists for sans-serif fonts

Categories

(GeckoView :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox-esr68 wontfix, firefox65 wontfix, firefox66+ verified, firefox67 verified)

VERIFIED FIXED
mozilla67
Tracking Status
firefox-esr68 --- wontfix
firefox65 --- wontfix
firefox66 + verified
firefox67 --- verified

People

(Reporter: JanH, Assigned: JanH)

Details

Attachments

(1 file)

[Tracking Requested - why for this release]: Apparently recent-ish Pixel phones ship with "Google Sans" instead of Roboto. Because our font rendering only looks at the font metadata, it won't find any suitable font on those devices and therefore do strange things, like substituting serif fonts or whatever.

So according to the reddit thread, "the Google Sans Font outright replaced Roboto, but for compatibility the ttf files in /system/fonts are named Roboto". What the....?!?!

I suppose I shouldn't be surprised, though. Back when Roboto was taking over from Droid Sans, manufacturers were shipping phones where the file /system/fonts/DroidSans.ttf was in fact Roboto Regular, and so on. Sigh.

Anyhow, we should just add Google Sans throughout the android font prefs, I guess.

It would be funny if Google accidentally managed to get themselves into the same sort of web compatibility problems we had with Open Sans because of people depending on the exact properties of Roboto for their layouts.

Apparently some (Pixel) phones have started shipping with Google Sans instead of
Roboto. While the file names supposedly haven't changed for compatibility
reasons, this doesn't help us as our font rendering looks at the actual font
metadata and, if it cannot find a font claiming to be Roboto in its metadata,
starts substituting serif fonts or do other strange things.

Pushed by mozilla@buttercookie.de: https://hg.mozilla.org/integration/autoland/rev/c57170b2bc4f Add Google Sans to Android font list prefs. r=geckoview-reviewers,jfkthame,esawin

Amusing! Can you request beta uplift once this lands? Looks safe enough.

Flags: needinfo?(jh+bugzilla)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Comment on attachment 9045757 [details]
Bug 1529673 - Add Google Sans to Android font list prefs. r?geckoview-reviewers

Beta/Release Uplift Approval Request

  • Feature/Bug causing the regression: Google using a new font for Pixel phones
  • User impact if declined: On phones shipping Google Sans instead of Roboto, pages specifying sans-serif fonts won't be rendered properly because we might not have any other sans-serif font to fall back to.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Not directly, but somebody with an affected phone manually made the same change in about:config and reported success.
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simply extending the font list preference so we accept Google Sans as an alternative sans-serif font if Roboto isn't available.
  • String changes made/needed: none
Flags: needinfo?(jh+bugzilla)
Attachment #9045757 - Flags: approval-mozilla-beta?

Comment on attachment 9045757 [details]
Bug 1529673 - Add Google Sans to Android font list prefs. r?geckoview-reviewers

OK for uplift to beta 11.

Attachment #9045757 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified in the latest 66 Beta 11 and in the latest Nightly. Google Sans is included in the font.name-list.sans-serif from about:config.

Status: RESOLVED → VERIFIED

With the latest release (69.0) it seems the exact same problem has resurfaced. I needed to change the font settings to point to the metadata name as a workaround.

Thanks for reporting this regression. Firefox 68 was just released, so it's likely this is a regression in 68.

On Reddit, you said you "changed roboto to san francisco". Did you mean you changed Android's default system font? Or changed a Firefox pref in about:config?

(In reply to seemebreakthis from comment #13)

I needed to change the font settings to point to the metadata name as a workaround.

What is the metadata name for the San Francisco font?

(In reply to Chris Peterson [:cpeterson] from comment #14)

Thanks for reporting this regression. Firefox 68 was just released, so it's likely this is a regression in 68.

On Reddit, you said you "changed roboto to san francisco". Did you mean you changed Android's default system font? Or changed a Firefox pref in about:config?

(In reply to seemebreakthis from comment #13)

I needed to change the font settings to point to the metadata name as a workaround.

What is the metadata name for the San Francisco font?

Hi - thanks for following up on this.

Actually I just replied in Reddit. You can check there too, but in short yes I changed the default android os font by simply replacing the .ttf files in /system/fonts.

And the metaname of the font (for the .ttf files I am using anyway) is SF Pro Display

(In reply to seemebreakthis from comment #15)

Actually I just replied in Reddit. You can check there too, but in short yes I changed the default android os font by simply replacing the .ttf files in /system/fonts.

From the Reddit thread: "What I did was I copied the SF Pro fonts to the /system/fonts directory and just renamed them as roboto-regular.ttf"

Sorry, but you're really venturing into unsupported territory here, and it's not surprising you have to tweak your configuration to get the result you're after. By default, Firefox is configured to look for one of Roboto, Google Sans, or Droid Sans for the sans-serif family, but you've eliminated these from your device, so of course it no longer knows what to use.

If you want to use SF Pro Display as your default sans-serif font, then it makes sense that you have to adjust the Firefox font configuration to tell it so.

It seems there was a regression of some sort in Firefox 68 for an unmodified Google Pixel. I have checked my about:config and all the sans-serif flags do have Google Sans. However, I still have a weird conglomeration of fonts on certain websites, for example Google. I created a post on reddithttps://www.reddit.com/r/firefox/comments/crwhqj detailing the issue before I found this thread.

[Tracking Requested - why for this release]: See my comment above. Anyone else having this issue?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: