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
46.88k stars 2.68k forks source link

font fallback not support ligature #15939

Closed d1y closed 1 month ago

d1y commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

My config:

{
  "ui_font_family": "Menlo",
  "buffer_font_family": "Menlo",
  "ui_font_fallbacks": [
    "JetBrainsMono Nerd Font",
    "MonacoLigaturized Nerd Font Mono"
  ],
  "buffer_font_fallbacks": [
    "JetBrainsMono Nerd Font",
    "MonacoLigaturized Nerd Font Mono"
  ],
  "buffer_font_features": {
    "calt": true,
    "zero": true
  },
  "ui_font_features": {
    "calt": true,
    "zero": true
  }
}

The nerd font symbol display normal It seems to support ligature 👀

image

Environment

Zed: v0.148.0 (Zed Nightly 990774247ecb61ddf69f0325d28eb3b203fc3699) OS: macOS 15.0.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


JunkuiZhang commented 1 month ago

The enabled font features won't apply to the fallback fonts. The fallback is only used when some codepoints not supported by the original font, then render them using the specified fallback, that's why it's called "fallback". AFAIK, if you want a font that doesn't support ligatures to support ligatures, you can try Ligaturizer. I used Ligaturizer in the past to enable ligature support for Ubuntu Mono.