fog2ufo
Dave Crossland
Posts: 1,431
Has anyone scripted the conversion of .fog files to .ufo?
0
Comments
-
Save this script:
import os.path from fontlab import * from PythonQt import QtGui fontFileName = "example.fog" fontPath = os.path.join(os.path.dirname(__file__), fontFileName) ws = flWorkspace.instance() main = ws.mainWindow main.loadFont(fontPath) fp = ws.currentPackage pref = flPreferences() ec = ExportControl() ec.profileName = "UFO Package" ec.destinationMode = pref.DestinationFolder ec.conflictMode = pref.ConflictOverwrite ec.contentMode = pref.ContentCurrent ec.destinationFolder = os.path.dirname(fontPath) ec.groupProfiles = False ec.groupFamily = False ws.exportFont(fp, ec) qapp = QtGui.QApplication.instance() qapp.quit()
as "fog2ufo.vfpy" and run FontLab 7 in commandline with the path to "fog2ufo.vfpy" as commandline argument. Change fontFileName as needed (in this version, it needs to be in the same folder as "fog2ufo.vfpy").0 -
Ps. The code in FontLab 7 for opening .fog files is based on the code that FLS5 had.0
-
For more info about export/conversion scripting in FontLab 7, see
0 -
The question sounded more like if someone had the spec for .fog files.0
-
The spec would be nice, but for my immediate practical purposes, I just need a scripted build process from .fog to .ttf via fontmake Thanks both!0
-
I don't think there is such thing as .fog files spec (there are 2 .fog file formats, btw), I think I made parser by checking Fog code + applying it to some sample fog files.0
-
Could you share the relevant code?0
-
@Adam Twardoch Out of interest, does FL6 use a different method for opening .fog files? I tried opening one recently in it and found everything to be super pixelated and couldn't be edited. FL5 worked fine.0
-
Was it FL6 or FL7? There might be some bug in the FL7 code. I checked some .fog files and they worked fine, including fractional coordinates etch FOG & FL7 support but FLS5 does not.
It'd help if you could share the failing font via https://support.fontlab.com/ so we can see what's going on.
.fog format also supports embedded bitmaps, maybe they're interfering.0 -
Ahh. It is the embedded bitmaps that are indeed interfering. Is there a way to disable FL6 from loading them?0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports