ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
52.69k stars 3.59k forks source link

Can't patch Input Mono. Font-Patcher error: OSError: Font generation failed #1562

Closed futuremotiondev closed 3 months ago

futuremotiondev commented 3 months ago

🗹 Requirements

🎯 Subject of the issue

Experienced behavior:

  1. Download Input Mono from here: https://input.djr.com/
  2. Run fontforge.exe --script ./font-patcher --mono --no-progressbars --careful --complete -out "C:\users\username\desktop\" InputMono-Regular.ttf
  3. Observe error at the end:
Done with Patch Sets, generating font...
  But its name indicates it should be mTraceback (most recent call last):
  File "C:\BIN\FontPatcher\font-patcher", line 2072, in <module>
    main()
  File "C:\BIN\FontPatcher\font-patcher", line 2064, in main
    patcher.generate(sourceFonts)
  File "C:\BIN\FontPatcher\font-patcher", line 446, in generate
    sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags)
OSError: Font generation failed
  1. Full log attached: FontPatcherLog.log

Expected behavior:

  1. I expected the patch to succeed and the new font generated.

Example symbols:

Warning: Mac and Windows entries in the 'name' table differ for the
  Family string in the language English (US)
  Mac String: Input Mono
  Windows String: InputMono
Warning: Mac and Windows entries in the 'name' table differ for the
  UniqueID string in the language English (US)
  Mac String: 1.100;FBI ;InputMono-Regular
  Windows String: 0.000;FBI ;InputMono-Regular
Warning: Mac and Windows entries in the 'name' table differ for the
  Version string in the language English (US)
  Mac String: Version 1.100;PS 0.0;hotconv 1.0.72;makeotf.lib2.5.5900
  Windows String: Version 0.000;PS 0.0;hotconv 1.0.72;makeotf.lib2.5.5900
The glyph named Tcommaaccent is mapped to U+021A.
  But its name indicates it should be mapped to U+0162.
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 tcommaaccent is mapped to U+021B.
  But its name indicates it should be mapped to U+0163.
The glyph named mu is mapped to U+03BC.
  But its name indicates it should be mapped to U+00B5.
The following table(s) in the font have been ignored by FontForge
  Ignoring 'EPAR'
The glyph named asterisk is mapped to U+F069.
  But its name indicates it should be mapped to U+002A.
The glyph named plus is mapped to U+F067.
  But its name indicates it should be mapped to U+002B.
The glyph named question is mapped to U+F128.
  But its name indicates it should be mapped to U+003F.
The glyph named minus is mapped to U+F068.
  But its name indicates it should be mapped to U+2212.
The glyph named heart is mapped to U+F004.
  But its name indicates it should be mapped to U+2665.
The glyph named home is mapped to U+F015.
  But its name indicates it should be mapped to U+21B8.
The glyph named check is mapped to U+F046.
  But its name indicates it should be mapped to U+2713.
The glyph named bell is mapped to U+F0A2.
  But its name indicates it should be mapped to U+2407.
The glyph named lessequal is mapped to U+F500.
  But its name indicates it should be mapped to U+2264.
The glyph named circle is mapped to U+F111.
  But its name indicates it should be mapped to U+25CB.
The glyph named smile is mapped to U+F118.
  But its name indicates it should be mapped to U+263A.
The glyph named frown is mapped to U+F119.
  But its name indicates it should be mapped to U+2322.
The glyph named bullseye is mapped to U+F140.
  But its name indicates it should be mapped to U+25CE.
The glyph named compass is mapped to U+F14E.
  But its name indicates it should be mapped to U+263C.
The glyph named female is mapped to U+F182.
  But its name indicates it should be mapped to U+2640.
The glyph named male is mapped to U+F183.
  But its name indicates it should be mapped to U+2642.
The glyph named sun is mapped to U+F185.
  But its name indicates it should be mapped to U+263C.
The glyph named venus is mapped to U+F221.
  But its name indicates it should be mapped to U+2640.
The glyph named slash is mapped to U+E016.
  But its name indicates it should be mapped to U+002F.
The glyph named pi is mapped to U+E02C.
  But its name indicates it should be mapped to U+03C0.
The glyph named ring is mapped to U+E03D.
  But its name indicates it should be mapped to U+02DA.
The glyph named infinity is mapped to U+E055.
  But its name indicates it should be mapped to U+221E.
The glyph named equal is mapped to U+E079.
  But its name indicates it should be mapped to U+003D.
The glyph named alpha is mapped to U+F002B.
  But its name indicates it should be mapped to U+03B1.
The glyph named at is mapped to U+F0065.
  But its name indicates it should be mapped to U+0040.
The glyph named backspace is mapped to U+F006E.
  But its name indicates it should be mapped to U+2408.
The glyph named bell is mapped to U+F009A.
  But its name indicates it should be mapped to U+2407.
The glyph named beta is mapped to U+F00A1.
  But its name indicates it should be mapped to U+03B2.
The glyph named box is mapped to U+F00D4.
  But its name indicates it should be mapped to U+25A1.
The glyph named check is mapped to U+F012C.
  But its name indicates it should be mapped to U+2713.
The glyph named compass is mapped to U+F018B.
  But its name indicates it should be mapped to U+263C.
The glyph named delete is mapped to U+F01B4.
  But its name indicates it should be mapped to U+2421.
The glyph named delta is mapped to U+F01C2.
  But its name indicates it should be mapped to U+03B4.
The glyph named earth is mapped to U+F01E7.
  But its name indicates it should be mapped to U+2641.
The glyph named equal is mapped to U+F01FC.
  But its name indicates it should be mapped to U+003D.
The glyph named heart is mapped to U+F02D1.
  But its name indicates it should be mapped to U+2665.
The glyph named home is mapped to U+F02DC.
  But its name indicates it should be mapped to U+21B8.
The glyph named image is mapped to U+F02E9.
  But its name indicates it should be mapped to U+22B7.
The glyph named minus is mapped to U+F0374.
  But its name indicates it should be mapped to U+2212.
The glyph named omega is mapped to U+F03C9.
  But its name indicates it should be mapped to U+03C9.
The glyph named percent is mapped to U+F03F0.
  But its name indicates it should be mapped to U+0025.
The glyph named pi is mapped to U+F03FF.
  But its name indicates it should be mapped to U+03C0.
The glyph named plus is mapped to U+F0415.
  But its name indicates it should be mapped to U+002B.
The glyph named sigma is mapped to U+F04A0.
  But its name indicates it should be mapped to U+03C3.
The glyph named tie is mapped to U+F0519.
  But its name indicates it should be mapped to U+2040.
The glyph named triangle is mapped to U+F0536.
  But its name indicates it should be mapped to U+25B3.
The glyph named bullseye is mapped to U+F05DD.
  But its name indicates it should be mapped to U+25CE.
The glyph named copyright is mapped to U+F05E6.
  But its name indicates it should be mapped to U+00A9.
The glyph named lambda is mapped to U+F0627.
  But its name indicates it should be mapped to U+03BB.
The glyph named asterisk is mapped to U+F06C4.
  But its name indicates it should be mapped to U+002A.
The glyph named hook is mapped to U+F06E2.
  But its name indicates it should be mapped to U+2440.
The glyph named infinity is mapped to U+F06E4.
  But its name indicates it should be mapped to U+221E.
The glyph named prescription is mapped to U+F0706.
  But its name indicates it should be mapped to U+211E.
The glyph named tilde is mapped to U+F0725.
  But its name indicates it should be mapped to U+02DC.
The glyph named cancel is mapped to U+F073A.
  But its name indicates it should be mapped to U+2418.
The glyph named square is mapped to U+F0764.
  But its name indicates it should be mapped to U+25A1.
The glyph named null is mapped to U+F07E2.
  But its name indicates it should be mapped to U+2400.
The glyph named pipe is mapped to U+F07E5.
  But its name indicates it should be mapped to U+01C0.
The glyph named ring is mapped to U+F07EB.
  But its name indicates it should be mapped to U+02DA.
The glyph named cross is mapped to U+F0953.
  But its name indicates it should be mapped to U+2629.
The glyph named trademark is mapped to U+F0A78.
  But its name indicates it should be mapped to U+2122.
The glyph named ampersand is mapped to U+F0A8D.
  But its name indicates it should be mapped to U+0026.
The glyph named diamond is mapped to U+F0B8A.
  But its name indicates it should be mapped to U+2666.
The glyph named bullet is mapped to U+F0CF3.
  But its name indicates it should be mapped to U+2022.
The glyph named comma is mapped to U+F0E23.
  But its name indicates it should be mapped to U+002C.
The glyph named rectangle is mapped to U+F0E5E.
Done with Patch Sets, generating font...
  But its name indicates it should be mTraceback (most recent call last):
  File "C:\BIN\FontPatcher\font-patcher", line 2072, in <module>
    main()
  File "C:\BIN\FontPatcher\font-patcher", line 2064, in main
    patcher.generate(sourceFonts)
  File "C:\BIN\FontPatcher\font-patcher", line 446, in generate
    sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags)
OSError: Font generation failed
apped to U+25AD.
The glyph named spade is mapped to U+F0E65.
  But its name indicates it should be mapped to U+2660.
The glyph named epsilon is mapped to U+F10E0.
  But its name indicates it should be mapped to U+03B5.
The glyph named gamma is mapped to U+F10EE.
  But its name indicates it should be mapped to U+03B3.
The following table(s) in the font have been ignored by FontForge
  Ignoring 'webf'
The glyph named question is mapped to U+F02C.
  But its name indicates it should be mapped to U+003F.
The glyph named check is mapped to U+F03A.
  But its name indicates it should be mapped to U+2713.
The glyph named plus is mapped to U+F05D.
  But its name indicates it should be mapped to U+002B.
The glyph named x is mapped to U+F081.
  But its name indicates it should be mapped to U+0078.
The glyph named home is mapped to U+F08D.
  But its name indicates it should be mapped to U+21B8.
The glyph named ellipsis is mapped to U+F09A.
  But its name indicates it should be mapped to U+2026.
The glyph named bell is mapped to U+F0DE.
  But its name indicates it should be mapped to U+2407.
The glyph named circle is mapped to U+F27D.
  But its name indicates it should be mapped to U+25CB.
The glyph named diamond is mapped to U+F292.
  But its name indicates it should be mapped to U+2666.
The glyph named image is mapped to U+F2B8.
  But its name indicates it should be mapped to U+22B7.
The glyph named infinity is mapped to U+F2B9.
  But its name indicates it should be mapped to U+221E.
The glyph named square is mapped to U+F2F0.
  But its name indicates it should be mapped to U+25A1.
The glyph named sun is mapped to U+F2F5.
  But its name indicates it should be mapped to U+263C.
The glyph named bell is mapped to U+EAA2.
  But its name indicates it should be mapped to U+2407.
The glyph named check is mapped to U+EAB2.
  But its name indicates it should be mapped to U+2713.
The glyph named compass is mapped to U+EBD5.
  But its name indicates it should be mapped to U+263C.
The glyph named ellipsis is mapped to U+EA7C.
  But its name indicates it should be mapped to U+2026.
The glyph named heart is mapped to U+EB05.
  But its name indicates it should be mapped to U+2665.
The glyph named home is mapped to U+EB06.
  But its name indicates it should be mapped to U+21B8.
The glyph named newline is mapped to U+EBEA.
  But its name indicates it should be mapped to U+2424.
The glyph named question is mapped to U+EB32.
  But its name indicates it should be mapped to U+003F.
Save Failed

🔧 Your Setup

★ Screenshots (Optional)

pwsh_9aAMNXkpu6

Finii commented 3 months ago

fontforge can not create the font file. Probably the directory is non-existing or not writable.

fontforge.exe --script ./font-patcher --mono --no-progressbars --careful --complete -out "C:\users\username\desktop\" InputMono-Regular.ttf

Probably try without --out. I have no clue how paths needs to be specified with windows :grimacing:

It is very hard to catch all possible ways file creation can fail and fontforge does crash if it can not do it - we can not really prevent that.

Finii commented 3 months ago

Works on my machine:

image

image

Closing this, please reopen if changing the path of -out (or dropping that parameter) does not help and you checked that you can write to the output directory.

Here a bit of the fontforge code, that seems to be some unspecified I can not write to disk problem.

image