macro

Python Script - Find all selected glyphs

Forums: 

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

Simplepolator

Forums: 

Simplepolator allows you to interpolate compatible glyphs in the same font, without leaving FontLab nor interrupting your workflow.

Simply select two compatible glyphs and run the macro:
Five new glyphs will be automatically created, allowing you to choose the best variation.
Making it super-easy to apply the Gunnlaugur SE Briem's method on "How to make mistakes.

A quick video showing how to use it:
https://vimeo.com/42785809

Download:
http://www.impallari.com/projects/overview/simplepolator

Python Scripting Guru?

Forums: 

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.