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

Font-Patcher fails when applied to Monaco font with Ligatures on macOS 10.14 beta 10 #292

Closed
carlca opened this issue Sep 10, 2018 · 7 comments

Comments

@carlca
Copy link

carlca commented Sep 10, 2018

macOS 10.14 Mojave beta 10
MacVim Custom Version 8.1.280 (151)
iTerm2 v3.2.0

I currently am using a version of Monaco.ttf which has had the Ligaturizer patcher applied to it. My initial attempts to use this failed with File Open errors, but eventually the author, @ToxicFrog sent me a version of Monaco.ttf which worked.

Now I'm trying to use your vim-devicons plugin and I am coming up with the fact that I need to have a Nerd Font version of this font. So I ran this command...

fontforge -script ./bin/font-patcher /Users/carlca/Library/Fonts/LigaMonacoNew.ttf

but received the error message...

Copyright (c) 2000-2014 by George Williams. 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.
 Based on sources from 09:31 UTC 21-Mar-2018-D.
 Based on source from git with hash:
Warning: Mac string is a subset of the Windows string in the 'name' table
 for the Copyright string in the English (US) language.
The glyph named fi is mapped to U+F001.
But its name indicates it should be mapped to U+FB01.
The glyph named fl is mapped to U+F002.
But its name indicates it should be mapped to U+FB02.
No configfile given, skipping configfile related actions
The requested file, original-source.otf, does not exist
Traceback (most recent call last):
  File "./bin/font-patcher", line 761, in <module>
    symfont = fontforge.open(__dir__+"/src/glyphs/"+patch['Filename'])
EnvironmentError: Open failed

Any idea what's wrong?

I have attached the file in question.

LigaMonacoNew.ttf.zip

Another factor may be the fact that I am not certain that I have loaded the vim-devicons plugin correctly. I am using the Pathogen plugin manager, and following advice from the author @tpope I used the line...

set rtp+=~/clone/VimBox/dotVim/bundle/vim-devicons-master
after the
call pathogen#runtime_append_all_bundles()
line

to try to ensure that vim-devicons was the last plugin loaded. It's not inconceivable that I may have got this wrong here, since I am not greatly skilled in the ways of Vim!

All I'm after, at the end of the day, is a pretty looking NERDTree with lots of whizzy file icons!

Cheers,
Carl Caulkett

@ryanoasis
Copy link
Owner

Thanks for the report, sorry to hear about your troubles. I'd like to try out the font you attached but I cannot tell you when I'll have time to do it.

@carlca
Copy link
Author

carlca commented Sep 25, 2018

Don't worry. Whenever you have a moment, that'll be fine!

@resolritter
Copy link

Hey @carlca , I have recently also tripped on this. I went to investigate the line, which is:

https://github.com/ryanoasis/nerd-fonts/blob/master/font-patcher#L761

So if you download the release tarball, you ought to recreate a "src/glyphs" directory with the same files as

https://github.com/ryanoasis/nerd-fonts/tree/master/src/glyphs

as they don't seem to be included in the tagged source releases for some reason. I was able to manually patch my font after that.

@ryanoasis Would it be feasible to bundle this directory by default with the tarball releases? Or even provide a separate zip containing them for each release? I think it would be helpful in the future for people not knowing how to deal with this.

@cseelus
Copy link

cseelus commented Mar 3, 2022

The solution @resolritter posted works fine. Issue could be closed.

@Finii
Copy link
Collaborator

Finii commented Jan 30, 2023

Nowadays you use the FontPatcher.zip from the release page that contains everything you need.
Or the docker image.

@resolritter

Would it be feasible to bundle this directory by default with the tarball releases?

This is exactly what is available now, maybe it was your idea. 👍
https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/FontPatcher.zip

Furthermore there is a PR to have the same for the bleeding-edge font-patcher: #1044

@Finii Finii closed this as completed Jan 30, 2023
@Finii
Copy link
Collaborator

Finii commented Jan 30, 2023

The ominous error message from the top has been fixed with this f97d729

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants