zed icon indicating copy to clipboard operation
zed copied to clipboard

Unable to set "Iosevka Extended" as my editor font

Open IlyaBizyaev opened this issue 1 year ago • 25 comments

Check for existing issues

  • [X] Completed

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

IlyaBizyaev avatar Jul 10 '24 20:07 IlyaBizyaev

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

JunkuiZhang avatar Jul 20 '24 11:07 JunkuiZhang

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

IlyaBizyaev avatar Jul 20 '24 14:07 IlyaBizyaev

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

JunkuiZhang avatar Jul 20 '24 16:07 JunkuiZhang

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

IlyaBizyaev avatar Jul 20 '24 19:07 IlyaBizyaev

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

JunkuiZhang avatar Jul 21 '24 04:07 JunkuiZhang

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

IlyaBizyaev avatar Jul 21 '24 08:07 IlyaBizyaev

Still no visual difference:

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

JunkuiZhang avatar Jul 21 '24 09:07 JunkuiZhang

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/

IlyaBizyaev avatar Jul 21 '24 09:07 IlyaBizyaev

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

JunkuiZhang avatar Jul 21 '24 09:07 JunkuiZhang

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...

IlyaBizyaev avatar Jul 21 '24 09:07 IlyaBizyaev

Screenshot 2024-07-21 180704

I guess these extended things are something like font stretch?

JunkuiZhang avatar Jul 21 '24 10:07 JunkuiZhang

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

IlyaBizyaev avatar Jul 21 '24 10:07 IlyaBizyaev

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

Screenshot 2024-07-21 174249

JunkuiZhang avatar Jul 21 '24 11:07 JunkuiZhang

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.

IlyaBizyaev avatar Jul 21 '24 11:07 IlyaBizyaev

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

VortexFlickens avatar Jul 28 '24 14:07 VortexFlickens

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

sztomi avatar Aug 01 '24 10:08 sztomi

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.

JunkuiZhang avatar Aug 01 '24 11:08 JunkuiZhang

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

sztomi avatar Aug 01 '24 11:08 sztomi

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.

JunkuiZhang avatar Aug 01 '24 13:08 JunkuiZhang

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

unparadise avatar Sep 06 '24 04:09 unparadise

This "buffer_font_family": "Iosevka Fixed SS18" is working on Zed but not this one "buffer_font_family": "Iosevka Fixed SS18 Extended", and later one was working on VSCode.

Qazalbash avatar Dec 31 '24 19:12 Qazalbash

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!

github-actions[bot] avatar May 07 '25 07:05 github-actions[bot]

This is still an issue.

LawnGnome avatar May 07 '25 15:05 LawnGnome

Still happens. I guess the only way to work around this is to build a custom Iosevka build, with a custom name, and only install the Extended versions.

I have not tried this, because I build my custom Iosevka font using Nixpkgs fonts.packages with a private build plan, which builds both the Regular and Extended variants and installs both:

  fonts = {
    packages = with pkgs; [
      (iosevka.override {
        privateBuildPlan = builtins.readFile ../common/config/iosevka-lb;
        set = "lb";
      })
    ];
  };

leonbreedt avatar May 24 '25 09:05 leonbreedt

I have now tried to build a custom Iosevka.

The good news is, if you build a custom Iosevka build, you can configure it to only contain the Extended widths as the Normal width. This information was gleaned by using the Iosevka Customizer with Default width as 600 checked as well as unchecking other widths.

Here is a Gist containing a sample custom build that contains all widths, and then a custom build with the same glyph customizations that contains only the Extended width:

https://gist.github.com/leonbreedt/c430dd0baf09505c700d37526a6d98e7

I install both custom builds and use the extended build's family name for Zed buffers, and the other family name when I want the more compact widths elsewhere (e.g. for the UI):

  "ui_font_family": "Leosevka",
  "ui_font_size": 14,
  "ui_font_weight": 500,
  "buffer_font_family": "LeosevkaEx",
  "buffer_font_size": 15,
  "buffer_font_weight": 600,
  "terminal": {
    "font_family": "Leosevka",
    "font_weight": 500,
    "font_size": 13
  }

leonbreedt avatar May 26 '25 04:05 leonbreedt

Maybe we need another option to set the font width. Quoting from be5invis/Iosevka README.

2 widths (Normal and Extended)

Pagliacii avatar Aug 12 '25 06:08 Pagliacii

Yes, it looks like there's a distinct "width" field that Zed does not yet have a way to configure.

In CSS and in font-kit this is called "stretch".

It looks like some amount of support for this already exists in the lower-level libraries e.g. https://docs.rs/font-kit/latest/font_kit/properties/struct.Stretch.html but it's not hooked all the way through gpui and to a setting.

sourcefrog avatar Sep 06 '25 23:09 sourcefrog

font setting “Iosevka Extended” also does not work on Obsidian.

H-E3 avatar Nov 13 '25 07:11 H-E3