Open maxbrunet opened 2 years ago
I can't seem to use alias
and prefer
to set a font to a higher priority for sans-serif
over DejaVu.
Can you reproduce with pango-view --text="ππ"
? It might be an app-specific issue.
For my part, I cannot reproduce with pango-view --text="ππ" --font=monospace
, but I cannot get it to display DejaVu with pango-view --text="ππ" --font='DejaVu Sans'
either, so it may not be a valid test.
I have seen emoji issues in Firefox too, it usually does not fallback to DejaVu tho, but something the website defines (e.g. emojipicker.com)
Here's why this is happening, it seems. These options set the defaults in fontconfig configuration in a way that is not trivial to override. I simply set them all to empty and made sure I have my own config.
This is a bug. Here's my workaround:
I rejected it using font-manager
.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- Generated by Font Manager. Do NOT edit this file. -->
<fontconfig>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family">
<string>DejaVu Sans</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig>
Describe the bug
The DejaVu fonts seem to contain emojis and take priority on Noto Color Emoji:
I have removed the default fonts to try to work around it, but
dejavu_fonts.minimal
is still there as it seems to come withfontconfig
:https://github.com/NixOS/nixpkgs/blob/3c5ae9be1f18c790ea890ef8decbd0946c0b4c04/pkgs/development/libraries/fontconfig/default.nix#L61
Steps To Reproduce
fc-match -s monospace
Expected behavior
Only emojis from Noto Color Emoji should be displayed
Screenshots
Additional context
I noticed that while using Alacritty, the loaded fonts can be observed with verbosity (
alacritty -vvv
), for example launch it and paste an emoji into it:For now, I work around it by adding the
emoji
family to the other preferred font families:Notify maintainers
Metadata
"x86_64-linux"
Linux 5.10.113, NixOS, 21.11 (Porcupine)
yes
yes
nix-env (Nix) 2.3.16
"nixos-21.11.337422.3c5ae9be1f1, nixos-hardware, nixos-unstable-22.05pre375061.c777cdf5c56"
/nix/var/nix/profiles/per-user/root/channels/nixos