Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corrupted fonts in Firefox #37

Closed
wants to merge 3 commits into from
Closed

Conversation

nazar-pc
Copy link

@nazar-pc nazar-pc commented Mar 5, 2018

Fixes #21

@13rac1
Copy link
Owner

13rac1 commented Mar 11, 2018

Hi! Thank you for this PR! Doubly thanks for following the git commit message standards.

Can you summarize/explain in the first commit (via git rebase -i) how and why this change fixes the config? I'm testing this today.

This basically makes `Twitter Color Emoji` a preferable serif,
sans-serif and monospace font with fallback to corresponding variants
of `DejaVu *` for non-emoji characters. This way we don't need to use
`Bitstream Vera` and can still have all of colored emoji characters.
Bitstream Vera is not used/needed anymore, so readme,
tests and configs were adjusted accordingly.
@nazar-pc
Copy link
Author

Added explanation to commit message, hopefully it is enough

@13rac1
Copy link
Owner

13rac1 commented Mar 11, 2018

Sorry. This doesn't work. It will re-open these cans of worms: 13rac1/emojione-color-font#25 and 13rac1/emojione-color-font#16 Looks like VLC is fixed though: 13rac1/emojione-color-font#5 More details into the hours/days of research I've done.

Your branch

$ sudo dpkg -i fonts-twemoji-svginot_1.4-1_all.deb
$ sudo apt install keepass2

newconfig

Current V1.3 config

$ sudo apt install fonts-twemoji-svginot 
<snip>
Get:1 http://ppa.launchpad.net/eosrei/fonts/ubuntu xenial/main amd64 fonts-twemoji-svginot all 1.3-1

oldconfig

I've actually tried the fix described in #19 too, since your change is so close. The difference is: <alias binding="strong"> vs <alias> It doesn't break keepass2, but does break emoji selection in general because they don't have high enough priority.

@nazar-pc
Copy link
Author

nazar-pc commented Mar 11, 2018

Interesting, I'd say this is a bug in mentioned programs, but, obviously, they are out there and it is not fair to expect all of them to be fixed any time soon.

I think in this case it would be better not to offer any default config at all, but instead suggest a couple of typical configs like current default and one that is provided in this repository for people to choose from. Otherwise some apps will be broken.

P.S. Genuinely disappointed by the state of fonts system in Linux 😢

@13rac1
Copy link
Owner

13rac1 commented Mar 11, 2018

I'd say this is a bug in mentioned programs,

True, but one of those is Chrome

I think in this case it would be better not to offer any default config at all, but instead suggest a couple of typical configs like current default and one that is provided in this repository for people to choose from. Otherwise some apps will be broken.

The problem is if I do that I will get piles of questions about why this doesn't work. The vast majority of users do not care about custom fonts and just want to see the emoji characters work. I am not building this for power users and, in fact, much of my original goal doing the projects in the first place is complete.

Since I am sun-setting the emojione-color-font project shortly, it'll be less hassle. Hmm.. Perhaps I could make a separate no-config deb?

P.S. Genuinely disappointed by the state of fonts system in Linux

What's funny is Linux fonts are so much more configurable than Mac/Windows. The only problem is this glyph selection issue. Both Mac/Windows workaround it by not having emoji characters in their default fonts.

@nazar-pc
Copy link
Author

why this doesn't work

Technically, it doesn't work properly either way, so you're in somewhat awkward position here and now I understand that you've chosen the approach that causes less harm.

Perhaps I could make a separate no-config deb?

This will work for me, it is so much easier to add something that override.

I think even better would be to have fonts-twemoji-svginot that depends on fonts-twemoji-svginot-base.

fonts-twemoji-svginot-base would have everything with config as below and fonts-twemoji-svginot will depend on fonts-twemoji-svginot-base with one more config file with rest of current settings for those who prefer it:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- Add emoji generic family -->
  <alias binding="strong">
    <family>emoji</family>
    <default><family>Twitter Color Emoji</family></default>
  </alias>

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

The only problem is this glyph selection issue

Looks like a toolkit issue and some are simply not as advanced as the others.

Both Mac/Windows workaround it by not having emoji characters in their default fonts

Do you think it is viable to make the same happening for Linux? Maybe you're aware of open issues somewhere?

@nazar-pc nazar-pc closed this Mar 11, 2018
@13rac1
Copy link
Owner

13rac1 commented Mar 11, 2018

Closed...
😞 I wish it worked!

Do you think it is viable to make the same happening for Linux? Maybe you're aware of open issues somewhere?

13rac1/emojione-color-font#17 (comment) Is where I first documented the idea. I haven't heard of it elsewhere.

This means a fork of DejaVu Sans is probably the answer.

@13rac1
Copy link
Owner

13rac1 commented Mar 11, 2018

This may be relevant too: 13rac1/emojione-color-font#40

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

Successfully merging this pull request may close these issues.

None yet

2 participants