Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect font selection with Iosevka TTC fonts #939

Closed
AlexKurisu opened this issue Dec 22, 2022 · 13 comments · Fixed by #941
Closed

Incorrect font selection with Iosevka TTC fonts #939

AlexKurisu opened this issue Dec 22, 2022 · 13 comments · Fixed by #941
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations

Comments

@AlexKurisu
Copy link

AlexKurisu commented Dec 22, 2022

Contour Terminal version

0.3.8.247

Installer source

something else (please specify below)

Operating System

Void Linux

Architecture

x86-64

Other Software

No response

Steps to reproduce

  1. Install Iosevka font, super-ttc version
  2. Set Iosevka Fixed as font family, regular weight
  3. Open terminal

Expected Behavior

Terminal should correctly select Iosevka Fixed Regular as a font (wezterm used for screenshot)
image

Actual Behavior

Terminal either incorrectly selects Iosevka Fixed Extralight or breaks rendering entirely
image

Additional notes

@AlexKurisu AlexKurisu added the bug Something isn't working label Dec 22, 2022
@AlexKurisu AlexKurisu changed the title Incorrect font selection with Iosevka fonts Incorrect font selection with Iosevka TTC fonts Dec 22, 2022
@AlexKurisu
Copy link
Author

Problem isn't reproducible with any other terminal, just Contour

@christianparpart
Copy link
Member

Hey. Many thanks for your interest and feedback on this behavior. We're actually "just" using fontconfig for matching fonts.

If there's anything to fix on our side, I'd like to get that included in a potential christmas release (hohoho!), but for that, maybe you can provide me with the little snipped from contour.yml that shows what you've configured to show that font.

Ideally also with a link to the font file you have downloaded?

I'll be trying to look into this ASAP.

And sorry for the inconviniences.

@christianparpart christianparpart added the fonts font rasterization and text shaping API and platform implementations label Dec 22, 2022
@AlexKurisu
Copy link
Author

Sure.
Iosevka TTC
contour.yml

@AlexKurisu
Copy link
Author

Also tested with st (which also just uses fontconfig) - everything is correct, so looks like it's not fontconfig problem

@christianparpart
Copy link
Member

@AlexKurisu thanks for the links. I'll check it out. But one thing ahead of time:

https://gist.github.com/AlexKurisu/94898cb3f881e1ac958cb25a519f085a#file-contour-yml-L294

Would you mind giving it a try to set this value from true to false? Fonts that are not strictly mono-spaced (and advertised as such) will be excluded otherwise.

@AlexKurisu
Copy link
Author

AlexKurisu commented Dec 22, 2022

@christianparpart tried to set strict_spacing to false. Nothing changed.

@christianparpart
Copy link
Member

Okay I can reproduce this. I'll look into it ASAP.

@Utkarsh-khambra
Copy link
Collaborator

Utkarsh-khambra commented Dec 22, 2022

If I install Iosevka from ttf files then these fonts work. But setting weight to ultra light doesn't work which is a weight option that Iosevka comes with.

@christianparpart
Copy link
Member

image

I think this is how it should look like instead. I'll create a PR soon, @AlexKurisu - are you also able to build from source?

@AlexKurisu
Copy link
Author

@christianparpart yes, I can

@christianparpart
Copy link
Member

Grreat. You can checkout the branch from #941 (run ./scripts/install-deps.sh first, but we don't have Voice Linux support in that script, maybe you can help us adding it?).

@AlexKurisu
Copy link
Author

Lol, sorry, I actually forgot that I didn't install Contour from Void repos but made a package myself

@AlexKurisu
Copy link
Author

@christianparpart #941 fixed the problem, thanks

christianparpart added a commit that referenced this issue Dec 22, 2022
christianparpart added a commit that referenced this issue Dec 22, 2022
christianparpart added a commit that referenced this issue Dec 22, 2022
Fixes loading TTC font files not honor which face to load within the collection (#939).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations
Projects
None yet
3 participants