Environment: Win 7, Python 3.4, Sublime Text 2I am trying to use fontforge as in following example, by importing fontforge in *.py:import fontforgefont = fontforge.open('blank.sfd')...However, I haven't found any help for win 7 on where (or which subset) to include fontforge binary in my project to make it work. Any ideas, please? ThanksEdit:I was trying to build it with pyextension in win 7 as described here:http://fontforge.org/source-build.html#MSvia cygwin it fails on executing ./configure --enable-pyextensionthrowingchecking for gccresult: nochecking for ccresult: nochecking for cl.exeresult: noerror: in `/cygdrive/c/fontforge':no acceptable C compiler found in $PATHEdit 2:By installing C compiler I've managed to ./configure it but my attempts have failed on executing make install command. I got following error, preceding another countless lines:Makefile:91: recipe for target '../libfontforge.la' failedmake[1]: *** [../libfontforge.la] Error 1make[1]: Leaving directory '/cygdrive/c/fontforge/fontforge'Makefile:28: recipe for target 'fontforge' failedmake: *** [fontforge] Error 2 解决方案 Install fontforge for windows, then search your install for a fontforge-console.bat, and double-click it. From there you have a python environment that includes fontforge via the command:ffpythone.g.:ffpython yourPythonFontForgeScript.pyYou may need to cd to whatever directory has your python script before running that command, or otherwise make sure that the script is in your %PATH%. 这篇关于如何在 Windows 7 中将 fontforge 导入 python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
05-28 14:26
查看更多