13rac1 / emojione-color-font

End of Life. Switch to https://github.com/eosrei/twemoji-color-font
Other
914 stars 46 forks source link

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

Open kj-sh604 opened 7 years ago

kj-sh604 commented 7 years ago

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 commented 7 years ago

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

abouvier commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

coopsmoss commented 7 years ago

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

abouvier commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

@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 commented 6 years ago

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.