diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2016-05-10 13:50:02 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2016-05-10 13:50:02 +0200 |
commit | c63fd71c940004e1c8b5e6aef3ee43d844dd4767 (patch) | |
tree | e479fad2ae858dc195e24e33a14923146ab7a85f | |
parent | 22612774683739c1cb85a231741285d4c1bff2d7 (diff) |
[opentypegx] Some more
-rwxr-xr-x | opentype-gx/opentypegx_slides.py | 82 | ||||
-rwxr-xr-x | opentype-gx/samples/random-instance-demo.sh | 2 | ||||
-rw-r--r-- | pangopygments.py | 1 |
3 files changed, 66 insertions, 19 deletions
diff --git a/opentype-gx/opentypegx_slides.py b/opentype-gx/opentypegx_slides.py index bdc88e8..cbdbd1f 100755 --- a/opentype-gx/opentypegx_slides.py +++ b/opentype-gx/opentypegx_slides.py @@ -72,6 +72,13 @@ def slide_heading(f, data=None): else: return slide_who (f, 0, data=data) +def slide_title (title, text): + def s (r): + ts = "<span font_desc='"+head_font+"'>"+title+"</span>\n" + return ts + text + s.__name__ = title + data={'desc': body_font, 'align': pango.ALIGN_LEFT} + slide (s, data) def bullet_list_slide (title, items): def s (r): ts = "<span font_desc='"+head_font+"'>"+title+"</span>\n" @@ -171,11 +178,13 @@ def agenda(i=None): "Practicalities", "Proposal", "Implementation", - "Discussion" + "Possibilities", + "Demos", + "Discussion", ] if i is not None: i = items.index(i) - items[i] = "<span foreground='red'>%s</span>" % items[i] + items[i] = "<span foreground='#444488'>%s</span>" % items[i] bullet_list_slide("Agenda", items) agenda() @@ -230,9 +239,9 @@ bullet_list_slide("Font var metadata", [ " → Arbitrary axes\n" " → Named instances", "Apple 'avar' table\n" + " → MutatorMath Bender\n" " → Luc(as) curve\n" - " → Pablo curve\n" - " → etc", + " → Pablo curve", "Clarify standard axes", ]) @@ -285,24 +294,61 @@ bullet_list_slide("Hinting: CFF", [ ]) agenda('Implementation') -bullet_list_slide("Implementation", [ - ]) -bullet_list_slide("", [ - ]) - -agenda('Discussion') -bullet_list_slide("Discussion", [ - ]) -bullet_list_slide("", [ - ]) - -bullet_list_slide("", [ +slide_title("Implementation", ( + "fvar / avar / gvar / cvar\n" + " → Apple: OS X, iOS?\n" + " → FreeType (bug fixes)" + )) +slide_title("Implementation", ( + "fvar / avar / gvar / cvar\n" + " → FontTools\n" + " → varLib.__init__\n" + " → varLib.mutator" + )) +slide_title("Implementation", ( + "Combined with other tools\n" + " → UFO + .designspace\n" + " → Glyphs" + )) +slide_title("Implementation", ( + "GSUB / GPOS / GDEF\n" + " → Design\n" + " → Prototype" + )) + +agenda('Possibilities') +source_slide(""" +@font-face { + font-family: MyFont; + font-weight: 700; + font-stretch: condensed; + src: url("fonts/myvar.ttc#2,wght=1.4,wdth=0.7") + format(collection,variation), + url("fonts/fallback-bold-cond.ttf"), + format(truetype); +} +""", "css") +source_slide(""" +@font-family { + font-family: MyFont; + src: url("myvar.ttf") format(truetype); + font-weight-min: 100; + font-weight-max: 500; + font-stretch-min: 70; + font-stretch-max: 130; +} +""", "css") +bullet_list_slide("Possibilities", [ + "Justification", + "Animation", + "Grading", + "Tickling", + "...", ]) agenda('Demos') -#python_slide(open("snippets/drop_glyphnames.py").read()) -#source_slide(open("snippets/merging.txt").read(), "text") +agenda('Discussion') bullet_list_slide("Links", [ "https://github.com/behdad/fonttools", diff --git a/opentype-gx/samples/random-instance-demo.sh b/opentype-gx/samples/random-instance-demo.sh index 7f52612..ca1a2c4 100755 --- a/opentype-gx/samples/random-instance-demo.sh +++ b/opentype-gx/samples/random-instance-demo.sh @@ -15,6 +15,6 @@ while read tag min default max; do echo "$tag=$rnd" done | tee | ( xargs python varLib/mutator.py "$font" && - hb-view "$outfont" "$text" > "$outpng" && + hb-view "$outfont" "$text" --font-size 800 > "$outpng" && (display "$outpng" &) ) diff --git a/pangopygments.py b/pangopygments.py index b9823c9..89339f9 100644 --- a/pangopygments.py +++ b/pangopygments.py @@ -65,6 +65,7 @@ class PangoFormatter(Formatter): __LEXERS = { 'c': lexers.CLexer, 'cpp': lexers.CppLexer, + 'css': lexers.CssLexer, 'java': lexers.JavaLexer, 'go': lexers.GoLexer, 'py': lexers.PythonLexer, |