-
Notifications
You must be signed in to change notification settings - Fork 48
-
Notifications
You must be signed in to change notification settings - Fork 48
Monospace fallback incorrect in Chrome with recommended font.conf #16
Comments
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 $ 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 |
Ok, this updated <?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! |
😭 There are a few characters in DejaVuSerif and DejaVu Sans Mono too. Not many, but I need to change them also. |
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 |
The DejaVu font family is based on the Bitstream Vera font family to provide greater unicode coverage. The only way to override the emoji it includes is to make the emoji font the primary system font. This shouldn't be a problem, but a number of programs do not correctly use font fallback resulting in font rendering errors everywhere: #1, #5, #16, #18, #19. This font.conf makes Bitstream Vera the default font for Serif, Sans-Serif, and Monospace font requests since it does not contain any Unicode Emoji characters. Emoji One Color font is the first fallback, followed by DejaVu to provide everything else. Test with: fc-match -s serif fc-match -s sans-serif fc-match -s monospace May be the solution for #17
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 |
Chrome uses a serif font to display monospace text when Emoji One Color is set as the default monospace font. It should use the next monospace font.
This is the correct display when the modified config is disabled making DejaVu Sans Mono the default:
The text was updated successfully, but these errors were encountered: