-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for COLRv1 fonts #7140
Comments
Thanks for so prompt reply! It indeed works with Segoe UI Emoji, but no luck with COLRv1 variant Noto Color Emoji: kitty --config=None --debug-font-fallback -o 'symbol_map U+1f63a Noto Color Emoji' sh -c 'printf "\U1f63a"; read' Also I noticed that the Segoe UI Emoji displayed by Kitty (left) is different from the one in GTK (right): This is most likely because the Segoe UI Emoji is a hybrid font that supports both COLRv1 and COLRv0, and Kitty actual displayed COLRv0 glyphs. |
Maybe the COLRv1 version share the same font name COLRv1 (packaged by the PKGBUILD):pkgname=noto-color-emoji
pkgver=2.042
pkgrel=1
epoch=1
pkgdesc='Google Noto color emoji font using COLRv1'
arch=(any)
url='https://www.google.com/get/noto/'
license=(custom:OFL)
provides=(noto-fonts-emoji emoji-font)
conflicts=(noto-fonts-emoji)
source=(
NotoColorEmoji.ttf::https://github.com/googlefonts/noto-emoji/raw/v$pkgver/fonts/Noto-COLRv1.ttf
LICENSE::https://github.com/googlefonts/noto-emoji/raw/v$pkgver/LICENSE
)
sha256sums=('d5ce808f06f4776023202c22441d03d7e57f8980091d2107404438592f2b62f6'
'c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4')
package() {
mkdir -p "$pkgdir"/usr/share/fonts/noto
install -m644 NotoColorEmoji.ttf "$pkgdir"/usr/share/fonts/noto/
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
} |
Well given that the distro packaged fonts include color bitmaps, whats the motivation for supporting rendering of SVG? It's much slower/wasteful of CPU cycles. |
Well, I would have thought that with FreeType supporting COLRv1, Kitty could easily support it like COLRv0. Thanks for your hard work! |
You are welcome. If there is ever a reasonably widely used font that supports only COLRv1 without COLRv0 fallbacks we can reconsider, but as it stands I dont think the performance hit is worth it. Using pre-rendered bitmaps for emoji works fine. |
And just for the record, it takes approx 1200 lines of C to render a COLRv1 glyph and thats using the facilities already provided by the cairo library. See for example https://fossies.org/linux/firefox/gfx/cairo/cairo/src/cairo-colr-glyph-render.c Definitely not worth the effort. |
I have enabled support for COLRv1 fonts by depending on the cairo library for rendering them (was about 300 lines of code in kitty). There is now a usecase for these as kitty supports multiple text sizes, see #8226. The support is in the cell branch will be merged to master eventually. |
Is your feature request related to a problem? Please describe.
Kitty won't display COLRv1 (emoji) fonts.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: