Skip to content

Remove Adobe’s Helvetica font from fonts-x-org to work around Firefox issue #2935

Closed
wants to merge 1 commit into from

Conversation

pmenzel
Copy link
Collaborator

@pmenzel pmenzel commented Jul 28, 2023

Tested on sigusr2.

(Explanation in the commit message.)

…Firefox

This works around a Mozilla Firefox regression from 114.0 to 115.0.
Firefox was upgraded from 114.0 to 115.0 around July 5th, 2023, and
until now we had two problem reports. It’s actually a [regression][1]
[in][2] [pdf.js][3], used to display PDF files inside the browser.
Evince or other PDF viewers do not have the problem.

The problem is, that for PDF documents using Helvetica, but not
embedding the font, pdf.js chooses the X.Org font, despite Fontconfig
matching *Helvetica* to *Nimbus Sans L*:

    $ fc-match Helvetica
    n019003l.pfb: "Nimbus Sans L" "Regular"

As downgrading Firefox from 115.0.2 to 114.0 is unsupported by Mozilla
for profiles – a warning is shown, and you need to start it with
`--allow-downgrade` – remove the likely unused Helvetica fonts confusing
Firefox/pdf.js.

Resolves: #2933

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1845551
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1839860
[3]: https://github.com/mozilla/pdf.js/commit/53134c0c0bb2d19244dd8c31aa4e8e6d01a657e4
@pmenzel
Copy link
Collaborator Author

pmenzel commented Jul 28, 2023

@thomas was correct, NEdit indeed uses Helvetica by default, and removing the fonts changes the font too. Though I like that font better, a different solution needs to be found.

I couldn’t find a Fontconfig shipped by Firefox.

@pmenzel pmenzel closed this Jul 28, 2023
pmenzel added a commit to mariux64/mxtools that referenced this pull request Jul 28, 2023
[pdf.js commit 53134c0c0bb2 ([api-minor] Use a local font or fallback on
an embedded one (if it exists) for non-embedded fonts (bug 1766039))][1]
[breaks][3] [font selection in PDF documents][3], when the font is not
embedded and bitmap fonts, like X.Org fonts, are available. Work around
it by disabling bitmap fonts for Mozilla Firefox.

Suggested-by: Calixte Denizet <cdenizet@mozilla.com>
Resolves: mariux64/bee-files#2933

Copy commit message from [proposed (and rejected) bee-files commit][4]:

> This works around a Mozilla Firefox regression from 114.0 to 115.0.
> Firefox was upgraded from 114.0 to 115.0 around July 5th, 2023, and
> until now we had two problem reports. It’s actually a [regression][1]
> [in][2] [pdf.js][3], used to display PDF files inside the browser.
> Evince or other PDF viewers do not have the problem.
>
> The problem is, that for PDF documents using Helvetica, but not
> embedding the font, pdf.js chooses the X.Org font, despite Fontconfig
> matching *Helvetica* to *Nimbus Sans L*:
>
>     $ fc-match Helvetica
>     n019003l.pfb: "Nimbus Sans L" "Regular"
>
> As downgrading Firefox from 115.0.2 to 114.0 is unsupported by Mozilla
> for profiles – a warning is shown, and you need to start it with
> `--allow-downgrade` – remove the likely unused Helvetica fonts confusing
> Firefox/pdf.js.

[1]: https://github.com/mozilla/pdf.js/commit/53134c0c0bb2d19244dd8c31aa4e8e6d01a657e4
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1845551
[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1839860
[4]: mariux64/bee-files#2935
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant