Skip to content
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

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

Open
otterbatch opened this issue Apr 7, 2022 · 4 comments
Open

Comments

@otterbatch
Copy link

otterbatch commented Apr 7, 2022

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
Copy link

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
Copy link
Owner

13rac1 commented Oct 27, 2022

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.

@13rac1 13rac1 changed the title Unhandled exception / No such file or directory: 'merged.ttf' windows: Unhandled exception / No such file or directory: 'merged.ttf' Oct 27, 2022
@zellchristensen
Copy link

zellchristensen commented Dec 6, 2024

2. This may be a bug in fontTools.

I came across this issue after running in to the same error trying to merge SEGUISYM.TTF (From Win10) with a modified font from another project while on Linux Mint so it may very well may be a bug with fontTools and outside the scope of this project. Even running just pyftmerge -h results in FileNotFoundError: [Errno 2] No such file or directory: "-h"

@otterbatch
Copy link
Author

Hi all,

I'm very sorry for my late response to this issue, despite being the one to originally post it! Honestly, it completely slipped my mind, and I can't quite remember what I was trying to do.

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.

Thank you so much for this kind offer! I believe you're right and that I was trying to replace the Windows emojis with Twitter ones. Going through the process of installing now, it seemed to have completed normally without blaring warnings at me, but I can't recall if I originally posted this pre- or post-PC upgrade; I don't know what changed to make it work this time.

The only issue now is that despite completing the installation through "Standard Install" and "Replace the default Windows emoji fonts", as well as Chocolatey just to be sure, my emojis still aren't in the Twitter style. I restarted Firefox, Windows, and also scrolled through the emoji list in the Windows Key + . shortcut to confirm. Maybe I misunderstood what the scripts are for or missed a step somewhere? Either way, it's not quite the same issue as originally posted here.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants