FontLab Forum
2012-05-21, 02:41:38 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: fl.GenerateFont causes FLS5win to crash  (Read 3379 times)
Paul Hunt (Adobe)
Team: Adobe
Full Member
****

Karma: +0/-0
United States United States

Posts: 4


pldnhnt
Email
« on: 2009-01-12, 20:30:19 »

Whenever I try to use the fl.GenerateFont method when writing a script to generate a family of fonts from a MultipleMaster file, I never get far without FLS5 crashing on Windows XP. To replicate this bug, you can open then font freefontpro.vfb  (http://www.pyrus.com/downloads/freefontpro.zip), add 1 axis to make it a MultipleMaster file and run the script below. The script will usually write a few font files before crashing and may actually get all the way through the script if you are lucky. But if you run the script enough times, it WILL crash. I'm guessing that no one can run this three times in a row without crashing. This is a very nasty bug and one that I hope can be fixed as soon as possible.

Attached it an image of a typical warning shown when running the script. The odd thing (to me) is that the # in brackets changes whenever the script crashes.

Code:
#FLM: GenerateFont bug
from FL import *
import os, random, time
fPath, fName = os.path.split(fl.font.file_name)

mmFont = fl.font

for x in range(6):
a = random.randint(0, 1000)
b = random.randint(0, 1000)
print 'Instance %d %d' % (a,b)
fontInst = Font(mmFont, (a,b))
fl.Add(fontInst) # make it the current font
fl.UpdateFont()
pfaPath = os.path.join(fPath, 'font%d.pfa') % x
fl.GenerateFont(eval("ftTYPE1ASCII"), pfaPath) #this is the offending line
fontInst.modified = 0
fl.Close(fl.ifont)

print 'Done'
« Last Edit: 2009-01-12, 20:31:52 by phunt » Logged
Adam Twardoch (FontLab)
Product and marketing manager, Fontlab Ltd.
Administrator
Hero Member
*****

Karma: +12/-4
Germany Germany

Posts: 329


FontLab Studio 5.0.4, Mac OS X 10.4.11


WWW
« Reply #1 on: 2009-01-22, 20:33:29 »

I just tested this on FontLab Studio 5.0.4 on Windows XP SP3 as well as on FontLab Studio 5.0.4 on Mac OS X 10.4.11, and did not experience any single crash.

Please give us some more information about your operating system, Python version and FontLab Studio version.

A.
Logged
Paul Hunt (Adobe)
Team: Adobe
Full Member
****

Karma: +0/-0
United States United States

Posts: 4


pldnhnt
Email
« Reply #2 on: 2009-01-26, 16:45:01 »

Sorry I didn't give more info up front, but I also am using Win XP SP3 and FontLab Studio 5.0.4 Build 2741.
The Python version I am using is 2.4
I just tried running the code above on a project file I am currently working on which is using MM, and although the script did not crash FontLab this time, it never completed the script. The script will generate 1, 2, or 3 fonts, but never complete generating a full set of 6 fonts as specified by the script. To give more background, This small script is trying to isolate a problem when trying to run the AFDKO script called 'Instance Generator', which works perfectly on the Mac, but which I have never been able to get to work properly with the Windows version of FLS5.
Logged
chg121
Jr. Member
**

Karma: +0/-0
Switzerland Switzerland

Posts: 1


« Reply #3 on: 2010-05-12, 04:34:30 »

Is there a way to use this AFDKO script on Win XP?
The fl.GenerateFont method crashs quite often (the
menu function File>Generate Font too!).

Since the last update of Fontlab (5.0.4) dates from July 2007,
a minor release that fixes such problems were indicated ...


C.
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!