nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

Patched Fira Code height does not match original font on Windows Terminal

Open brneor opened this issue 3 years ago • 3 comments

🗹 Requirements

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

🎯 Subject of the issue

Experienced behavior:

Patched Fira Code shows different height from original font (and older release 'Fura Code') on Windows Terminal when set to specific font size. Happens with both regular and retina variant when font size is set to 9.

Expected behavior:

Patched Fira Code should match the original font height.

🔧 Your Setup

  • Fira Code Regular Nerd Font Complete Windows Compatible.ttf
    • Tried source downloaded from link and self patched.
  • Windows Terminal (release and preview)
  • Windows 11

★ Screenshots (Optional)

Original Fira Code: image

Patched Fira Code: image

Old FuraCode (from 2.1 release): image

brneor avatar Aug 19 '22 13:08 brneor

Suspect #761

Maybe that should also go into 2.2.0 🤔

Finii avatar Aug 19 '22 13:08 Finii

@Finii I can try this branch and report back

brneor avatar Aug 19 '22 13:08 brneor

@Finii patched the font using the suggested branch and everything looks almost fine now! Tried both regular and retina variants.

image

FiraCode NF Retina still looks of in bold (but also old FuraCode).

Regular: image

Retina: image

brneor avatar Aug 19 '22 14:08 brneor

@Finii @ryanoasis this got partially fixed in a recent release. The bold issue in "Retina" variant still persists. Just FYI.

brneor avatar Jan 19 '23 12:01 brneor

Thanks for the feedback.

Finii avatar Jan 27 '23 15:01 Finii

Marked this 3.0.0 to not forget it :grimacing:

Finii avatar Jan 27 '23 15:01 Finii

Ah, I think now I get it...

You know that Retina is just a weight, like Regular, Light, Bold, or Heavy?

Plus only Regular, Italic, Bold and BoldItalic form a classic RIBBI group.

If you use Retina the application does not have a Bold version of that. It either has to create one on the fly (also done with missing Italic variants that are Obliqued automatically if need be), or you need to have a separate setting for 'which font to take for <Bold>'.

From the images it seems that Windows Terminal takes some backup font instead.

As there is no Retina-Bold (whatever that would mean, its the same as to say the weight is Light-Heavy?!), there is nothing we can do here.

With some terminals you can adjust all 4 fonts individually in the settings. But I guess that is not possible with Windows Terminal. What one could do is creating a RIBBI group from Retina and Bold, but that would involve changing the font's metadata.

Then I tried to output bold text in the ordinary Windows Terminal and could not manage it at all. There is the 'Use really bold and not bright color' setting, but that still did not work.

So I can not really reproduce, but Retina just does not have an associated 'Bold', whatever the Terminal is doing in your case. What does it do if you select a script font that does not have bold neither italic?

I fear the problem in your case is that you use Fedora in this Windows Linux Subsystem, and that muddles up all the font engines (I guess).

I take this off 3.0.1 again, and am inclined to close it. But maybe you have more information.

Finii avatar May 08 '23 14:05 Finii

@Finii thank you for the explanation.

I tried to reproduce the issue again so I could provide more information but looks like it does not happen in v3.0... But IIRC, it happened in Windows Terminal when using just powershell.

brneor avatar May 08 '23 15:05 brneor

I searched Windows Terminal and there we several (closed) Issues about BOLD, maybe it was a bug there.

So I close this now, feel free to reopen if it re-surfaces :-)

Finii avatar May 08 '23 16:05 Finii

With closing we are in the one digit Issues range :tada:

image Bugs of Nerd Fonts and the time to close them; left side is Dec. 2014, right side is May 2023

image Zoom into last days

Finii avatar May 08 '23 16:05 Finii

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[bot] avatar Nov 13 '23 00:11 github-actions[bot]