Font patcher leaves non monspaced font.
rayzorben opened this issue ยท 19 comments
๐น 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:
When I patch a monospace font with font-patcher the corresponding font does not seem to be monospaced. I have verified my base font is monospaced and shows up as selectable in programs that only allow monospaced fonts. I install my patched font (in Windows for all users) and it shows up in programs such as notepad.exe but not cmd.exe
Expected behavior:
Should remain monospace and selectable by cmd.exe and others that only allow monospace fonts.
- Which font are you using (e.g.
Anonymice Powerline Nerd Font Complete.ttf
)?- Custom Font
- Where did you get the file from (download link, self patched, source downloaded from link...)
- self patched
- Which terminal emulator are you using (e.g.
iterm2
,urxvt
,gnome
,konsole
)?- cmd.exe
- Are you using OS X, Linux or Windows? And which specific version or distribution?
- Windows
โ Screenshots (Optional)
Here is the patched font not appearing in cmd.exe - but my non patched font installed at the same time and in the same way appears.
Sorry to hear of your problem.
Usually that should not happen. Can you post the output of a patch run with --debug 2
added to the command line?
Best would be to additionally have the to-be-patched font available somewhere, so that I can reproduce. But maybe we see something in the output. Please also include your command line.
Is the font Lucida Sans or Lucida Console or something special?
The more details the better (best of course would be the actual font file).
The font is 'Lucida Programmer', a modification I made to Lucida Console over 15 years ago to add in a more unique zero and pipe character and I think maybe 1 other small tweak. Here is a link
Thanks for the link. Can you give me your font-patcher
options?
Anyhow, I will try it out with 'regular' and --mono
; cmd
will need the mono option as it can not accept glyphs that are wider than one cell. Windows Terminal can for example.
Debug wise this looks good.
Nerd Fonts Patcher v3.2.1-41 (4.14.3) (ff 20230101)
DEBUG: Naming mode 1
DEBUG: Monospace check: Panose says "monospaced"; glyph-width-mono True
DEBUG: Final font cell dimensions 1234 w x 2048 h
DEBUG: 48/160 box drawing glyphs will be replaced
Adding 188 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: Weight approximations: OS2/PS/Name: 400/400/400 (from 400/'Book'/'')
DEBUG: =====> Family (ID 1) ok (26 <=31): LucidaProgrammer Nerd Font
DEBUG: =====> SubFamily (ID 2) ok ( 7 <=31): Regular
DEBUG: =====> Fullname (ID 4) ok (26 <=63): LucidaProgrammer Nerd Font
DEBUG: =====> PSN (ID 6) ok (18 <=63): LucidaProgrammerNF
DEBUG: Preserving bitmaps (5, 6, 7, 8)
DEBUG: Tweaking 1/1
DEBUG: Changing lowestRecPPEM from 8 to 12
LucidaProgrammer Nerd Font
\===> 'LucidaProgrammerNerdFont-Regular.ttf'
Now I need to find a Windows box, which will take some time (maybe in the evening today).
I just followed the 'Patch your own font' and did this command ./FontForge.AppImage -script $PWD/font-patcher $PWD/LucProg.ttf -out /tmp
Ah, for cmd
you need to add --mono
, maybe you want to try that.
OK, here is what I got from just the command I ran
~/Downloads ๎ฐ ./FontForge.AppImage -script $PWD/font-patcher $PWD/LucProg.ttf -out /tmp
Copyright (c) 2000-2023. See AUTHORS for Contributors.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
Version: 20230101
Based on sources from 2023-01-01 05:26 UTC-ML-TtfDb-D-GDK3.
Based on source from git with hash: a1dad3e81da03d5d5f3c4c1c1b9b5ca5ebcfcecf
Nerd Fonts Patcher v3.2.1 (4.13.1) (ff 20230101)
The following table(s) in the font have been ignored by FontForge
Ignoring 'DSIG' digital signature table
Warning: Mac and Windows entries in the 'name' table differ for the
Family string in the language English (US)
Mac String: Lucida Console
Windows String: Lucida Programmer
Warning: Mac and Windows entries in the 'name' table differ for the
UniqueID string in the language English (US)
Mac String: Lucida Console Regular; B&H alpha25
Windows String: Lucida Programmer Regular; B&H alpha25
Warning: Mac and Windows entries in the 'name' table differ for the
Fullname string in the language English (US)
Mac String: Lucida Console
Windows String: Lucida Programmer
Warning: Mac and Windows entries in the 'name' table differ for the
Version string in the language English (US)
Mac String: Version 1.60
Windows String: Version 1.0
Warning: Mac and Windows entries in the 'name' table differ for the
PostScript string in the language English (US)
Mac String: LucidaConsole
Windows String: LucidaProgrammer
Glyph 2 is called ".notdef", a singularly inept choice of name (only glyph 0
may be called .notdef)
FontForge will rename it.
The glyph named macron is mapped to U+02C9.
But its name indicates it should be mapped to U+00AF.
The glyph named Delta is mapped to U+0394.
But its name indicates it should be mapped to U+2206.
The glyph named Omega is mapped to U+03A9.
But its name indicates it should be mapped to U+2126.
The glyph named mu is mapped to U+03BC.
But its name indicates it should be mapped to U+00B5.
The glyph named fraction1 is mapped to U+2044.
But its name indicates it should be mapped to U+2215.
Adding 188 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...
LucidaProgrammer Nerd Font
\===> '/tmp/LucidaProgrammerNerdFont-Regular.ttf'
How do I add --mono
? I tried just adding it into command line and I got the same output.
For the difference, I mean what --mono
does, have a look here
With mono the patcher output should mention the patched font name with Nerd Font Mono
.
The options are not ordered, you can add them anywhere after font-patcher
.
I did this
fontforge font-patcher --debug 2 ~/Downloads/LucProg.ttf --mono
Does the command differ since I am using the AppImage? I am getting this
~/Downloads ๎ฐ ./FontForge.AppImage -script $PWD/font-patcher --debug 2 ~/Downloads/LucProg.ttf --mono
Copyright (c) 2000-2023. See AUTHORS for Contributors.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
Version: 20230101
Based on sources from 2023-01-01 05:26 UTC-ML-TtfDb-D-GDK3.
Based on source from git with hash: a1dad3e81da03d5d5f3c4c1c1b9b5ca5ebcfcecf
Nerd Fonts Patcher v3.2.1 (4.13.1) (ff 20230101)
DEBUG: Naming mode 1
The following table(s) in the font have been ignored by FontForge
Ignoring 'DSIG' digital signature table
Warning: Mac and Windows entries in the 'name' table differ for the
Family string in the language English (US)
Mac String: Lucida Console
Windows String: Lucida Programmer
Warning: Mac and Windows entries in the 'name' table differ for the
UniqueID string in the language English (US)
Mac String: Lucida Console Regular; B&H alpha25
Windows String: Lucida Programmer Regular; B&H alpha25
Warning: Mac and Windows entries in the 'name' table differ for the
Fullname string in the language English (US)
Mac String: Lucida Console
Windows String: Lucida Programmer
Warning: Mac and Windows entries in the 'name' table differ for the
Version string in the language English (US)
Mac String: Version 1.60
Windows String: Version 1.0
Warning: Mac and Windows entries in the 'name' table differ for the
PostScript string in the language English (US)
Mac String: LucidaConsole
Windows String: LucidaProgrammer
Glyph 2 is called ".notdef", a singularly inept choice of name (only glyph 0
may be called .notdef)
FontForge will rename it.
The glyph named macron is mapped to U+02C9.
But its name indicates it should be mapped to U+00AF.
The glyph named Delta is mapped to U+0394.
But its name indicates it should be mapped to U+2206.
The glyph named Omega is mapped to U+03A9.
But its name indicates it should be mapped to U+2126.
The glyph named mu is mapped to U+03BC.
But its name indicates it should be mapped to U+00B5.
The glyph named fraction1 is mapped to U+2044.
But its name indicates it should be mapped to U+2215.
DEBUG: Monospace check: Panose says "monospaced"; glyph-width-mono True
DEBUG: Final font cell dimensions 1234 w x 2048 h (with icon cell 1538 h)
DEBUG: 48/160 box drawing glyphs will be replaced
Adding 188 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: Weight approximations: OS2/PS/Name: 400/400/400 (from 400/'Book'/'')
DEBUG: =====> Family (ID 1) ok (31 <=31): LucidaProgrammer Nerd Font Mono
DEBUG: =====> SubFamily (ID 2) ok ( 7 <=31): Regular
DEBUG: =====> Fullname (ID 4) ok (31 <=63): LucidaProgrammer Nerd Font Mono
DEBUG: =====> PSN (ID 6) ok (19 <=63): LucidaProgrammerNFM
DEBUG: Preserving bitmaps (5, 6, 7, 8)
Save Failed
Traceback (most recent call last):
File "/home/rayben/Downloads/font-patcher", line 2114, in <module>
main()
File "/home/rayben/Downloads/font-patcher", line 2106, in main
patcher.generate(sourceFonts)
File "/home/rayben/Downloads/font-patcher", line 447, in generate
sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags)
OSError: Font generation failed
You forgot to add/keep your -out
parameter ๐ฌ
Edit:
The Appimage can not write to the current working directory, which is in the FUSE filesystem usually and not in the place where you start the Appimage executable. That is the reason why a -out
is needed for Appimage runs.
Btw, there are some (unrelated) issues with the LucideProgrammer font that fontforge
complains about.
Some things overlooked when you modified the font.
Warning: Mac and Windows entries in the 'name' table differ for the
Version string in the language English (US)
Mac String: Version 1.60
Windows String: Version 1.0
Warning: Mac and Windows entries in the 'name' table differ for the
PostScript string in the language English (US)
Mac String: LucidaConsole
Windows String: LucidaProgrammer
Glyph 2 is called ".notdef", a singularly inept choice of name (only glyph 0
may be called .notdef)
FontForge will rename it.
For the final patched font you might want to also add --complete
to get all icons. At the moment only the smallest select-able subset is patched in. But I do not know what you intend.
Symbol Fonts:
-c, --complete Add all available Glyphs
--codicons Add Codicons Glyphs (https://github.com/microsoft/vscode-codicons)
--fontawesome Add Font Awesome Glyphs (http://fontawesome.io/)
--fontawesomeext Add Font Awesome Extension Glyphs (https://andrelzgava.github.io/font-awesome-extension/)
--fontlogos Add Font Logos Glyphs (https://github.com/Lukas-W/font-logos)
--material, --mdi Add Material Design Icons (https://github.com/templarian/MaterialDesign)
--octicons Add Octicons Glyphs (https://octicons.github.com)
--powersymbols Add IEC Power Symbols (https://unicodepowersymbol.com/)
--pomicons Add Pomicon Glyphs (https://github.com/gabrielelana/pomicons)
--powerline Add Powerline Glyphs
--powerlineextra Add Powerline Extra Glyphs (https://github.com/ryanoasis/powerline-extra-symbols)
--weather Add Weather Icons (https://github.com/erikflowers/weather-icons)
I guess the original problem is solved, so closing.
Please reopen if you still have issues.