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
50.49k stars 3.13k forks source link

Unable to set "Iosevka Extended" as my editor font #14096

Open IlyaBizyaev opened 4 months ago

IlyaBizyaev commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

In VSCode, I have the following font configuration:

"editor.fontFamily": "'Iosevka Extended', 'monospace', monospace, 'Iosevka Extended Fallback'",

I tried to copy it to Zed, which suggested:

"buffer_font_family": "Iosevka-Extended",

But this setting is ignored, and the default font is used instead.

What works is:

"buffer_font_family": "Iosevka",

— but I don't like it :)

Environment

Zed: v0.143.6 (Zed) OS: Linux Wayland opensuse-tumbleweed 20240705 Memory: 62.5 GiB Architecture: x86_64

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 4 months ago

Can you try setting "buffer_font_family": "Iosevka Extended",?

IlyaBizyaev commented 4 months ago

Tried both with a space and with a dash, neither works :(

JunkuiZhang commented 4 months ago

Could you give me a link so that I can download this font and reproduce this issue?

IlyaBizyaev commented 4 months ago

You can try with: https://github.com/be5invis/Iosevka/releases/download/v30.3.3/SuperTTC-Iosevka-30.3.3.zip

It's the default version of the latest release: https://github.com/be5invis/Iosevka/blob/v30.3.3/doc/PACKAGE-LIST.md

JunkuiZhang commented 4 months ago

I tried with VSCode, it seems Iosevka Extended and Iosevka are the same. Did I miss anything?

https://github.com/user-attachments/assets/c4603f0d-01fd-4a86-9c9d-af5dda465f5a

IlyaBizyaev commented 4 months ago

On the recording, neither variant is actually applied to your VSCode, it falls back to some default font. Maybe you didn't install the font correctly, or your system doesn't support the TTC format — in which case you can try TTF: https://github.com/be5invis/Iosevka/releases/download/v30.3.3/PkgTTF-Iosevka-30.3.3.zip

JunkuiZhang commented 4 months ago

Still no visual difference:

https://github.com/user-attachments/assets/bc1cd724-2c5b-4a31-bac4-fbf814de450d

IlyaBizyaev commented 4 months ago

I'm not sure how to help with that...

Try following installation instructions for your system: https://github.com/be5invis/Iosevka?tab=readme-ov-file#installation

You don't have to record it if it doesn't look like on https://typeof.net/Iosevka/

JunkuiZhang commented 4 months ago

I see, VSCode needs to restart to read that font.

https://github.com/user-attachments/assets/c60f9d04-3253-412a-a379-0a7af84ce95d

On my case (win11), there is no font named Iosevka Extended or Iosevka-Extended

Screenshot 2024-07-21 174643

IlyaBizyaev commented 4 months ago

It is a width variant of the "Iosevka" font (which is what I guess "54" on your screenshot refers to). It matches the "9 x 3 x 2" scheme on https://typeof.net/Iosevka/, so Windows should be able to access all the variants. I wonder why VSCode doesn't in your case...

JunkuiZhang commented 4 months ago

Screenshot 2024-07-21 180704

I guess these extended things are something like font stretch?

IlyaBizyaev commented 4 months ago

I don't know how it's implemented :(

There's https://typeof.net/Iosevka/customizer, but it also just refers to them as "Widths".

Here's how it looks in my case:

2024-07-21 12-15-13.webm

JunkuiZhang commented 4 months ago

Can you find a font named Iosevka Extended in your font manager?

Screenshot 2024-07-21 174249

IlyaBizyaev commented 4 months ago

Not as a separate font, no, but I can find it among the 54 variants of the “Iosevka” font, referred to as “Expanded” here for some reason:

Снимок экрана_20240721_132729

That's in the System Settings of KDE Plasma 6.

VortexFlickens commented 3 months ago

I am also facing the exact same issue! Iosevka works but Iosevka-Extended and Iosevka-Medium-Extended doesn't

sztomi commented 3 months ago

I have a different setup (macOS and a custom Iosevka build), but I'm facing the same problem. Isn't this related to https://github.com/zed-industries/zed/issues/4850 ?

Could be a duplicate of https://github.com/zed-industries/zed/issues/5028

JunkuiZhang commented 3 months ago

From the codes, the buffer_font_family should be the family name you see in the font manager, such as Iosevka, rather than the font face name, such as Iosevka-Extended or Iosevka Extended.

sztomi commented 3 months ago

I just tried again and now it seems to work for me, even though the settings linter is complaining about it. But I can tell it's loading the right one because the default font does not have nerd icons:

image image
JunkuiZhang commented 3 months ago

I just tried again and now it seems to work for me, even though the settings linter is complaining about it. But I can tell it's loading the right one because the default font does not have nerd icons:

On macOS, you can use font names like Expanded, and CoreText will parse them into the correct font face for you.

unparadise commented 2 months ago

Have the same issue on Ubuntu. Has anyone found a solution to this yet?