Open Bug 1621915 Opened 5 years ago Updated 1 year ago

funky fonts in Flatpaks

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

Future

People

(Reporter: mtabara, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

:Mikaela reported this bug in Matrix with the following comment(s):

  • some fonts look unusual in Discourses and Bugzilla, but that may be expected with the flatpak not having propietary fonts or something?
  • we probably need to add some dependency but I can't promise that will make p11-kit happy
  • fonts available on the host are exposed to flatpak applications so as long as you have them installed, that shouldn't be the case

Will upload some images in a bit to show diffs between regular Firefox and flatpak Firefox.

Attached image left_flatpak_right_Firefox (deleted) —

The left one is the flatpak, the right one is 74.0 (64-bittinen) from https://releases.mozilla.org/pub/firefox/releases/ (with heavy customization I guess, so maybe this is user error). Mikaela says she's not sure how accurate the screenshot shows the differences.

Summary: funcky fonts in Flatpaks → funky fonts in Flatpaks

I noticed that a screenshot of GitHub may show the difference in the fonts more clearly. The difference seems less defined in a screenshot that on the screen though.

Depends on: 1441922

Related discussion in Flatpak github: https://github.com/flatpak/flatpak/issues/2861

Apparently adding this to ~/.var/app/org.mozilla.firefox/config/fontconfig/fonts.conf helps:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
    <!-- Disable bitmap fonts. -->
    <selectfont><rejectfont><pattern>
        <patelt name="scalable"><bool>false</bool></patelt>
    </pattern></rejectfont></selectfont>
</fontconfig>

I don't understand this font stuff too well, but to me disabling bitmap fonts sounds more like a workaround rather than a proper fix. However looks like bitmap fonts specifically are affected.

This is how Flatpak Firefox renders github fonts on Debian 10:

https://seestieto.com/misc/bugs/FF-font-Flatpak.png

Vs. rendering on standard Debian Firefox:

https://seestieto.com/misc/bugs/FF-font-Debian.png

No longer depends on: 1441922

Going forward, Flatpak-related bugs will no longer be filed under RelEng, but instead in Core/Widget:GTK where folks have much more indepth knowledge on this. If the issues are RelEng related, they can be filed against Release Engineering :: Release Automation: Other and we'll take care of that.

Component: Release Automation: Flatpak → Widget: Gtk
Product: Release Engineering → Core
Target Milestone: --- → Future
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3

I seem to be affected now particularly severely by a variation of this issue in Debian 11 Bullseye and org.mozilla.firefox version 112.0: fonts in most GitHub content pages (frontpage exluded) were invisible.

The same workaround for ~/.var/app/org.mozilla.firefox/config/fontconfig/fonts.conf fixed the issue for me.

I suppose I have some bitmap font installed that somehow gets selected but doesn't actually render anything in this case.

(In reply to flux-github from comment #5)

I seem to be affected now particularly severely by a variation of this issue in Debian 11 Bullseye and org.mozilla.firefox version 112.0: fonts in most GitHub content pages (frontpage exluded) were invisible.

That sounds like bug 1827950, recently fixed in Nightly (and coming to Beta soon).

I can confirm that this bug is still reproducible with:
Debian 12 + Firefox 115.0.2 (mozilla-flatpak)

Affected font: Helvetica
(which is an alias to Nimbus Sans)

$ fc-match Helvetica
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"

How to reproduce:
Create sample html file and set font-family to "Helvetica".

<html>
  <head>
    <style>
      body { font-family: Helvetica; }
    </style>
  </head>
  <body>
    <h1>
      Lorem ipsum
    </h1>
    <p>
      Lorem ipsum dolor sit amet...
    </p>
  </body>
</html>

In a real world this issue is visible at Facebook website

Workaround:
create "fonts.conf" as mentioned in the comment #3

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

Attachment

General

Created:
Updated:
Size: