Skip to content
This repository has been archived by the owner on Nov 10, 2018. It is now read-only.

[Firefox 55] gfx.font_rendering.fontconfig.fontlist.enabled workaround no longer works #83

Open
kj-sh604 opened this issue Aug 9, 2017 · 10 comments

Comments

@kj-sh604
Copy link

kj-sh604 commented Aug 9, 2017

Font Version: 1.3
Operating System: Arch Linux

The gfx.font_rendering.fontconfig.fontlist.enabled flag for about:config in firefox is no longer supported in the latest stable build of firefox (55.0-1). Related changes can be found here:

https://bugzilla.mozilla.org/show_bug.cgi?id=1119128
https://bugzilla.mozilla.org/show_bug.cgi?id=1285533

Is this workaround officially dead?

@13rac1
Copy link
Owner

13rac1 commented Aug 9, 2017

Yes. I'm not sure of a solution for FF 55+ right now.

@abouvier
Copy link

What is the cause of the problem actually? Why this option solved the problem? Without it, the font appears to be bold. But is it still the Bitstream Vera font? Why the bold variant is showed instead of the regular one?

@jorgicio
Copy link

In fact, that parameter was removed in Firefox 55. So this won't work anymore.
It seems the problem is with dejavu, because when I didn't have this font installed, the rest was rendered flawlessly.

@Teyro
Copy link

Teyro commented Aug 17, 2017

I have the same problem here! So what can i do? Because i use Dejava fonts for my KDE Desktop :S

@coopsmoss
Copy link

Same issue here, driving me mad. How do I remove the font altogether?

@abouvier
Copy link

abouvier commented Aug 31, 2017

I finally managed to make the fonts identical to when the gfx.font_rendering.fontconfig.fontlist.enabled option was set to false. It also makes the configuration file simpler. All the <match> tags are replaced by <alias> tags in 56-emojione-color.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Sans</family>
    </prefer>
  </alias>
  <alias>
    <family>serif</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Serif</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Sans Mono</family>
    </prefer>
  </alias>

  <!-- Add emoji generic family -->
  <alias binding="strong">
    <family>emoji</family>
    <default>
      <family>EmojiOne Color</family>
    </default>
  </alias>

  <!-- Alias requests for the other emoji fonts -->
  <alias binding="strong">
    <family>Apple Color Emoji</family>
    <prefer>
      <family>EmojiOne Color</family>
    </prefer>
    <default>
      <family>sans-serif</family>
    </default>
  </alias>
  <alias binding="strong">
    <family>Segoe UI Emoji</family>
    <prefer>
      <family>EmojiOne Color</family>
    </prefer>
    <default>
      <family>sans-serif</family>
    </default>
  </alias>
  <alias binding="strong">
    <family>Noto Color Emoji</family>
    <prefer>
      <family>EmojiOne Color</family>
    </prefer>
    <default>
      <family>sans-serif</family>
    </default>
  </alias>
</fontconfig>

The result:

$ fc-match -s sans | head -n3
Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "EmojiOne Color" "Regular"
DejaVuSans.ttf: "DejaVu Sans" "Book"

This can also be shortened to:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Sans</family>
    </prefer>
  </alias>
  <alias>
    <family>serif</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Serif</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>EmojiOne Color</family>
      <family>Bitstream Vera Sans Mono</family>
    </prefer>
  </alias>
  <match>
    <test name="family" compare="contains">
      <string>emoji</string>
    </test>
    <edit name="family" mode="prepend" binding="same">
      <string>EmojiOne Color</string>
    </edit>
  </match>
</fontconfig>

@jorgicio
Copy link

jorgicio commented Sep 1, 2017

I confirm the fix works, so I created the patches for both emojione and twitter emoji font packages and fixed in Gentoo. Now the changes were upgraded for both packages in my repo.
Thanks!

@13rac1
Copy link
Owner

13rac1 commented Sep 1, 2017

@abouvier Thank you!

@jorgicio Do you mean you are making PRs?

I'll update both. I've been delaying making the last release of this project hoping Ranks would revert their license.

@jorgicio
Copy link

jorgicio commented Sep 1, 2017

@eosrei Not exactly, but I patched the sources on my Gentoo overlay. However, I can attach both patches if you want them. Also you can check them if you find some observations.
For Emojione: https://paste.pound-python.org/show/RWe7w3zkDalQLavOqFVi
For Twemoji: https://paste.pound-python.org/show/uUsDh2g3hT2uVeatnYaY/

@DeeDeeG
Copy link

DeeDeeG commented Feb 27, 2018

Would these patches improve the project?

I would be happy to apply them and make a PR, or anyone could add them with git am [insert filename-of-patch-file-here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants