powerline / fontpatcher Goto Github PK
View Code? Open in Web Editor NEWScript to patch arrow and symbol glyphs into fonts for usage with Powerline and other compatible plugins.
License: Other
Script to patch arrow and symbol glyphs into fonts for usage with Powerline and other compatible plugins.
License: Other
I took the consolas font and ran it through the patcher (under Ubuntu) and then installed the output, which works in most places, but is not counted by gVim as an available font. This seems to be because it's not counted as a fixed-width font so gVim doesn't even show it when I bring up the guifont selection dialog using
:set guifont=*
Hi everyone!
Any help on this error, please?
…/font_tools ❯ ./FontForge-2023-01-01-a1dad3e-x86_64.AppImage -script $PWD/powerline-fontpatcher/scripts/powerline-fontpatcher $HOME/files/kits/design/fonts/00___my_purchases/64-SRC/64-SRC-DZ-Medium.otf
Copyright (c) 2000-2023. 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.
Version: 20230101
Based on sources from 2023-01-01 05:26 UTC-ML-TtfDb-D-GDK3.
Based on source from git with hash: a1dad3e81da03d5d5f3c4c1c1b9b5ca5ebcfcecf
Traceback (most recent call last):
File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 144, in <module>
raise SystemExit(main(sys.argv[1:]))
File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 141, in main
return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 133, in patch_fonts
patch_one_font(source_font, target_font, rename_font)
File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 117, in patch_one_font
target_font[0xFB01].removePosSub('*') # fi ligature
TypeError: No such glyph
…/font_tools ❯
Thanks in advance!
just a few lines
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 ?
I tried to use this, but I have to jump through all sorts of hoops to get a python 3 fontforge library installed.
Does anyone know how to get past this?
Migrated from powerline/powerline#583 by @yl3dy
Powerline symbols look stretched and shifted down when using Inconsolata LGC font. I'm using gVim. Font was patched manually using the manual. Same thing is observed in sakura terminal (it does support fontconfig, but using normal or patched font doesn't make any difference).
System: Arch Linux, package python2-powerline-git.
I have found that for the Menlo font, the default way to determine the target_bb
gives very bad results (the box drawing characters extend beyond the normal character bounds quite a bit).
Due to this, every patched Menlo i found online looked very bad (at least to me, most others seem not to notice 😅).
I have now found a target_bb
that looks good to me (at least at 288pt font size and below).
Now that I have gone through this work, I think it would be a shame to just use it for me. But I also dislike the idea of me just publishing this patched Menlo online somewhere. I think a more generic approach would be useful.
Thus I think it would be a good idea to include target bounding boxes for specific fonts in fontpatcher, and fall back to the default way of going through characters if there is no bounding box for the font to be patched.
This way, everyone who uses the patcher with Menlo in the future would get the better target bounding box.
I am not very well versed in python, so I don't know what the best way to keep this data separate from the actual script would be, or I would have set up a pull request, but if you like this idea, here is the target_bb
that I have found works well for Menlo: [0, -483 1227, 1936]
I ran: ./powerline-fontpatcher --source-font /usr/share/fonts/opentype/PowerlineSymbols.otf /usr/share/fonts/truetype/vlgothic/OxygenMono-Regular.ttf
. All the paths in this are correct, and I have rw permissions. Here's the full error message:
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 104, in patch_one_font
target_font.selection.select(source_glyph.unicode)
ValueError: Encoding is out of range
Environment: Ubuntu 14.04, $LANG=ja_JP.UTF-8
Patching https://github.com/whistler/monospace-fonts/blob/master/crystal.ttf is successful, but causes Japanese glyphs to be rendered oblique where they appear.
Did not observe this error on any other fonts I have tried.
Steps to reproduce:
export LANG=ja_JP.UTF-8
./powerline-fontpatcher crystal.ttf
mv "Crystal for Powerline.ttf" ~/.fonts/
fc-cache -v ~/.fonts/
Set terminal font accordingly, type, say, apt-get
.
While trying to patch AnkaCoder font, I faced this error
The glyph named Delta is mapped to U+0394.
But its name indicates it should be mapped to U+2206.
The glyph named Omega is mapped to U+03A9.
But its name indicates it should be mapped to U+2126.
The glyph named mu is mapped to U+03BC.
But its name indicates it should be mapped to U+00B5.
Save Failed
Traceback (most recent call last):
File "./powerline-fontpatcher", line 146, in <module>
raise SystemExit(main(sys.argv[1:]))
File "./powerline-fontpatcher", line 143, in main
return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
File "./powerline-fontpatcher", line 135, in patch_fonts
patch_one_font(source_font, target_font, rename_font)
File "./powerline-fontpatcher", line 127, in patch_one_font
target_font.generate('{0}{1}'.format(target_font.fullname, extension))
EnvironmentError: Font generation failed
Before it throws this error
TypeError: No such glyph
but I used this patch #13 to overcome it.
argparse.ArgumentError: argument --source-font: can't open '/usr/local/bin/fontpatcher-symbols.sfd': [Errno 2] file not found: '/usr/local/bin/fontpatcher-symbols.sfd'
I also tried to execute powerline-fontpatcher before I run "setup.py install", but still can't find the symbol file.
I got the idea from Awesome Terminal fonts. I tried converting powerline-symbols.sfd
into tty and follows the same procedures there, but it didn't work.
When trying to patch the font linked (Commodore 64) below, I get
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
Can you point me in the right direction?
https://www.dropbox.com/s/23crhkwdyhi33is/C64_Pro_Mono_v1.0-STYLE.ttf?dl=0
So I ran the script and got the patched font, but it is not working correctly as expected.
fontforge -script scripts/powerline-fontpatcher NotoSansMono-Regular.ttf
Copyright (c) 2000-2018 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 17:36 UTC 13-Apr-2019-D.
Based on source from git with hash:
The glyph named macron is mapped to U+02C9.
But its name indicates it should be mapped to U+00AF.
How can I fix it here? Thx
Fontpatcher documentation was removed after merging powerline/powerline#945, so to close powerline/powerline#302 I leave this issue here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.