Giter Site home page Giter Site logo

Comments (6)

13rac1 avatar 13rac1 commented on May 24, 2024

The emoji characters which need to be overridden are only in DejaVu Sans, they do not appear in DejaVu Serif or DejaVu Mono according to my tests with the fc-search-codepoint.py script from: http://unix.stackexchange.com/a/268286/157461

$ python fc-search-codepoint.py 😀
/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-BoldOblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/ttf-ancient-scripts/Symbola605.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Oblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-Oblique.ttf
/home/user/.local/share/fonts/TwitterColorEmoji-SVGinOT.ttf
/home/user/.local/share/fonts/EmojiOneColor-SVGinOT.ttf
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf

from emojione-color-font.

13rac1 avatar 13rac1 commented on May 24, 2024

Ok, this updated fonts.conf gives priority to DejaVu Serif and Mono:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
  <!--
  Make Emoji One Color the fallback font for sans-serif, serif, and
  monospace, but give priority to the DejaVu serif/monospace fonts
  since they do not contain any emoji.
  Override any specific requests for Apple Color Emoji.
  -->
  <match>
    <test name="family"><string>sans-serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Emoji One Color</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>DejaVu Serif</string>
      <string>Emoji One Color</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>monospace</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>DejaVu Sans Mono</string>
      <string>Emoji One Color</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>Apple Color Emoji</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Emoji One Color</string>
    </edit>
  </match>
</fontconfig>

Should fix the issue. I'm going to leave this in place a while to see if it causes any problems on my machine.

Test before and after with: https://raw.githubusercontent.com/eosrei/emojione-color-font/master/full-demo.html

Any other testers appreciated!

from emojione-color-font.

13rac1 avatar 13rac1 commented on May 24, 2024

😭 There are a few characters in DejaVuSerif and DejaVu Sans Mono too. Not many, but I need to change them also.

from emojione-color-font.

13rac1 avatar 13rac1 commented on May 24, 2024

Giving priority to DejaVu Serif or Mono won't fix this issue. I'm closing it to defer to the actual solution/workaround in #17

from emojione-color-font.

0matgal0 avatar 0matgal0 commented on May 24, 2024

A good workaround is to actually spoof the EmojiOne as Segoe UI Emoji. A lot of pages with emoji put Segoe in their CSS. Here how getemoji.com looks like with segoe installed:

image

As you can see no dejavu here.

from emojione-color-font.

13rac1 avatar 13rac1 commented on May 24, 2024

Yes, that's the method used in the provided font config https://github.com/eosrei/emojione-color-font/blob/master/linux/fontconfig/56-emojione-color.conf#L135

from emojione-color-font.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.