You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The installation of the package google-fonts breaks emoji usage via the Noto Color Emoji font in Kitty.
Steps To Reproduce
Steps to reproduce the behavior using home-manager:
In home.nix
fonts={fontconfig={enable=true;defaultFonts.emoji=["Noto Color Emoji"];defaultFonts.monospace=["Noto Sans Mono"];defaultFonts.sansSerif=["Noto Sans"];defaultFonts.serif=["Noto Serif"];};};
and add google-fonts in your installed packages.
After make a home switch, launch kitty --debug-font-fallback and copy paste any emoji from the web. You will get an ending message like this one:
[17,334] U+1f603 emoji_presentation Face(family=Noto Color Emoji, style=Regular, ps_name=NotoColorEmoji,
path=/nix/store/i2pl6gqpiflr96xdpmjp6d9nfiwnfxqh-home-manager-path/share/fonts/truetype/NotoColorEmoji-Regular.ttf,
ttc_index=0, variation_index=0x0 is_scalable=True, has_color=True, ascender=950, descender=-250, height=1200,
underline_position=-102, underline_thickness=51, strikethrough_position=307, strikethrough_thickness=51)
fast_data_types.FreeTypeError: Failed to load glyph_index=2273 load_type=1048580, with error: bad argument
And your pasted emoji will look like this
(Yes, you can't see it.)
Now, remove google-fonts from your packages, and install noto-fonts-color-emoji and noto-fonts. Make the home switch, and launch again kitty --debug-font-fallback. Copy-paste the emoji, and now the emoji is visible and works as expected. What is more, you can see in the ending logs something like this:
It will be because google-fonts is installing the COLRv1 version of the NotoEmoji. As far as I can tell this doesnt render in FreeType, at all. Attached is a simple C program to demonstrate.
Describe the bug
The installation of the package
google-fonts
breaks emoji usage via the Noto Color Emoji font in Kitty.Steps To Reproduce
Steps to reproduce the behavior using home-manager:
In
home.nix
and add
google-fonts
in your installed packages.After make a home switch, launch
kitty --debug-font-fallback
and copy paste any emoji from the web. You will get an ending message like this one:And your pasted emoji will look like this
![image](https://private-user-images.githubusercontent.com/55264980/349392922-23596d28-d0f8-4c4f-843b-d7cff029e856.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzk2MzYsIm5iZiI6MTczOTE3OTMzNiwicGF0aCI6Ii81NTI2NDk4MC8zNDkzOTI5MjItMjM1OTZkMjgtZDBmOC00YzRmLTg0M2ItZDdjZmYwMjllODU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA5MjIxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkMzExY2UzY2RlZDBkZTUzZjYzYjQzNDQxMmFmZTdkODRlNGMxYjFjMzkxODVjMjI5YTU0YTVhM2YyZGNjNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KANv2pH0NkheFGXjihr2VpTMjrmJ-g3hPEWLonPA8_0)
(Yes, you can't see it.)
Now, remove
google-fonts
from your packages, and installnoto-fonts-color-emoji
andnoto-fonts
. Make the home switch, and launch againkitty --debug-font-fallback
. Copy-paste the emoji, and now the emoji is visible and works as expected. What is more, you can see in the ending logs something like this:Please notice the differences between the font used (NotoColorEmoji vs NotoColorEmoji-Regular), as well as the parameters used on each one.
Expected behavior
Install
google-fonts
shouldn't break emoji usage.Additional context
Workarounds:
google-fonts
package, just use the configuration on the step 3.google-fonts
package, then addWarning:
In some cases (I'm not sure when/why), even having the correct configuration (step 3), you can end with emojis looking like this:
Try using the command
fc-cache -f
and check everything is working again withkitty --debug-font-fallback
.Possibly related:
#225541 and #230895
Notify maintainers
@manveru
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: