-
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
CartographCF becomes CartographF Nerd Font Condensed #1258
Comments
Note: This is a regression from v2.3.3, where it used to become |
Thanks for reporting, will try to reproduce. You could share the debug information, that you get when patching with ah, just from re-reading that. It most probably takes the C of CF as the extremely shortened 'condensed' moniker. |
$ fontforge ~/git/nerd-fonts/font-patcher CartographCF-Bold.ttf --debug 2 2>/dev/null
Nerd Fonts Patcher v3.0.1-5 (4.3.2) (ff 20230101)
DEBUG: Naming mode 1
DEBUG: Monospace check: Panose is invalid ([0, 0, 8, 9, 0, 0, 0, 0, 0, 0]); glyph-width-mono True
INFO: Setting Panose 'Family Kind' to 'Latin Text and Display' (was 'Any')
DEBUG: Extended glyphs wider bounding box than basic glyphs
DEBUG: Final font cell dimensions 1230 w x 2725 h
DEBUG: 32/160 box drawing glyphs will be replaced
Adding 180 Glyphs from Seti-UI + Custom Set
╢████████████████████████████████████████╟ 100%
Adding 6 Glyphs from Heavy Angle Brackets Set
╢████████████████████████████████████████╟ 100%
Adding 160 Glyphs from Box Drawing Set
╢████████████████████████████████████████╟ 100%
Adding 198 Glyphs from Devicons Set
╢████████████████████████████████████████╟ 100%
Done with Patch Sets, generating font...
DEBUG: =====> Family (ID 1) ok (31 <=31): CartographF Nerd Font Condensed
DEBUG: =====> SubFamily (ID 2) ok ( 4 <=31): Bold
DEBUG: =====> Fullname (ID 4) ok (36 <=63): CartographF Nerd Font Condensed Bold
DEBUG: =====> PSN (ID 6) ok (27 <=63): CartographFNF-CondensedBold
DEBUG: =====> PrefFamily (ID 16) ok (21 <=31): CartographF Nerd Font
DEBUG: =====> PrefStyles (ID 17) ok (14 <=31): Condensed Bold
DEBUG: Tweaking 1/1
CartographF Nerd Font Condensed Bold
\===> 'CartographFNerdFont-CondensedBold.ttf' |
[why] Patching CartographCF-Bold.ttf creates this naming: Family (ID 1) : CartographF Nerd Font Condensed SubFamily (ID 2) : Bold Fullname (ID 4) : CartographF Nerd Font Condensed Bold PSN (ID 6) : CartographFNF-CondensedBold PrefFamily (ID 16) : CartographF Nerd Font PrefStyles (ID 17) : Condensed Bold CartographF Nerd Font Condensed Bold \===> 'CartographFNerdFont-CondensedBold.ttf' [how] The font-patcher historically used the file name of the to-be-patched font to come up with the new name. When the FontnameParser has been developed that mechanics has been copied at least for fallback. The earliest tests compared old and new naming with all the filenames. Later, when the FontnameParser has been used to really apply name changes it has always based the parsing on the Fullname or the PSname, because they really hold the information (or at least should hold); while the filename might be completely random. Still code the dealt with specific problems in FILEnames prevailed. The Ubuntu font for example has a file name like 'Ubuntu-C.ttf', and we needed to convert the C to Condensed. As that requirement vanished we can drop all the code that has been added specifically only for parsing the Ubuntu font filenames. Side note: USUALLY font filenames should be roughly equal to the PSname. Fixes: #1258 Signed-off-by: Fini Jastrow <[email protected]>
Will be fixed with 'in parens version number' Thanks again for bringing this up. |
When you patch with default naming the names are not strictly conforming (i.e. too long): $ find . -name '*.ttf' -exec fontforge ~/git/nerd-fonts/font-patcher --dry {} \; 2>/dev/null | grep ERR
ERROR: ====-< Family (ID 1) too long (33 > 31): CartographCFExtra Nerd Font Light
ERROR: ====-< Family (ID 1) too long (33 > 31): CartographCFExtra Nerd Font Light If that is a concern for you (which is unlikely), you need to specify either |
Hmm,
What is $ fontforge ~/git/nerd-fonts/font-patcher CartographCF-ExtraBold.ttf --debug 2 --dry 2>/dev/null
Nerd Fonts Patcher v3.0.1-6 (4.3.3) (ff 20230101)
DEBUG: Naming mode 1
DEBUG: Monospace check: Panose is invalid ([0, 0, 9, 9, 0, 0, 0, 0, 0, 0]); glyph-width-mono True
INFO: Setting Panose 'Family Kind' to 'Latin Text and Display' (was 'Any')
DEBUG: Extended glyphs wider bounding box than basic glyphs
DEBUG: Final font cell dimensions 1230 w x 2743 h
DEBUG: 32/160 box drawing glyphs will be replaced
Done with Patch Sets, generating font...
DEBUG: =====> Family (ID 1) ok (27 <=31): CartographCFExtra Nerd Font
DEBUG: =====> SubFamily (ID 2) ok ( 4 <=31): Bold
DEBUG: =====> Fullname (ID 4) ok (32 <=63): CartographCFExtra Nerd Font Bold
DEBUG: =====> PSN (ID 6) ok (24 <=63): CartographCFExtraNF-Bold
DEBUG: =====> Filename 'CartographCFExtraNerdFont-Bold.ttf' |
Ah yes, they insert a blank where they should not. Maybe we should handle that also, although that is not really 'conforming' to have |
That makes sense. That makes me wonder, why did that issue not occur in 2.3.3 though?
Thank you for such a quick resolution!
Yeah, I'm on Linux, so that's not an issue.
If I may suggest an alternative, we could pass the name of the font as a command line argument, like |
The default was
That would not exactly help, as all those Cartograph fonts have different weights or styles, and if we do not autodetect them you would need to specify them specifically for each of the fonts. |
Addendum:
|
I could probably run it as for FONT in cartograph-cf/*; do fontforge -script font-patcher --complete --name "Cartograph CF" $FONT; done but I do understand the value of a proper solution. Thank you again. For the time being, I guess I'll patch it with |
[why] Patching CartographCF-Bold.ttf creates this naming: Family (ID 1) : CartographF Nerd Font Condensed SubFamily (ID 2) : Bold Fullname (ID 4) : CartographF Nerd Font Condensed Bold PSN (ID 6) : CartographFNF-CondensedBold PrefFamily (ID 16) : CartographF Nerd Font PrefStyles (ID 17) : Condensed Bold CartographF Nerd Font Condensed Bold \===> 'CartographFNerdFont-CondensedBold.ttf' [how] The font-patcher historically used the file name of the to-be-patched font to come up with the new name. When the FontnameParser has been developed that mechanics has been copied at least for fallback. The earliest tests compared old and new naming with all the filenames. Later, when the FontnameParser has been used to really apply name changes it has always based the parsing on the Fullname or the PSname, because they really hold the information (or at least should hold); while the filename might be completely random. Still code the dealt with specific problems in FILEnames prevailed. The Ubuntu font for example has a file name like 'Ubuntu-C.ttf', and we needed to convert the C to Condensed. As that requirement vanished we can drop all the code that has been added specifically only for parsing the Ubuntu font filenames. Side note: USUALLY font filenames should be roughly equal to the PSname. Fixes: #1258 Signed-off-by: Fini Jastrow <[email protected]>
Patcher with the fix available now as docker or zip. |
[why] Patching CartographCF-Bold.ttf creates this naming: Family (ID 1) : CartographF Nerd Font Condensed SubFamily (ID 2) : Bold Fullname (ID 4) : CartographF Nerd Font Condensed Bold PSN (ID 6) : CartographFNF-CondensedBold PrefFamily (ID 16) : CartographF Nerd Font PrefStyles (ID 17) : Condensed Bold CartographF Nerd Font Condensed Bold \===> 'CartographFNerdFont-CondensedBold.ttf' [how] The font-patcher historically used the file name of the to-be-patched font to come up with the new name. When the FontnameParser has been developed that mechanics has been copied at least for fallback. The earliest tests compared old and new naming with all the filenames. Later, when the FontnameParser has been used to really apply name changes it has always based the parsing on the Fullname or the PSname, because they really hold the information (or at least should hold); while the filename might be completely random. Still code the dealt with specific problems in FILEnames prevailed. The Ubuntu font for example has a file name like 'Ubuntu-C.ttf', and we needed to convert the C to Condensed. As that requirement vanished we can drop all the code that has been added specifically only for parsing the Ubuntu font filenames. Side note: USUALLY font filenames should be roughly equal to the PSname. Fixes: ryanoasis#1258 Signed-off-by: Fini Jastrow <[email protected]>
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. |
🗹 Requirements
🎯 Subject of the issue
Experienced behavior:
Some weights of CartographCF is converted to Nerd Fonts as CartographF Nerd Font Condensed.
While I can't the share the font, the issue is with the metadata. Changing the metadata of any font similar to the attached image would result in this behavior.
Expected behavior:
All weights of CartographCF gets converted to CartographCF Nerd Font.
Example symbols:
None
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?iterm2
,urxvt
,gnome
,konsole
)?★ Screenshots (Optional)
The text was updated successfully, but these errors were encountered: