View Single Post
Old 12-04-2019, 12:08 PM   #81
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 495
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
Quote:
Originally Posted by radius View Post
I had to hack up KoboifyFonts a little to make it run for me using modern Fontforge; I guess because of switching to Python 3.

On version 20190801 of fontforge from Homebrew on Mac I had to do the following hacks for KoboifyFonts:

- change iteritems() to items(); I think this optimization is no longer needed
- change all instances of unicode(some_string, 'utf-8') to just bare some_string; I don't fully understand, but it seems there has been some change has been made to the string type?

This works for me, but I have no idea if they are good in general (hence no patch).
Yeah, that would have needed to be done since the latest version of Fontforge switched to including Python 3 by default.

The unicode() function call in Python 3 uses utf-8 strings by default, which is why the bare string or variable name is all that is needed now.

I actually tried to port the script myself, but Fontforge was crashing on me even using the original script on an older version of Fontforge that still used Python 2 on my Windows 10 machine (and I can't tell if it's a Windows thing or just my machine; I went crazy in locking it down for security purposes, which in hindsight has caused all sorts of compatibility problems for me that are hard to track down/reverse), so I couldn't verify anything.

If the script works for you, feel free to post it so that others can benefit (or check/edit your work in case anything else was missed in the migration).

Last edited by rtiangha; 12-04-2019 at 12:21 PM.
rtiangha is offline   Reply With Quote