kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
22.72k stars 925 forks source link

Apple Color Emoji not found on kitty +list-fonts #7307

Closed hanoii closed 2 months ago

hanoii commented 3 months ago

It's very likely this is not a bug, but I am confused. I've searched the issues and the web and there's mentions of being able to use this font, as well as Noto Color Emoji, but neither is picked up by kitty +list-fonts. So I guess they aren't monospace, is that so? Is there any way I can use emoji on osx?

kitty 0.33.1 (a5fea33757) created by Kovid Goyal
Darwin Ariels-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
ProductName:        macOS ProductVersion:       14.4.1 BuildVersion:        23E224
kovidgoyal commented 2 months ago

emoji fonts are fallback fonts. list-fonts lists only fonts that are capable of being used as primary fonts. Emoji's will be rendered automatically using a fallback font regardless of what primary font is set.

hanoii commented 2 months ago

Ok, I tried following this up more with this particular character "\U2139" is not find by any fallback, which I find it somewhat odd, it is supported by Apple Color Emoji.

This character is ℹ️️ which is pretty basic.

[094 23:37:39.365275] Symbol map: U+e000-U+e00a,U+ea60-U+ebeb,U+e0a0-U+e0c8,U+e0ca,U+e0cc-U+e0d4,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+f000-U+f2e0,U+f300-f372,U+f400-U+f532,U+f0001-U+f1af0 Symbols Nerd Font Mono is invalid, ignoring
[094 23:37:39.635284] Preloaded font faces:
[094 23:37:39.635309] normal face: /Users/ariel/Library/Fonts/JetBrainsMono-Medium.ttf
[094 23:37:39.635315] bold face: /Users/ariel/Library/Fonts/JetBrainsMono-Bold.ttf
[094 23:37:39.635319] italic face: /Users/ariel/Library/Fonts/JetBrainsMono-MediumItalic.ttf
[094 23:37:39.635323] bi face: /Users/ariel/Library/Fonts/JetBrainsMono-BoldItalic.ttf
[094 23:37:39.635328] Symbol map faces:
[094 23:37:39.635334] /Users/ariel/Library/Fonts/SymbolsNerdFontMono-Regular.ttf
U+2139 
The font chosen by the OS for the text: U+2139 is  but it does not actually contain glyphs for that text
ValueError: character U+656e6f4e is not in range [U+0000; U+10ffff]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "lib/python3.11/kitty/boss.py", line 1580, in on_focus
SystemError: <method 'get' of 'dict' objects> returned a result with an exception set

I also found the first about nerd font odd (Symbols Nerd Font Mono is invalid, ignoring), as I took it from the faq. I am using v.3.1.1 of the Nerd Font Symbol file, but I wonder what is wrong. The Nerd Font is still used though.

And finally, if I add

symbol_map U+2139 Apple Color Emoji It does work.

hanoii commented 2 months ago

Ah, I now think this is a dupe of #7249 as this also started to happen on that version

hanoii commented 2 months ago

I wonder if you can comment on the symbol map not working for Nerd Font

hanoii commented 2 months ago

Added #7308 for the above, we can leave this one be.