Giter Club home page Giter Club logo

Comments (7)

kovidgoyal avatar kovidgoyal commented on May 28, 2024 1

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.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 28, 2024

Works fine for me with Segoe UI Emoji which uses COLRv1

kitty --config=None --debug-font-fallback -o 'symbol_map U+1f63a Segoe UI Emoji' sh -c 'printf "\U1f63a"; read'

screenshot

from kitty.

unnamedname avatar unnamedname commented on May 28, 2024

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'

kitty-noto-emoji

Also I noticed that the Segoe UI Emoji displayed by Kitty (left) is different from the one in GTK (right):
kitty-segoe-emoji

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.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 28, 2024

screenshot
Works fine with Noto Color Emoji as well

kitty --config=None --debug-font-fallback -o 'symbol_map U+1f63a Noto Color Emoji' sh -c 'printf "\U1f63a"; read'

Presumably that has bitmap fallbacks too?

from kitty.

unnamedname avatar unnamedname commented on May 28, 2024

Maybe the COLRv1 version share the same font name Noto Color Emoji with the CDBT version packaged by most distros (assuming your system has the both installed).
Anyway, I suppose we could simply try to scale the interface large enough to determine if it is in CBDT or COLR format:
CBDT (packaged by Archlinux):
cat-cdbt

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
}

cat-colrv1

from kitty.

kovidgoyal avatar kovidgoyal commented on May 28, 2024

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.

from kitty.

unnamedname avatar unnamedname commented on May 28, 2024

Well, I would have thought that with FreeType supporting COLRv1, Kitty could easily support it like COLRv0.
Since the harms outweigh the benefits, it doesn't count as an enhancement and duplicates #2691.

Thanks for your hard work!

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.