Commit 28079829 authored by John H's avatar John H

empty ufo, script to generate scripts to generate glyphs

parent 916ebd56
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ascender</key>
<integer>750</integer>
<key>capHeight</key>
<integer>750</integer>
<key>descender</key>
<integer>-250</integer>
<key>familyName</key>
<string>Morphologic</string>
<key>postscriptBlueValues</key>
<array>
</array>
<key>postscriptFamilyBlues</key>
<array>
</array>
<key>postscriptFamilyOtherBlues</key>
<array>
</array>
<key>postscriptOtherBlues</key>
<array>
</array>
<key>postscriptStemSnapH</key>
<array>
</array>
<key>postscriptStemSnapV</key>
<array>
</array>
<key>styleName</key>
<string>Regular</string>
<key>unitsPerEm</key>
<integer>1000</integer>
<key>xHeight</key>
<integer>500</integer>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.typemytype.robofont.compileSettings.autohint</key>
<true/>
<key>com.typemytype.robofont.compileSettings.checkOutlines</key>
<true/>
<key>com.typemytype.robofont.compileSettings.decompose</key>
<true/>
<key>com.typemytype.robofont.compileSettings.generateFormat</key>
<integer>0</integer>
<key>com.typemytype.robofont.compileSettings.releaseMode</key>
<false/>
<key>com.typemytype.robofont.italicSlantOffset</key>
<integer>0</integer>
<key>com.typemytype.robofont.layerOrder</key>
<array>
<string>background</string>
</array>
<key>com.typemytype.robofont.segmentType</key>
<string>curve</string>
<key>com.typemytype.robofont.shouldAddPointsInSplineConversion</key>
<false/>
<key>com.typemytype.robofont.sort</key>
<array>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>alphabetical</string>
</dict>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>category</string>
</dict>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>unicode</string>
</dict>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>script</string>
</dict>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>suffix</string>
</dict>
<dict>
<key>allowPseudoUnicode</key>
<true/>
<key>type</key>
<string>decompositionBase</string>
</dict>
</array>
<key>public.glyphOrder</key>
<array>
<string>A</string>
<string>Agrave</string>
<string>Aacute</string>
<string>Acircumflex</string>
<string>Atilde</string>
<string>Adieresis</string>
<string>Aring</string>
<string>B</string>
<string>C</string>
<string>Ccedilla</string>
<string>D</string>
<string>E</string>
<string>Egrave</string>
<string>Eacute</string>
<string>Ecircumflex</string>
<string>Edieresis</string>
<string>F</string>
<string>G</string>
<string>H</string>
<string>I</string>
<string>Igrave</string>
<string>Iacute</string>
<string>Icircumflex</string>
<string>Idieresis</string>
<string>J</string>
<string>K</string>
<string>L</string>
<string>M</string>
<string>N</string>
<string>Ntilde</string>
<string>O</string>
<string>Ograve</string>
<string>Oacute</string>
<string>Ocircumflex</string>
<string>Otilde</string>
<string>Odieresis</string>
<string>P</string>
<string>Q</string>
<string>R</string>
<string>S</string>
<string>T</string>
<string>U</string>
<string>Ugrave</string>
<string>Uacute</string>
<string>Ucircumflex</string>
<string>Udieresis</string>
<string>V</string>
<string>W</string>
<string>X</string>
<string>Y</string>
<string>Yacute</string>
<string>Z</string>
<string>AE</string>
<string>Eth</string>
<string>Oslash</string>
<string>Thorn</string>
<string>a</string>
<string>agrave</string>
<string>aacute</string>
<string>acircumflex</string>
<string>atilde</string>
<string>adieresis</string>
<string>aring</string>
<string>b</string>
<string>c</string>
<string>ccedilla</string>
<string>d</string>
<string>e</string>
<string>egrave</string>
<string>eacute</string>
<string>ecircumflex</string>
<string>edieresis</string>
<string>f</string>
<string>g</string>
<string>h</string>
<string>i</string>
<string>igrave</string>
<string>iacute</string>
<string>icircumflex</string>
<string>idieresis</string>
<string>j</string>
<string>k</string>
<string>l</string>
<string>m</string>
<string>n</string>
<string>ntilde</string>
<string>o</string>
<string>ograve</string>
<string>oacute</string>
<string>ocircumflex</string>
<string>otilde</string>
<string>odieresis</string>
<string>p</string>
<string>q</string>
<string>r</string>
<string>s</string>
<string>t</string>
<string>u</string>
<string>ugrave</string>
<string>uacute</string>
<string>ucircumflex</string>
<string>udieresis</string>
<string>v</string>
<string>w</string>
<string>x</string>
<string>y</string>
<string>yacute</string>
<string>ydieresis</string>
<string>z</string>
<string>ordfeminine</string>
<string>ordmasculine</string>
<string>germandbls</string>
<string>ae</string>
<string>eth</string>
<string>oslash</string>
<string>thorn</string>
<string>dotlessi</string>
<string>mu</string>
<string>circumflex</string>
<string>caron</string>
<string>zero</string>
<string>one</string>
<string>two</string>
<string>three</string>
<string>four</string>
<string>five</string>
<string>six</string>
<string>seven</string>
<string>eight</string>
<string>nine</string>
<string>onequarter</string>
<string>onehalf</string>
<string>threequarters</string>
<string>underscore</string>
<string>hyphen</string>
<string>parenleft</string>
<string>bracketleft</string>
<string>braceleft</string>
<string>parenright</string>
<string>bracketright</string>
<string>braceright</string>
<string>guillemotleft</string>
<string>quoteleft</string>
<string>guillemotright</string>
<string>quoteright</string>
<string>exclam</string>
<string>quotedbl</string>
<string>numbersign</string>
<string>percent</string>
<string>ampersand</string>
<string>asterisk</string>
<string>comma</string>
<string>period</string>
<string>slash</string>
<string>colon</string>
<string>semicolon</string>
<string>question</string>
<string>at</string>
<string>backslash</string>
<string>exclamdown</string>
<string>periodcentered</string>
<string>questiondown</string>
<string>plus</string>
<string>less</string>
<string>equal</string>
<string>greater</string>
<string>bar</string>
<string>asciitilde</string>
<string>logicalnot</string>
<string>plusminus</string>
<string>multiply</string>
<string>divide</string>
<string>minus</string>
<string>dollar</string>
<string>cent</string>
<string>sterling</string>
<string>currency</string>
<string>yen</string>
<string>asciicircum</string>
<string>grave</string>
<string>dieresis</string>
<string>macron</string>
<string>acute</string>
<string>cedilla</string>
<string>breve</string>
<string>dotaccent</string>
<string>ring</string>
<string>ogonek</string>
<string>tilde</string>
<string>hungarumlaut</string>
<string>brokenbar</string>
<string>section</string>
<string>copyright</string>
<string>registered</string>
<string>degree</string>
<string>paragraph</string>
<string>space</string>
<string>onesuperior</string>
<string>threesuperior</string>
<string>twosuperior</string>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>creator</key>
<string>org.robofab.ufoLib</string>
<key>formatVersion</key>
<integer>2</integer>
</dict>
</plist>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from random import shuffle
import unicodedata
import codecs
import re
def slugify(value):
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
value = re.sub('[^\w\s-]', '', value).strip().lower()
return re.sub('[-\s]+', '-', value)
glyphs = [u'a',
u'b',
u'c',
u'd',
u'e',
u'f',
u'g',
u'h',
u'i',
u'j',
u'k',
u'l',
u'm',
u'n',
u'o',
u'p',
u'q',
u'r',
u's',
u't',
u'u',
u'v',
u'w',
u'x',
u'y',
u'z',
u'exclam',
u'ampersand',
u'question',
u'Euro',
u'percent',
u'germandbls']
student_names = [u'Stefania-Lea Antoniadou',
u'Burcin Araz',
u'Peer Viktor Guba',
u'Matthias Mann',
u'Jennifer Mantas',
u'Erel Özdemir',
u'Joana von Fuchs',
u'Judika Zerrer',
u'Elisabeth Mross',
u'Anna-Lena Preinfalk',
u'Felix Marvin Vetter',
u'Patrick Wellmann',
u'Avalon Leonetti',
u'Matthias Braun',
u'Alina Kadlubsky',
u'Jasmin Rathfelder',
u'Dino Alexander Carasso',
u'Constantina Di Leo',
u'Lisa-Sarah Efeoglu',
u'Jonas Michael Glück',
u'Tobias Hahn',
u'Michela Albertini',
u'Sandra Gentner',
u'Madlen Göhring',
u'Jule Hartmann',
u'Tamara Hell',
u'Beatrice Straile',
u'Eva Maria Strecker',
u'Raymin Chen',
u'Oliver Kosic',
u'David Lindner',
u'Yasmin Abouharia']
shuffle(glyphs)
script = """#!/usr/bin/env python
# Script to generate the %s, by %s
from robofab.world import RFont
font = RFont('Morphologic.ufo')
glyph = font.newGlyph('%s')
pen = glyph.getPen()
# ! Drawing instructions here !
# ! Otherwise nothing happens !
font.save()
"""
for i, student in enumerate(student_names):
#f = codecs.open(slugify(student) + '.py','UTF-8')
#f.write(script % (glyphs[i], student))
#f.close()
print slugify(student) + '.py', student, glyphs[i]
print script % (glyphs[i], student)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment