FS#51594 - [harfbuzz 1.3.3] Progressive system-wide degradation to fallback sans/serif font

Attached to Project: Arch Linux
Opened by Ronan (ronjouch) - Monday, 31 October 2016, 04:01 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 31 October 2016, 22:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Within a ~3h timespan, my machine started ignoring my font choices and applications progressively degraded to fallback fonts.

- By "font choice" I mean the "Fonts" section of GNOME Tweak Tool. Here, regardless of the font I choose for Interface/Documents (I tried for example: Cantarell, Ubuntu Sans, Droid Sans), applications instead fall back to Sans.

- By "fallback font" I mean the Bitstream Vera fonts set.

- By "progressively" I mean exactly this, during a ~3h period:

* The first apps I noticed behaving wonky were Firefox and Thunderbird around 5PM, but for example {Nautilus, Terminal, Transmission, LibreOffice, DeadBeef, Chrome} were okay at this time. Restarting them didn't cause them to degrade, and neither rebooting did.

* But, little by little, they started degrading to fallback fonts, and by 8PM all my apps were falling back to Sans. I'm sober and 100% certain of this behavior; I'm a font nerd and immediately noticed the change. At this point, all the apps mentioned above without exception exhibited the degraded behavior.

* I started investigating:

a. Trying to remember of recent config changes: none meaningful I can recall for the last few days.
b. Restarting GNOME Shell.
c. Rebooting.
d. Forcing a filesystem check.
e. Reinstalling all these fonts (packages: cantarell-fonts ttf-ubuntu-font-family).
f. Trying to downgrade sdl2.
g. Running `fc-cache -r -v` (see attached log). It's a very vanilla setup, except that the "/usr/share/fonts/WindowsFonts" entry you'll see is a symlink to my Windows partition and has been working for years.
h. Finally, around 10PM, I checked further in my pacman update log (attached) and reverted {harfbuzz harfbuzz-icu} to 1.3.2-1 and ran `fc-cache -r -v`. At 11PM, all apps were back to normal, except {GDM, Firefox, Thunderbird, Cantarell in the font picker}. Maybe they were still getting data from some poisoned cache?
i. Before posting this bug I tried to reproduce the problem by re-upgrading to 1.3.3-1 and clearing the cache.

Unfortunately, this final reproduction attempt was unsuccessful and I'm still in the same state as in step g: all apps okay except {GDM, Firefox, Thunderbird}.
-> So pardon the half-assed bug report, I wish I could have reached something reliably reproducible, but since it looks a lot like a painful caching issue:
... *If* the problem lies indeed within harfbuzz, it may take again days before I can witness it again, making it harder to debug.
... But if it's *not* harfbuzz, I fail to see who could be the troublemaker; I didn't try much in this timespan (see the boring attached shell log). Maybe it's just the `fc-cache -r -v`? But then why are some apps still broken?

- In Firefox and Chrome, both chrome (menus) and content (webpages) are affected (or in the case of Chrome, *were* affected, as Chrome is back to working since the downgrade). Which led me to realize that although degraded to Sans, the serif-ness was still honored (e.g. Arial text falls back to Sans, and Georgia text --for which I *do* have the font, see below-- degrades to the fallback Serif.

- The fonts themselves are *not* corrupted: in GNOME Tweak Tool's font pickers, the fonts (e.g. Ubuntu Sans, Droid Sans) display correctly ... *except* for GNOME's default font (Cantarell) which is obviously not itself and falls back to Sans. See attached screenshots.

- I'm running X, not Wayland
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 31 October 2016, 22:29 GMT
Reason for closing:  Not a bug
Comment by Ronan (ronjouch) - Monday, 31 October 2016, 22:26 GMT
Please close: problem was not due to harfbuzz but to AUR package nodejs-emoj, and more precisely its emojione-color-font dependency.

Details:

- I failed to notice it because I queried pacman.log with a `| grep upgraded`, which didn't mention emojione-color-font because that's a *new* package I installed yesterday (gosh, and completely forgot about when troubleshooting :( :( )

- What helped was running Firefox with FC_DEBUG ( https://www.freedesktop.org/software/fontconfig/fontconfig-user.html ) and seeing lots of entries talking about emojione-color-font, which prompted me to test removing it, which immediately solved the problem.

- Props go to KhaledHosny from #harfbuzz, who was fast to tell me my problem was none of harfbuzz's business, and suggested to try LC_DEBUG. Thanks!

- Will mention this problem to the AUR maintainer for emojione-color-font

Sorry for the noise! Thanks for Arch.

Loading...