-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
AttributeError when patching with py3 version script #79
Comments
Hey, sorry I just haven't had time to look into this but I promise you I will. Thanks 👍 |
Looks like the problem was introduced in 019bf46 If you apply this sees to work diff --git i/font-patcher-py3 w/font-patcher-py3
index c2392c2..849ad80 100755
--- i/font-patcher-py3
+++ w/font-patcher-py3
@@ -340,7 +340,7 @@ def copy_glyphs(sourceFont, sourceFontStart, sourceFontEnd, symbolFont, symbolFo
if exactEncoding:
# use the exact same hex values for the source font as for the symbol font
currentSourceFontGlyph = sym_glyph.encoding
- copiedToSlot = str(sym_glyph.str)
+ copiedToSlot = str(sym_glyph.unicode)
else:
# use source font defined hex values based on passed in start and end
# convince that this string really is a hex: |
Can confirm that the patch works. No more errors. |
@shellkr @kazuoteramoto Thanks for testing it out and the info here. Seems that I was warned about 2to3 changing unicode to str (see #49) so my bad there. I can confirm the same error, but the change @kazuoteramoto pointed out seems to work for me:
granted i just copy and pasted the literal characters directly into the terminal 😅 |
@ryanoasis What terminal is that? And you can see the powerline is a bit off in yours too. If you have a terminal which supports fontconfig it will look in all your fonts for glyphs. So you only need one font among all that is okay and it will work. It might not be the patched font you see in that image. |
You are correct I need to make sure to clear out my patched fonts, I will try a less lazy test today. Yeah the powerline symbols are definitely off |
Ok, seems like the issue is mainly with Urxvt. FortAwesome/Font-Awesome#3681. I got it working with the help of |
Going to make a bash script to do the 2to3 conversion because of this. https://docs.python.org/2/library/2to3.html#to3-fixers
|
@shellkr If you are still having trouble patching PragmataPro or some other font issues feel free to open a separate issue. I am going to close this one (the AttributeError) for 0.8.0 release which I am almost done with 😄 |
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. |
I am trying to patch PragmataPro with
--fontawesome
,--powerlineextra
and--octicon
but it fails. If I only try--powerline
and--pomicons
it works.Coomand I run:
fontforge -script font-patcher-py3 $HOME/PragmataPro/PragmataPro.ttf --fontawesome --powerline --powerlineextra --pomicons --octicons
Which gives the traceback:
Similar error if I remove
--fontawesome
for the other flags.My Setup
The text was updated successfully, but these errors were encountered: