FontForge Quick Export OTF Script ?



I'm relatively new to FontForge after I got some experience with FontLab Studio and so far I like it (especially going open source).
While testing a design I noticed that creating OTF fonts for testing in InDesign can be a tedious task. In FontLab I was used to a script that automatically created a copy of the file, removed overlaps and prompted the export dialog. So exporting OTF for testing was done in one click.

I bet there is something similar in the FontForge world, but I couldn't find anything...
How do you "quick export" test OTFs in FontForge?



alternates in small caps


Hi guys,

I'm creating a sans-serif font but as alternates the I and J have little serifs, and I want to carry over the alternates to the small caps. I'm getting a little stuck on the scripting. (Massive newbie on the scripting btw).

So when Small Caps are on with alternates the small cap serif I will be displayed instead of tthe small cap I.

Is this possible?

Thanks in advance.

Change composite margins in MM Layers scripting


I'd like to shift composite glyphs in MM layers, with specific values for each layer. Set the marging in glyphs with components with are in a FontLab MM.
I've been trying and couldn't get it working.
glyph.Shift doesn't work with composites, I couldn't find a way with components.deltas either.
(probably I'm doing something wrong, FontLab API is a bit cryptic to me, It can't be that hard set sidebearings : )

Python Script - Find all selected glyphs


I'm trying to write a simple python script that acts on the glyphs that the user has selected in the FontLab font window:

I'm especially interested in the glyphs (or maybe more accurately "glyph slots") that are in the encoding but are un-filled.

So far I've tried two things:

# 1 - glyph slots
selectedSlots = fl.count_selected
print "Number of selected glyph slots:", selectedSlots

# 2 - selected glyph names
selectedNames = [ fl.font.glyphs[i].name for i in range(len(fl.font.glyphs)) if fl.Selected(i) ]
print "List of selected glyph names:", selectedNames

Open Type scripting dilemma


hello folks, i have aquestion about ot scripting.

the font i'm working on is uppercase only and it has a lot of stylistic sets. of course i had to include lowercase glyphs too, but they just mirror the uppercase glyphs. however, for the alternative glyphs, i don't do uc and lc for each one of them, only the uc.

then i put only the uc glyphs in my stylistic sets classes and so for this to work with the lc as well, i'm doing a lookup that changes lowercase into uppercase before each substitution.

feature ss01 {
lookup ss01a { sub @lower by @upper; } ss01a;
lookup ss01b { sub @class_0 by @class_1; } ss01b; # they contain only uppercase
} ss01;

Replacing glyphs with Python in OTF


Hi everybody, I have a question. I know I can replace glyphs in the same OpenType font.

However, is it possible to replace glyphs in one OpenType font to glyphs from another OpenType font. Is there a python script available for that? Or is there some other way to achieve that? Thank you in advance.

Python Scripting Guru?


Hello there:

As there is nothing like Prepolator for PC....
I'm thinking of some kind of basic script to help PC users to prepare fonts for "mask to master" interpolation.

Nothing too complex, maybe something simple like this:

For each glyph in the current open font:
- Count number of points
- Count number of contours
- Save list as .txt file, or just output somewhere that can be copied and pasted.

So, we can run the script in 2 fonts, open the list in excel & quickly find the glyphs that needs more tunning to be compatible.
Can this be done? Where do I star looking for info to code this?

Thanks in advance.