|
Revision 1, 0.7 kB
(checked in by erik, 3 years ago)
|
initial import
|
- Property svn:executable set to
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
from robofab.world import SelectFont, CurrentFont |
|---|
| 7 |
from robofab.interface.all.dialogs import ProgressBar |
|---|
| 8 |
|
|---|
| 9 |
factor = 1.37 |
|---|
| 10 |
myFont = CurrentFont() |
|---|
| 11 |
myGlyphs = myFont.selection |
|---|
| 12 |
|
|---|
| 13 |
myMin = SelectFont('Select source font one:') |
|---|
| 14 |
if myMin: |
|---|
| 15 |
myMax = SelectFont('Select source font two:') |
|---|
| 16 |
if myMax: |
|---|
| 17 |
bar = ProgressBar('Interpolating...', len(myGlyphs)) |
|---|
| 18 |
for myChar in myGlyphs: |
|---|
| 19 |
myFont.removeGlyph(myChar) |
|---|
| 20 |
myNewglyph = myFont.newGlyph(myChar) |
|---|
| 21 |
myNewglyph.interpolate(factor, myMin[myChar], myMax[myChar]) |
|---|
| 22 |
myFont[myChar].mark = 26 |
|---|
| 23 |
bar.tick() |
|---|
| 24 |
|
|---|
| 25 |
bar.close() |
|---|
| 26 |
myFont.update() |
|---|