13rac1 / twemoji-color-font

Twitter Unicode emoji color OpenType-SVG font for Linux/MacOS/Windows
Other
1.72k stars 75 forks source link

windows: Unhandled exception / No such file or directory: 'merged.ttf' #115

Open otterbatch opened 2 years ago

otterbatch commented 2 years ago

Windows 11 Pro build 22581, TwitterColorEmoji-SVGinOT-Win-13.1.0.zip

I have a small brain so I'm not too sure how to fix this:

Checking if Segoe UI Symbol is installed.
Checking if prerequisites are installed.
Ensuring the latest FontTools is installed.
Requirement already satisfied: fonttools in c:\users\otter\appdata\local\programs\python\python310\lib\site-packages (4.31.2)
Creating new Segoe UI Emoji font from Twitter Color Emoji
Dumping "C:\WINDOWS\Fonts\seguiemj.ttf" to "emjname.ttx"...
Dumping 'name' table...
Compiling "emjname.ttx" to "C:\Users\Otter\Desktop\TwitterColorEmoji-SVGinOT-Win-13.1.0\Segoe UI Emoji with Twemoji.ttf"...
Parsing 'name' table...
Creating new Segoe UI Symbol font from Twitter Color Emoji
WARNING: Dropped cmap subtable from font '0':   format  0, platformID  1, platEncID  0
Traceback (most recent call last):
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\Scripts\pyftmerge.exe\__main__.py", line 7, in <module>
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\misc\loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\merge\__init__.py", line 194, in main
    font = merger.merge(fontfiles)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\merge\__init__.py", line 110, in merge
    tables = [font.get(tag, NotImplemented) for font in fonts]
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\merge\__init__.py", line 110, in <listcomp>
    tables = [font.get(tag, NotImplemented) for font in fonts]
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\ttFont.py", line 449, in get
    return self[tag]
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\ttFont.py", line 400, in __getitem__
    table = self._readTable(tag)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\ttFont.py", line 417, in _readTable
    table.decompile(data, self)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\tables\S_V_G_.py", line 85, in decompile
    doc = tostr(doc, "utf_8")
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\misc\textTools.py", line 124, in tostr
    return s.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 1: invalid start byte
Dumping SVG emojis
Dumping "C:\Users\Otter\Desktop\TwitterColorEmoji-SVGinOT-Win-13.1.0\TwitterColorEmoji-SVGinOT.ttf" to "svg.ttx"...
ERROR: An exception occurred during the decompilation of the 'SVG ' table
Traceback (most recent call last):
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\ttFont.py", line 417, in _readTable
    table.decompile(data, self)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\tables\S_V_G_.py", line 85, in decompile
    doc = tostr(doc, "utf_8")
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\misc\textTools.py", line 124, in tostr
    return s.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 1: invalid start byte
Dumping 'SVG ' table...
Dumping "C:\WINDOWS\Fonts\seguisym.ttf" to "name.ttx"...
Dumping 'name' table...
Merging in dumped emojis
Compiling "name.ttx" to "almost.ttf"...
ERROR: Unhandled exception has occurred
Traceback (most recent call last):
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttx.py", line 405, in main
    process(jobs, options)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttx.py", line 387, in process
    action(input, output, options)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\misc\loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttx.py", line 295, in ttCompile
    ttf = TTFont(options.mergeFile, flavor=options.flavor,
  File "C:\Users\Otter\AppData\Local\Programs\Python\Python310\lib\site-packages\fontTools\ttLib\ttFont.py", line 126, in __init__
    file = open(file, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'merged.ttf'
Installation failed!
Press any key to continue . . .

Any help would be very much appreciated!

Humming-Owl commented 2 years ago

Seems like the merging process did not end well (don't know why :P). But I can help. Do you want to replace completely the Windows emoji font with the Twitter emoji font? If so I can edit the font manually so that when installed it will replace the Windows emoji font.

13rac1 commented 2 years ago

Two issues here resolve.

  1. These windows scripts need to hard crash at the first hint of failure
  2. Original failing error is:

    ERROR: An exception occurred during the decompilation of the 'SVG ' UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 1: invalid start byte`

    This may be a bug in fontTools.

I don't have a Windows 11 install, so this issue needs help from the community. It would be great to see both of these issues resolved.