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

Italic and others not monospaced, according to fontconfig. #130

Open
timtro opened this issue Oct 15, 2021 · 0 comments
Open

Italic and others not monospaced, according to fontconfig. #130

timtro opened this issue Oct 15, 2021 · 0 comments

Comments

@timtro
Copy link

timtro commented Oct 15, 2021

Thanks in advance. Forgive me if I've missed something silly.

I just downloaded a zip of the 1.2 release and tried to use it with Kitty terminal, which only uses monospace fonts. Long-story-short, it seems that the italic face is failing fontconfig's test for monospace font:

> fc-list : family spacing outline scalable | grep -i "hasklig"Hasklig:spacing=100:outline=True:scalable=True
Hasklig:outline=True:scalable=True
Hasklig,Hasklig Black:spacing=100:outline=True:scalable=True
Hasklig,Hasklig Semibold:spacing=100:outline=True:scalable=True
Hasklig,Hasklig Light:outline=True:scalable=True
Hasklig,Hasklig Semibold:outline=True:scalable=True
Hasklig,Hasklig Light:spacing=100:outline=True:scalable=True
Hasklig,Hasklig Medium:outline=True:scalable=True
Hasklig,Hasklig Medium:spacing=100:outline=True:scalable=True
Hasklig,Hasklig ExtraLight:spacing=100:outline=True:scalable=True

Or likewise:

> fc-list :mono family | grep -i "hasklig"
Hasklig
Hasklig,Hasklig Black
Hasklig,Hasklig Light
Hasklig,Hasklig Semibold
Hasklig,Hasklig Medium
Hasklig,Hasklig ExtraLight

I don't know anything about fonts, but it looks like fc uses some property called 'advances' to rule a font FC_MONO? So if the advances of each glyph are all "approximately equal" then the font is monospace:
https://github.com/behdad/fontconfig/blob/5b41ded2b0ddb98a07ac86264b94403cb7a0fd82/src/fcfreetype.c#L2348

I'm not even sure this is a bug, but let me know if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant