zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
43.99k stars 2.36k forks source link

Use a HarfBuzz based text system #13951

Open mikayla-maki opened 1 month ago

mikayla-maki commented 1 month ago

Our current text system:

Let's replace it with HarfBuzz

jackpot51 commented 1 month ago

Please consider working with me on cosmic-text support for any features you need. If you directly use harfbuzz you will need to implement your own layout and font fallback code, which is not trivial.

panekj commented 1 month ago
  • Doesn't use fontconfig

This seems to be either untrue or an oversight in your usage of cosmic-text as it provides fontconfig feature that is enabled by default, it's backed by fontdb and not fontconfig library (so it doesn't link to it), doesn't support all of fontconfig, but some subset of it is supported.

Speykious commented 4 weeks ago

I'm reading that cosmic-text is more likely to continue being used here, but if you're considering harfbuzz, consider also using swash instead. There's also a complex demo of it (for context, this is a fork of mine that is more up-to-date).