Closed Bug 1509067 Opened 6 years ago Closed 5 years ago

Failing to fall back across multiple subsetted faces of an installed font [was: Unicode Character ✘ is not showing up]

Categories

(Core :: Layout: Text and Fonts, defect, P3)

63 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: bennerockt, Assigned: jfkthame)

References

Details

(Whiteboard: [geckoview:p3])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

Go to this website: https://www.compart.com/en/unicode/U+2718


Actual results:

The Unicode Character is not showing up. Instead, a red square is shown (see screenshot attached).


Expected results:

The Unicode Character ✘ is expected to show up.
Hi, thanks for your report. I tried to reproduce your issue with Huawei P9 Lite	(Android 6), Samsung Galaxy S8 (Android 8.0) and OnePlus 5T (Android 8.1.0) on the latest Nightly 65.0a1 (2018-11-21) and I wasn't able. Can you send us more details (mobile model, android)? Do you have some specific settings or some add-ons installed? Also if you have any additional steps let us know. I'll wait for your update, thanks.
Flags: needinfo?(bennerockt)
Thank you for your reply.
I'm using a Xiaomi Mi A2 (Android 8.1.0 with latest Patches). I've no add-ons installed. The only specific settings seems to be the Use of a custom Sync-Server.
Flags: needinfo?(bennerockt)
Hi, I still can't reproduce your issue. Can you make a video with the problem? Please use a fresh install to be sure about the problem, thanks.
Flags: needinfo?(bennerockt)
Flags: needinfo?(bennerockt)
Ok, I've recorded the screen - you'll find the video attached. Hopefully it does help...
This looks like a geckoview issue but I was unable to reproduce it. Chris can you take a look?
Flags: needinfo?(cpeterson)
Thanks, Benne. Your screen recording is very helpful. In addition to the ✘ character not showing up, I noticed that the down-pointing arrow icon (Unicode character U+25BE ▾) doesn't show up to the right of Bugzilla's "Product" and "Component" drop down menus.

What language or locale is your phone or browser configured to use? Are you using any custom system fonts that might not have symbols for all Unicode characters?

I'm adding [geckoview] whiteboard tag to send this bug to GeckoView bug triage.
Flags: needinfo?(cpeterson)
Whiteboard: [geckoview]
Dear Chris, thank you for your reply. My Phone is configured to use "German (Germany)" and Firefox is set to "System Default". I'm not using any custom fonts.
I think Kevin knows how to diagnose these... probably need a log dump.
Flags: needinfo?(kbrosnan)
Priority: -- → P3
* download and install the Android Platform tools for your operating system https://developer.android.com/studio/releases/platform-tools
* Enable developer options for your device and enable USB debugging
* Run the command "adb devices" and make sure your device is authorized
* Create a folder "Android-fonts" and in that folder run the following
* "adb pull /system/fonts"
* Zip up the Android-fonts folder
* Attach it to this bug

If you get stuck on a step ask here or email me.
Flags: needinfo?(kbrosnan)
Here you'll find the zip-file with the pulled fonts: https://www.dropbox.com/s/os0fvnv59uwnhmb/Android-fonts.zip?dl=0
OS: Unspecified → Android
Whiteboard: [geckoview] → [geckoview:p3]

Johnathan do you have some time to look at the fonts that this user pulled from their device?

Flags: needinfo?(jfkthame)

The characters concerned (U+2718 ✘, U+25BE ▾) are found in the Noto Sans Symbols font. However, on this user's device, the vendor has shipped Noto Sans Symbols split across two files; there's NotoSansSymbols-Regular-Subsetted.ttf, and then also NotoSansSymbols-Regular-Subsetted2.ttf, with most of the characters in the first of these and a smaller number in the Subsetted2 file.

Both these .ttf files have the exact same font names and other metadata, so I suspect what's happening is that our font selection code can't distinguish them, and ends up using only one of the faces -- and it happens to be the one that doesn't have most of the symbols in it.

I thought we'd done some work a while back to try to handle situations like this, but maybe I'm mis-remembering the exact scenario. Some investigation of the gfxFT2FontList backend might help figure out exactly why it breaks. Leaving needinfo? to remind myself to try and look into it when I can find some time.

Status: UNCONFIRMED → NEW
Component: General → Layout: Text and Fonts
Ever confirmed: true
Flags: needinfo?(jfkthame)
Product: Firefox for Android → Core
Summary: Unicode Character ✘ is not showing up → Failing to fall back across multiple subsetted faces of an installed font [was: Unicode Character ✘ is not showing up]
Version: Firefox 63 → 63 Branch
Flags: needinfo?(jfkthame)

I have a patch that I think should resolve the problem here, by ensuring we correctly search multiple faces when a font has been split in this way; but I don't have a suitable device to actually test it.

A test build is at https://treeherder.mozilla.org/#/jobs?repo=try&revision=ad709bd04c5454d2a67ad4e30db529c6c49ecef1. Benne, if you're willing to install the version from there[1] and see if this helps, that would be awesome.

[1] The APK file to download and install should be https://queue.taskcluster.net/v1/task/MwQeJEWxRDy697nESUNu7w/runs/0/artifacts/public/build/target.apk. This will install with the name "Firefox Nightly".

Flags: needinfo?(jfkthame) → needinfo?(bennerockt)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Jonathan, I can confirm that using the APK above has fixed the issue. The Unicode Character ✘ is now showing up as expected. Thank you very much for your kindly help!

Flags: needinfo?(bennerockt)
Attachment #9040103 - Flags: review?(jmuizelaar)
Comment on attachment 9040103 [details] [diff] [review]
Make font fallback properly search across multiple 'normal' faces of a family (e.g. where subsetting has been used to split a font between multiple files)

Review of attachment 9040103 [details] [diff] [review]:
-----------------------------------------------------------------

Can we reftest this?

(In reply to Jeff Muizelaar [:jrmuizel] from comment #17)

Can we reftest this?

Not really, afaics; it's only an issue given an unusual configuration of system-installed fonts, so none of our test configurations are going to exhibit the problem.

Attachment #9040103 - Flags: review?(jmuizelaar) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a45636ad898
Make font fallback properly search across multiple 'normal' faces of a family (e.g. where subsetting has been used to split a font between multiple files). r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: