-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Patching Berkeley Mono v2 leads to incorrectly spaced chars #1772
Comments
Sorry to hear of your problems.
Just from your discription I'd say the problem is how the font constructs the ligatures. Probably not as CALT what is customary.
If that is the case there is nothing we can do for the parameters yoy give.
I guess the patched font is ok if you omit `--mono`? What is the reason for that flag, maybe we can solve that differently.
Also `--adjust-line-height`, do you have a specific reason to give that? I in fact wanted to remove that option several times already and I search for ppl to give me reason why to keep it.
Sent from Nine
…________________________________
From: Clément POIRET ***@***.***>
Sent: Monday, 30 December 2024 11:05
To: ryanoasis/nerd-fonts
Cc: Subscribed
Subject: [ryanoasis/nerd-fonts] Patching Berkeley Mono v2 leads to incorrectly spaced chars (Issue #1772)
Requirements
I have searched the issues for my issue and found nothing related or helpful
I have searched the FAQ for help
I have checked the Wiki for help
Experienced Behavior
The arrow ligature is offcentered to the left, and the r in the import word is to far to the right. It happens for many characters.
Even if the font is behind a paywall, the issue should also happen on the free trial version of Berkeley Mono v2.
Expected Behavior
Same behavior as for other fonts, centered chars and glyphs.
Example Symbols or Text
-> import but it happens for a lot of characters and nearly all ligatures.
Font Used
Berkeley Mono v2
Source of Font File
https://usgraphics.com/products/berkeley-mono
Terminal Emulator (and the title of the terminal window)
ghostty, kitty
Operating System and Version
NixOS Unstable
Screenshots
Unpatched font:
2024-12-30-At-10h39m30s.png (view on web)
Patched font:
2024-12-30-At-10h37m13s.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Ah, I see this person uses the same additional flags, and you just use I believe in the demo of TX-02 there are no ligs, as this became an add on buy option? [1] Anyhow, So you should propably avoid that. Please try without The demo font FX-050 (?) has to be obtained via some fake order 🙄 [2] Anyhow. It would be good if you could run the patcher with
In that way I can have a look at the debug output and tweak the font-patcher script to not touch the ligs on patching even with [1] https://usgraphics.com/catalog/FX-102 |
Oh, the misaligned letter |
Thanks for your replies. I'm not in front of my computer right now, but I'll come back with debug logs asap. In the meantime, I have some more details:
|
I believe, what destroys the ligs is this if self.args.single:
# Force width to be equal on all glyphs to ensure the font is considered monospaced on Windows.
# This needs to be done on all characters, as some information seems to be lost from the original font file.
self.set_sourcefont_glyph_widths() I will just quickly create a new docker image with an option to suppress that. Lets see. Will open a PR now and merge it, maybe we can discuss if this is a viable solution there. |
Wait, what, it is in the trial font? |
Yes I am using the trial font (wanted to see if I could patch it before buying it as it isn't cheap!). It is a little annoying you have to "sign up" to get the trial download. |
Thanks a lot for your investigations. You're right, I don't particularly need OTF, it was just the default format when downloading the fonts :) Here are the EDIT: And happy new year! |
The log looks excellent 🤔 Thanks for sharing. I would propose to
Is that a good plan? Happy new year to you also 🎉 😃, thank you! $ grep -ve '\(^ *$\)\|^Updating\|^Adding' logs.txt
Running with options:
--mono --debug 2 --careful --makegroups 2 --complete --has-no-italic --no-progressbars
Parallelism 0
Nerd Fonts Patcher v3.3.0 (4.16.2) (ff 20230101)
DEBUG: Naming mode 2
DEBUG: Monospace check: Panose says "monospaced"; glyph-width-mono True
INFO: Font vertical metrics slightly off (0.1%)
DEBUG: Font has negative right side bearing in extended glyphs
DEBUG: Final font cell dimensions 600 w x 1201 h (with icon cell 853 h)
DEBUG: 57/160 box drawing glyphs will be replaced
Done with Patch Sets, generating font...
DEBUG: Weight approximations: OS2/PS/Name: 400/400/400 (from 400/'Book'/'Regular')
DEBUG: =====> Family (ID 1) ok (19 <=31): TX02 Nerd Font Mono
DEBUG: =====> SubFamily (ID 2) ok ( 7 <=31): Regular
DEBUG: =====> Fullname (ID 4) ok (19 <=63): TX02 Nerd Font Mono
DEBUG: =====> PSN (ID 6) ok (11 <=63): TX02NFM-Reg
DEBUG: Tweaking 1/1
DEBUG: Changing flags from 0xB to 0x3
DEBUG: Changing lowestRecPPEM from 8 to 6
TX02 Nerd Font Mono
\===> '/out/TX02NerdFontMono-Regular.otf' |
Everything looks good to me! |
…uching existing glyphs [why] This can help if you want monospaced icons but not-force the other glyphs to be monospaced (which we do to make the whole font monospace-detectable which was a major issue in the beginning, esp with Windows). [how] Add option --single-width-glyphs that makes the added glyphs single width (like --mono), but leaves preexisting glyphs untouched. Fixes: #1772 Signed-off-by: Fini Jastrow <[email protected]>
Please fetch a new docker font-patcher image. The version tag should be https://hub.docker.com/r/nerdfonts/patcher/tags Then patch with these options: sudo docker run --rm \
-v /home/clementpoiret/.local/share/fonts/TX-02:/in \
-v /home/clementpoiret/.local/share/fonts/TX02-NerdFont:/out \
nerdfonts/patcher \
--progressbars \
- --mono \
+ --single-width-glyphs \
--adjust-line-height \
-c I.e. with the new Edit: Well, and of course please use the |
Requirements
Experienced Behavior
The arrow ligature is offcentered to the left, and the
r
in theimport
word is to far to the right. It happens for many characters.Even if the font is behind a paywall, the issue should also happen on the free trial version of Berkeley Mono v2. Command used to patch fonts:
Expected Behavior
Same behavior as for other fonts, centered chars and glyphs.
Example Symbols or Text
-> import
but it happens for a lot of characters and nearly all ligatures.Font Used
Berkeley Mono v2
Source of Font File
https://usgraphics.com/products/berkeley-mono
Terminal Emulator (and the title of the terminal window)
ghostty, kitty
Operating System and Version
NixOS Unstable
Screenshots
Unpatched font:
Patched font:
The text was updated successfully, but these errors were encountered: