Skip to content

Permit patching Operator Mono to succeed despite missing glyphs #13

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

emanuelhouse
Copy link

In support of powerline/fonts#154

Patching Operator Mono produced the following errors due to attempting to remove missing glyphs:

Traceback (most recent call last):
File "./powerline-fontpatcher", line 144, in
raise SystemExit(main(sys.argv[1:]))
File "./powerline-fontpatcher", line 141, in main
return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
File "./powerline-fontpatcher", line 133, in patch_fonts
patch_one_font(source_font, target_font, rename_font)
File "./powerline-fontpatcher", line 117, in patch_one_font
target_font[0xFB01].removePosSub('*') # fi ligature
TypeError: No such glyph

This commit first checks for the existence of glyphs 0xFB01 and 0xFB02 before attempting to remove them.

…g to remove missing glyphs:

Traceback (most recent call last):
  File "./powerline-fontpatcher", line 144, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "./powerline-fontpatcher", line 141, in main
    return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
  File "./powerline-fontpatcher", line 133, in patch_fonts
    patch_one_font(source_font, target_font, rename_font)
  File "./powerline-fontpatcher", line 117, in patch_one_font
    target_font[0xFB01].removePosSub('*')  # fi ligature
TypeError: No such glyph

This commit first checks for the existence of glyphs 0xFB01 and 0xFB02 before attempting to remove them.
@emanuelhouse emanuelhouse changed the title Patching Operator Mono produced the following errors due to attemptin… Permit patching Operator Mono to succeed despite missing glyphs Apr 2, 2016
@pie6k
Copy link

pie6k commented Jul 3, 2017

That think should be merged. I've lost like 2 hours trying to convert my 'operator mono' font.

@MrZhang123
Copy link

@pie6k how to use fontpatcher ? I dowload the fontpatcher project and let the font in fontpatcher folder , i input the command in terminale

fontforge -script /Users/imac/Downloads/fontpatcher/setup.py OperatorMono-Book.otf

but console errorinvalid command name 'OperatorMono-Book.otf'
how to use fontpatcher ?

@juicejuice
Copy link

I don't know why this patch isn't merged. It works great.
Here's how I got things working (new install of MacOS X High Sierra 10.13.4).

  1. Install Homebrew according to the one-liner on the brew.sh homepage
  2. Install Fontforge and Python: brew install fontforge
  3. Download the fontpatcher script and .sfd file from Github
  4. Edit the fontpatcher script and change first line to: #!/usr/local/bin/python
  5. Apply @emanuelhouse patch to the fontpatcher script
  6. Patch all .otf files: ./powerline-fontpatcher.py --source-font powerline-symbols.sfd *.otf

@jsatk
Copy link

jsatk commented Jul 25, 2018

This should be merged. I even covered this in a blog post I wrote two years ago. https://jsatk.us/vim-tmux-italics-and-insanity-9a96b69eeca6

@ehartford
Copy link

can this be merged?

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

Successfully merging this pull request may close these issues.

8 participants