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

[Cousine Nerd Font] Adding round borderchars. #1108

Closed
3 tasks done
hungpham3112 opened this issue Feb 6, 2023 · 14 comments · Fixed by #1125
Closed
3 tasks done

[Cousine Nerd Font] Adding round borderchars. #1108

hungpham3112 opened this issue Feb 6, 2023 · 14 comments · Fixed by #1125

Comments

@hungpham3112
Copy link

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

Is your feature request related to a problem? Please describe.
I'm using Cousine Nerd Font for display text and icon for vim terminal also gvim. Today, I worked with some settings with borderchars then I realized that Cousine Nerd Font not support it. I changed to Hack Nerd Font, it can display round borderchars like my expectation.
So I wonder if Cousine Nerd Font can have round borderchars
'─│─│╭╮╯╰'

Additional context

bandicam.2023-02-06.11-39-52-082.mp4
@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

Thank you for raising the Issue.

Maybe we should increase Powerlevel compatibility, triggered by discussion with @igniscyan

The next comments will show what would be needed.


Some links

This fits into another current discussion in

There are other related issues all over and also some changes

Maybe also consider again

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

Powerlevel10k offers a specifically patched font for usage with their prompt system.

The patching is done here.

The changes consist of these commits

  • 413b507 fix box drawing characters, tune powerline glyph sizes and make all glyphs '1.18 * advance' wide
  • d0adb25 allow negative bearings; move oversized glyphs 1/3 to the left
  • 90154ac allow for missing block glyphs
  • 26d98f8 add build
  • e5d35fd tweak font attributes (font, family, etc.)
  • 3eff1b4 patch fonts in docker
  • 8a04d68 reduce vertical oversizing by 33%, otherwise it looks awful in iTerm2

Analyzing the changes

  • Overlap increased to 3%, sometimes 2%
  • ScaleGroups removed
  • Existing glyphs 2500 - 25A0 all scaled to 3% Overlap h (2% v) with reference glyph 2588 (full block)

@237dmitry
Copy link

237dmitry commented Feb 15, 2023

What's wrong with these characters?

ArcoLinux_2023-02-15_13-44-14

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

We do not patch them in. Some Nerd Fonts fonts have them (if the original font has them), some dont.
This is not so nice, because some ppl want to have them in any font.

If the original font has them already in and we do change the 'cell' size (which might happen), then the glyphs do not reach the border anymore or protrude too much out of the 'cell'. Because we just change the 'cell' size globally without rescaling exiting glyphs.

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

These are the few box drawing glyphs that are really in Cousine Nerd Font:

image

Compare with the full set:

image

@237dmitry
Copy link

hese are the few box drawing glyphs that are really in Cousine Nerd Font:

Why does gucharmap show these round borders? Terminal:

ArcoLinux_2023-02-15_15-34-54

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

Your terminal (whichever that is) substitudes it?

fc-list :charset=2570 | grep -i cousine

?

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

On my machine

$ fc-list :charset=2570 --format "%{family}\n" | sort | uniq
3270 Nerd Font
C059
CaskaydiaCove Nerd Font
DejaVu Sans
DejaVu Sans,DejaVu Sans Condensed
DejaVu Sans Mono
DejaVuSansMono Nerd Font
DejaVu Serif
DejaVu Serif,DejaVu Serif Condensed
Delugia
Fira Code
FiraCode Nerd Font
FreeMono
FreeSerif
Nimbus Mono PS
Nimbus Roman
Nimbus Sans
Nimbus Sans Narrow
P052
URW Bookman
URW Gothic
VL Gothic,VL ゴシック
VL PGothic,VL Pゴシック
Z003

despite current Cousine installed:

image

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

If you right click on the glyph in charmap it shows the glyph origin, on my machine it is DejaVu - despite the fact that I selected Cousine:

image

@237dmitry
Copy link

237dmitry commented Feb 15, 2023

No, it does not support

 $ fc-list :charset=2570 --format "%{family}\n" | sort -u
C059
DejaVu Sans
DejaVu Sans Mono
DejaVu Sans,DejaVu Sans Condensed
DejaVu Serif
DejaVu Serif,DejaVu Serif Condensed
Droid Sans
FantasqueSansMono Nerd Font
Nimbus Mono PS
Nimbus Roman
Nimbus Sans
Nimbus Sans Narrow
P052
Source Code Pro
Source Code Pro,Source Code Pro Black
Source Code Pro,Source Code Pro ExtraLight
Source Code Pro,Source Code Pro Light
Source Code Pro,Source Code Pro Medium
Source Code Pro,Source Code Pro Semibold
Source Code Variable
Terminus
URW Bookman
URW Gothic
xos4 Terminus
Z003

@237dmitry
Copy link

it is DejaVu

Yes. So the Cousine somehow takes characters from another font? In that case, I'm sorry, I'm not an expert.

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

Tilix and charmap are written in a way that they use another font if the asked-for glyph is not in the selected font.

@Finii
Copy link
Collaborator

Finii commented Feb 15, 2023

Note to self:

Cousine has negative rhs bearing at Aogonek 😬

image

I thought there is one corner in the code that I do not need to touch, but ... alas .. that breaks our cell calculations that can not make up their mind if they want to take the advance width or the bounding box width.

WIDTH 100 1229 (1229 1228.0) 1233.0
WIDTH 101 1229 (1229 1160.0) 1233.0
WIDTH 102 1229 (1229 1228.0) 1233.0
WIDTH 103 1229 (1229 1160.0) 1233.0
WIDTH 104 1229 (1229 1247.0) 1233.0
New MAXWIDTH-B 104 1229 -> 1229 1247.0
WIDTH 105 1229 (1229 1160.0) 1247.0
WIDTH 106 1229 (1229 1142.0) 1247.0
WIDTH 107 1229 (1229 1080.0) 1247.0
WIDTH 108 1229 (1229 1142.0) 1247.0

Finii added a commit that referenced this issue Feb 15, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii mentioned this issue Feb 15, 2023
2 tasks
Finii added a commit that referenced this issue Feb 15, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Feb 17, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Feb 23, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Mar 2, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Mar 10, 2023
Fixes: #1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@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 Sep 11, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
Fixes: ryanoasis#1108

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants