unified-font-object/ufoNormalizer

Tries to rename a non-existent glyph that is never mentioned anywhere in any other file

Closed this issue · 2 comments

I ran ufonormalizer on a FontForge-exported UFO3 folder (with the .ufo3 ending changed to .ufo), and got this error.

ufonormalizer -a -v -o .\Spritulo-Normalized.ufo .\Spritulo.ufo
Normalizing "Spritulo.ufo". Processing all files.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Scripts\ufonormalizer.exe\__main__.py", line 7, in <module>
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Lib\site-packages\ufonormalizer\__init__.py", line 112, in main
    normalizeUFO(inputPath, outputPath=outputPath, onlyModified=onlyModified,
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Lib\site-packages\ufonormalizer\__init__.py", line 239, in normalizeUFO
    layerReferencedImages = normalizeGlyphsDirectory(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Lib\site-packages\ufonormalizer\__init__.py", line 347, in normalizeGlyphsDirectory
    glyphMapping = normalizeGlyphNames(ufoPath, layerDirectory)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Lib\site-packages\ufonormalizer\__init__.py", line 410, in normalizeGlyphNames
    subpathRenameFile(ufoPath,
  File "C:\Users\Haley\AppData\Local\Programs\Python\Python311\Lib\site-packages\ufonormalizer\__init__.py", line 1543, in subpathRenameFile
    os.rename(inPath, outPath)
FileNotFoundError: [WinError 2] The system cannot find the file specified: '.\\Spritulo-Normalized.ufo\\glyphs\\uni0122.glif' -> '.\\Spritulo-Normalized.ufo\\glyphs\\org.unifiedfontobject.normalizer.34'

The Unicode character U+0122 has a glyph called Gcommaaccent instead. I did a text search for "uni0122" in features.fea, fontinfo.plist, kerning.plist, layercontents.plist, and metainfo.plist, but got 0 hits.

I guess you need to take this to fontForge... the ufo seems not to be correctly written to disk according the UFO spec

This error seems to say that there's a glyph/filename mentioned in contents.plist that doesn't exist in the .ufo.