Closed Bug 1561468 Opened 5 years ago Closed 4 years ago

Firefox as a Snap for Linux uses a really ugly Helvetica font

Categories

(Core :: Widget: Gtk, defect)

67 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1534270

People

(Reporter: bugzilla.mozilla, Unassigned)

Details

Attachments

(1 file)

Attached image fonts.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

Open https://github.com/m-svo

Actual results:

All text is heavily pixelated.
Relevant css:
body {
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
font-size: 14px;
line-height: 1.5;
}

Expected results:

Text should display fine
Firefox should fall back to Arial which is present on the system.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

Affected OS: Debian 9.9
Issue is not reproduced on Ubuntu 19.04

This is likely an issue with the font configuration on the Debian system. What font does the browser report that it is using for the text here? Right-click on one of the elements (e.g. "Overview") and choose Inspect Element from the pop-up menu, and then select the Fonts panel in the right-most pane of the inspector; this will show the name of the font that's being used.

Flags: needinfo?(m.svobonas)

Firefox installed as Snap package shows "Helvetica" font
I also checked Firefox provided by Debian (60.7.1) and installed as system package and it shows "NimbusSanL-Regu" for the same element. Font is not pixelated in 60.7.1 installed as system package, it only happens in Snap package.

Flags: needinfo?(m.svobonas)

I don't know much (anything, really) about Snap packages, but I'm guessing this provides a self-contained environment that may not have the same font configuration as the host operating system. The "Helvetica" font that's present in the Snap environment is apparently configured to not use antialiasing (this may be controlled through fontconfig options), or perhaps it's even a bitmap font?

How does it look if you try to use that font at much larger sizes? E.g., try

data:text/html,<div style="font: 80px Helvetica">Hello World

and see if the font scales smoothly.

this provides a self-contained environment that may not have the same font configuration

Yes. Unfortunately, this is where my knowledge of Snap ends.

How does it look if you try to use that font at much larger sizes?

It looks fine at 50px and above.

I checked before reporting it here and as I can see Firefox Snap is published by Mozilla:

$ snap list
Name                     Version                     Rev   Tracking  Publisher         Notes
firefox                  67.0.4-1                    232   stable    mozilla✓          -

Although if Firefox as Snap is only supported in Ubuntu (since both Snaps and Ubuntu are developed by Canonical), feel free to close this report, and thanks for helping, maybe I can ask Debian to check this with the info you provided.

(In reply to m.svobonas from comment #5)

this provides a self-contained environment that may not have the same font configuration

Yes. Unfortunately, this is where my knowledge of Snap ends.

How does it look if you try to use that font at much larger sizes?

It looks fine at 50px and above.

That makes me suspect that perhaps the font is configured to use bitmap faces at smaller sizes, and then switches to an outline format (maybe it's an old PostScript Type1 font?) at larger sizes. Or if it's a TrueType/OpenType font, it has a 'gasp' table that calls for non-antialiased rendering at smaller sizes, though 50px seems a very large threshold to use there.

I checked before reporting it here and as I can see Firefox Snap is published by Mozilla:

$ snap list
Name                     Version                     Rev   Tracking  Publisher         Notes
firefox                  67.0.4-1                    232   stable    mozilla✓          -

Although if Firefox as Snap is only supported in Ubuntu (since both Snaps and Ubuntu are developed by Canonical), feel free to close this report, and thanks for helping, maybe I can ask Debian to check this with the info you provided.

If the Firefox Snap package is created by Mozilla, there's probably someone who can look into how it is configured and perhaps fix the font setup there. I don't think this is really a Core:Layout bug, it's an issue with the Snap package, but I'm not sure who is responsible for that, or knows details about it; moving this to Firefox:Untriaged in the hope that it can be directed to the right people.

Component: Layout: Text and Fonts → Untriaged
Product: Core → Firefox
Summary: Firefox as a Snap for Linux does not fall back to installed font → Firefox as a Snap for Linux uses a really ugly Helvetica font

Hey Olivier and Ken!

Are you guys familiar with font issues on Snap packages? I don't know if this issue only impacts Firefox.

Flags: needinfo?(olivier)
Flags: needinfo?(ken.vandine)

We'll need to look into this more closely. The fonts scale fine on Ubuntu. I'll install debian in a VM to see what's going on.

I have a Debian 10 unstable (sid) VM and just checked, the issue is there too.

I did some poking around in a debian 10 VM. I think the issue is the default fonts on debian aren't bundled in the snap. I think either additional font packages should be staged in the snap or fix this bug and take advantage of the GNOME content snap which probably includes all the fonts needed.

Flags: needinfo?(olivier)

Hi, I'm switching the component for it to Widget:GTK, since this doesn't belong in Layout and Fonts I think this is the next best thing. Please move it to a more suitable component if its not the correct one. Thank you

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I reported a similar issue but connected with Flatpak at bug 1629811. Mark it as a duplicate if the same solution is applicable.

(In reply to Ken VanDine from comment #10)

or fix this bug and take advantage of the GNOME content snap which probably includes all the fonts needed.

Thanks for the input! Bug 1534270 has landed and there's been no activity on this current bug, since then. I'm going to mark this bug as duplicate. Feel free to reopen it if you still hit that issue.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(ken.vandine)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: