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

CaskaydiaCove Font Does not Include Any Accent Characters #828

Closed
3 tasks done
manuth opened this issue Apr 28, 2022 · 30 comments
Closed
3 tasks done

CaskaydiaCove Font Does not Include Any Accent Characters #828

manuth opened this issue Apr 28, 2022 · 30 comments

Comments

@manuth
Copy link

manuth commented Apr 28, 2022

🗹 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 behavior:
The CaskaydiaCove Font linked in the release 2.1.0 doesn't contain German umlauts.

Expected behavior:
The CaskaydiaCove Font should contain German umlauts as the original Cascadia Code Font does contain them.
Furthermore, running fontforge -script font-patcher src/unpatched-fonts/CascadiaCode/Regular/CascadiaCode-Regular.otf -c --mono --out . generates a font which contains German umlauts as well.

Example symbols:
German Umlauts are affected.
However, I'm not sure whether there are more accent characters which are affected.

  • German umlauts
    äöü

Update: All accent characters are missing

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • Windows Terminal
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • Windows

★ Screenshots (Optional)

image
Ordinary characters compared to their accent counterparts

image
The same in Windows Terminal

@manuth manuth changed the title CaskaidyaCove Font Does not Include German Umlauts CaskaydiaCove Font Does not Include Any Accent Characters Apr 29, 2022
@manuth
Copy link
Author

manuth commented Apr 29, 2022

I found myself able to work around this issue by doing the following:

  • Install fontforge
  • Clone this repository
  • (optional) merge PR font-patcher: Make Nerd Fonts Monospaced Again #764 (a manual merge commit is necessary)
  • Run the following command:
    fontforge -script ./font-patcher ./src/unpatched-fonts/CascadiaCode/Regular/CascadiaCode-Regular.otf -c --out .

This will create a Caskaydia font containing all available glyphs and all accent characters. If you decide to not merge #764, glyphs with doubled width might look very tiny in some terminal emulators (such as Windows Terminal).

@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

Just started to check your report out.
I guess it is already fixed in Release 2.2.0, https://github.com/ryanoasis/nerd-fonts/releases/tag/2.2.0-RC

@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

As expected this is fixed in 2.2.0.

If interested in Cascadia, maybe #723 is useful, which's artifacts can be found here: https://github.com/Finii/nerd-fonts/tree/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode

Thanks for the report!
I close this, because it has already been addressed (and the 2.1.0 release will not be changed retroactively).

@Finii Finii closed this as completed Apr 29, 2022
@Finii Finii added the wontfix label Apr 29, 2022
@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

Btw, technically, Cascadia constructs the umlauts by overlaying the base glyph with the two-dots-only-glyph. Well the font rendering engine has to do that.
This is different from more simple fonts that have a dedicated single glyph for umlauts etc.

@manuth
Copy link
Author

manuth commented Apr 29, 2022

Thanks a lot for having a look at it 😄
I can confirm that accent characters work with version 2.2.0.

@manuth
Copy link
Author

manuth commented Apr 29, 2022

As expected this is fixed in 2.2.0.

If interested in Cascadia, maybe #723 is useful, which's artifacts can be found here: https://github.com/Finii/nerd-fonts/tree/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode

Thanks for the report! I close this, because it has already been addressed (and the 2.1.0 release will not be changed retroactively).

I btw just tried your patched font and it's working out great 😄

I just noticed, that the circular powerline character is off by 1 pixel - this is the case for the 2111.01 patch (when applying my workaround to your patch), the CaskaydiaCove font in the 2.1.0 package and the one produced using the workaround I've posted:

image

I also tried the --adjust-line-height parameter.

@Finii is this something worth reporting?

@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

I will look into that maybe today afternoon.
Some PR comes to my mind, hmm, searching

@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

This ... #661 (comment)

Maybe you can try #780?

@manuth
Copy link
Author

manuth commented Apr 29, 2022

This ... #661 (comment)

Maybe you can try #780?

Thanks for the rapid answer!
Though, it looks quite similar, it doesn't fix my 1 pixel gap. What's funny is that I can see this gap only w/ Windows Terminal's default font size (which is 12)
I can't see it when setting a lower or higher font size.

@Finii
Copy link
Collaborator

Finii commented Apr 29, 2022

Hmm. If you are bored you could try #761, as that fixes some font rendering engine internal rounding errors.
But I'm not sure that is really related. If it would be related also other sizes like 9 pt or so should have problems.
So ... will try to find time in the afternoon and fire up my Windows VM ;)

@manuth
Copy link
Author

manuth commented Apr 29, 2022

Thanks - I was quite bored during the last few minutes, so I just gave it a go 😂
Didn't work - it's just a 1px gap... but even though, I just can't manage to unsee it

Thanks for your great support tho 😄

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Finally came round to simulate your prompt:

image

This is 16 pt. Caskaydia Cove NF. Lets see 12 pt:

image

At 400%:

image

GAP! ... I have no clue which Caskaydia it is lets check...

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

I guess the screenshots are not exact enough, because I connect to the Windows Box via RDP and take the screenshot on my side of the connection - instead directly on the Windows side. RDP is anyhow bad for this, because the 'simulated graphics card' lacks some enhanced features iirc. Let's compare a Windows scrrenshot at 400%:

image

Looks better, but still not nice ;)

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Ok, the font I have installed is really one with a smaller round symbol.
Need to dig out the font I suggested for you :->

@manuth
Copy link
Author

manuth commented May 3, 2022

I guess the screenshots are not exact enough, because I connect to the Windows Box via RDP and take the screenshot on my side of the connection - instead directly on the Windows side. RDP is anyhow bad for this, because the 'simulated graphics card' lacks some enhanced features iirc. Let's compare a Windows scrrenshot at 400%:

image

Looks better, but still not nice ;)

The second one (the one you took on the remote side) looks more similar to what. I see on my 1080p monitor.

That said, the Screenshots I took in this issue have all been taken on a 4k monitor (with scaling in the Windows settings set to 200%)

Do you think such an issue exists already or is it safe to create a new one?
I couldn't find any issues related to Powerline characters in CaskaydiaCove.

Thanks for all your effort, that's awesome 😄

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

image

This is a font patched with #780 from the Cascadia Code 2111.01

Looks still a bit too low on the left round thing.

But in fact, I think the step is also there with the triangular things:

image

The upper diagonal does not really come to the corner.

Terminal seems to detect the box height differently, lets see.

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Added as a test the E0D2 glyph, and it indeed is not as high as the box that Terminal assumes:

image

I.e. all powerline glyphs have the same size, but the inverted-blank is bigger.

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Hmm.

This here is the SAME image from above, but with 48 pt and at 500%.
There is no height problem visible.

image

Seems to be a small rendering problem only. I fear that it is a Windows Terminal bug, but will check the font flags now.

Dumping File:/home/fini/Downloads/ttf/static/CascadiaCode-Regular.ttf

'head' Table - Font Header
--------------------------
	 'head' version:	 1.0
	 fontReversion:		 2111.0
	 checkSumAdjustment:	 0x6b356b07
	 magicNumber:		 0x5f0f3cf5
	 flags:			 0x0007
	 unitsPerEm:		 2048
	 created:		 0x00000000d8cfe165
	 modified:		 0x00000000dddd63fd
	 xMin:			 -980
	 yMin:			 -989
	 xMax:			 4520
	 yMax:			 2304
	 macStyle bits:		 0x0000
	 lowestRecPPEM:		 6
	 fontDirectionHint:	 2
	 indexToLocFormat:	 1
	 glyphDataFormat:	 0
Dumping File:Caskaydia Cove Regular Nerd Font Complete Windows Compatible.ttf

'head' Table - Font Header
--------------------------
	 'head' version:	 1.0
	 fontReversion:		 2111.0
	 checkSumAdjustment:	 0x9af17c2b
	 magicNumber:		 0x5f0f3cf5
	 flags:			 0x001f
	 unitsPerEm:		 2048
	 created:		 0x00000000d8cfe165
	 modified:		 0x00000000de96ab57
	 xMin:			 -1877
	 yMin:			 -989
	 xMax:			 4520
	 yMax:			 2304
	 macStyle bits:		 0x0000
	 lowestRecPPEM:		 8
	 fontDirectionHint:	 2
	 indexToLocFormat:	 1
	 glyphDataFormat:	 0

Hmm, PPEM and flags differ, lets see if #761 fixes it.

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

showttf decodes the flags for us (above I used ttfdump):

     flags=7  baseline_at_0 lsb_at_0 instrs_depend_on_size
     flags=1f baseline_at_0 lsb_at_0 instrs_depend_on_size ppem_to_int instr_set_width

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Not really a change:
image

(12pt at 400%)

I must admit I have no clue. This is probably a Windows Terminal problem; maybe raise an Issue there.

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Btw, I see the step in the prompt, but not always. If I move the terminal window around, sometimes it looks smooth, sometimes not. The reason could be RDP, or antialiasing, or the font rendering engine, or ...

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

I don't want to link the Windows Terminal-issues, but these are two I found that are not related but somehow similar-ish enough:

https://github.com/microsoft/terminal/issues/

  • Some of the extended Unicode characters are rendered with incorrect size and placement 6738
  • Remember to have block and line drawing characters fill their cells properly 455 (further down after closing)
  • 1px line between powerline glyphs 8993 (we also always fight with these)

Maybe even your issue is already there ;)

@manuth
Copy link
Author

manuth commented May 3, 2022

Thanks for the research, I'll have a look at these 😄

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Interestingly it also happens with Microsoft's own Powerline implementation:

image
(Cascadia Code PL static ttf, 12 pt)

Worth to mention this in a possible issue report over there.
Did not try the VF version, though.

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

😭

When using their static otf instead of the ttf we get a variation of the bug...

image

At least that solves the issue 'top of powerline glyph has a step' 😬

@Finii
Copy link
Collaborator

Finii commented May 3, 2022

Lets see what they come up with :-)

@manuth
Copy link
Author

manuth commented May 3, 2022

Thanks for looking it up 😄

@Finii
Copy link
Collaborator

Finii commented Sep 13, 2022

Fixed windows Terminal has just been released.
See closed issue there that is shown some comments up.

@manuth
Copy link
Author

manuth commented Sep 13, 2022

Fixed windows Terminal has just been released.
See closed issue there that is shown some comments up.

I can confirm it's working
Thank you very much for keeping me updated 😄

@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 20, 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

2 participants