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

Wrong size of the Fira Code glyphs #898

Closed
3 tasks done
mateusz-bajorek opened this issue Aug 29, 2022 · 13 comments
Closed
3 tasks done

Wrong size of the Fira Code glyphs #898

mateusz-bajorek opened this issue Aug 29, 2022 · 13 comments

Comments

@mateusz-bajorek
Copy link

🗹 Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have searched the FAQ for help
  • I have searched the Wiki for help

🎯 Subject of the issue

Experienced behaviour:

After upgrading from 2.1.0 to 2.2.1, the size of the glyphs in Windows Terminal is wrong (smaller) when using FiraCode font.

Expected behaviour:

The size of the glyphs is correct.

🔧 Your Setup

  • Fira Code Regular Nerd Font Complete Windows Compatible.ttf
    • either downloaded from the releases page or installed through scoop.sh
  • Windows Terminal
  • Windows 11

★ Screenshots (Optional)

Size of the glyphs when using release 2.1.0:
WindowsTerminal_2022-08-28_12-01-37

Size of the glyphs when using release 2.2.1:
WindowsTerminal_2022-08-28_12-01-48

Windows Terminal settings dialog:
WindowsTerminal_2022-08-29_10-14-28

@Finii
Copy link
Collaborator

Finii commented Aug 29, 2022

Can reproduce

grafik

means

@Finii
Copy link
Collaborator

Finii commented Aug 29, 2022

While this is confirmed, it is still open what one would expect.

There are people that want the fonts to be 'correct'.
'Correct' fonts are considered incorrect by Windows Terminal

Windows Terminal would reject the font anyhow, you need to check 'all fonts' so that you could take it.

This is kind of a political question. So there is no simple answer to it.

I leave this open, but the behaviour is 'as expected', the bad this is.

@Finii
Copy link
Collaborator

Finii commented Aug 29, 2022

Further explanation

We have 'normal' glyphs like letters or so, that have all the same width.
Then we have symbols like 'gitlab'.

We can combine them in three ways

  1. letters and symbols have the same width (true monospaced) (symbols feel 'small')
  2. symbols are wider -> NOT monospaced anymore obviously
  3. symbols pretend to be same width but 'secretly' protude out of the 'cell'

The first variant is Nerd Font Mono, and unchanged.
The Nerd Font non-Mono has been 3 for v2.1.0 and is now 2

The reason to switch to solution 2 is for all the people that use the font in applications and stuff (not in terminals).
For terminal users I guess solution 3 would be better.
But, well, ... most terminals except Windows Terminal handle 2 and 3 equally good.
You can read Howett's strong opinion on that in the comment linked above.

Another way would be for Nerd Fonts to supply not only two but three variants of each font.
But well, ... we should at least drop the Windows Compat versions then, which is of questionable usefullness anyhow.
You see, not so easy.

Edit: A much deeper explanation is in #764 (and maybe #731, further down), please consider reading that also.

Any comments welcome.

@Finii
Copy link
Collaborator

Finii commented Aug 29, 2022

Duplicate of #731, still current with v2.2.1.

@saumyajyoti
Copy link

saumyajyoti commented Aug 31, 2022

symbols pretend to be same width but 'secretly' protude out of the 'cell'

Is there a way we can generate this now with latest Source? Want to try locally.

@Finii
Copy link
Collaborator

Finii commented Aug 31, 2022

No, unfortunately. I started #900 to re-investigate and come up with a solution.

I just noticed that also fontforge's behavior changed, so patching with the v2.1.0 script yields other results now then before *sigh*.

But I guess this week.

@saumyajyoti
Copy link

I reverted change 59c45ba and ran locally. I am able to get IOSEVKA 16.0.2 working as intended.

Font Settings Win11
image

Terminal Win11
image

@Finii
Copy link
Collaborator

Finii commented Aug 31, 2022

Which fontforge version did you use? I noticed that with HEAD the behavior changed when removing the bearings.

What I mean: When patching with the commit reverted (as you did) I get center aligned glyphs (left and right bearings equal) instead of left aligned glyphs (left bearing = 0). Hmm. Maybe a mistake.

Edit: Add second paragraph

@saumyajyoti
Copy link

I used Version: 20220308.
Not sure how to confirm the left bearing value.
I use commandline: ffpython font-patcher -c -w -l --careful

@Finii
Copy link
Collaborator

Finii commented Aug 31, 2022

What is ffpyhon 😬

confirm the left bearing value

Just open the font with fontforge.
Left bearing is zero (all 'overhang' is on the right) (image taken from #764)

image

What I got yesterday:

image

(different symbol, because I did not do --complete but just the basic stuff)

But your glyphs seems to line up nicely left aligned:
image

@saumyajyoti
Copy link

Thanks. ffpython is python exe packaged in font-forge release. As the font patcher is w/o extension, windows does not run python by default, so running with python bundled with font-forge.

@Finii
Copy link
Collaborator

Finii commented Sep 1, 2022

@saumyajyoti You are right! Thanks! I do not know what went wrong when I tested it, but I did a fresh (manual) revert and it works.

Now exploring how to solve the Arch issue that the commit should have addressed in a different way.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants