diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2016-09-14 14:05:15 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2016-09-14 14:05:15 +0200 |
commit | 147b5c5f02543e7a32af04813d4da2cb00b5ab48 (patch) | |
tree | 57825e85de1d3fa5880505464aeb035b51faffee | |
parent | 66ecac3a9e67afabf25bc7d7aaf44f3a5ae793ba (diff) |
[pipeline] Remove stuff
-rwxr-xr-x | fontpipeline/fontpipeline_slides.py | 176 | ||||
-rw-r--r-- | fontpipeline/fontpipeline_theme.py | 34 |
2 files changed, 29 insertions, 181 deletions
diff --git a/fontpipeline/fontpipeline_slides.py b/fontpipeline/fontpipeline_slides.py index d8c6583..ccde2c7 100755 --- a/fontpipeline/fontpipeline_slides.py +++ b/fontpipeline/fontpipeline_slides.py @@ -29,7 +29,7 @@ body_font="sans" # "PT Sans" mono_font="Consolas, monospace" slides = [] -def slide_add(f, data=None, width=1920, height=1200): +def slide_add(f, data=None, width=1920, height=1024): if data is None: data = {} if "desc" not in data: @@ -48,7 +48,7 @@ def slide(f, data=None, scale=None): data = {} if not scale: scale = 1.4 def slider(r): - r.move_to (100, 80) + r.move_to (50, 30) r.scale(scale, scale) r.put_text (f, valign=1, halign=1, desc=body_font) #r.set_allocation (x, y, width, height) @@ -69,12 +69,12 @@ def bullet_list_slide (title, items): data={'desc': body_font, 'align': pango.ALIGN_LEFT} slide (ts, data) -def image_slide (f, width=1920, height=1200, imgwidth=0, imgheight=0, xoffset=0, yoffset=0, data=None): +def image_slide (f, width=1920, height=1024, imgwidth=0, imgheight=0, xoffset=0, yoffset=0, data=None): def s (r): - r.move_to (960+xoffset, 600+yoffset) + r.move_to (960+xoffset, 512+yoffset) r.put_image (f, width=imgwidth, height=imgheight) x = (1920 - width) * .5 - y = (1200 - height) * .5 + y = (1024 - height) * .5 r.set_allocation (x, y, width, height) s.__name__ = f slide (s, data) @@ -86,87 +86,23 @@ def image_slide (f, width=1920, height=1200, imgwidth=0, imgheight=0, xoffset=0, @slide def title_slide (r): - r.move_to (50, 100) - r.put_text ("<span font_desc='"+title_font+"' font_size='large'>FontTools/TTX\n"+ - "The Power of Open Source for OpenType</span>", - valign=1, halign=1, desc=title_font+" 72") - - r.move_to (300, 600) + r.move_to (30, 1000) + r.save() + r.set_source_rgb(0xf6/255., 0x48/255., 0x48/255.) + r.put_text ("<span font_desc='"+title_font+"' font_size='large'>The\nOpen\nSource\n"+ + "Python\nFont\nProduction\nPipeline</span>", + valign=-1, halign=1, desc=title_font+" 72") + + r.restore() + r.move_to (1890, 1000) r.scale(1.4, 1.4) - r.put_text ("Part 1: Just van Rossum\nPart 2: Behdad Esfahbod\nPart 3: Q&A\n\n<span font_desc='"+mono_font+"'>github.com/behdad/fonttools</span>", halign=1, valign=+1) - -bullet_list_slide("Background: 2003", [ - "FarsiWeb days", - ]) -bullet_list_slide("Background: 2013", [ - "July: Subsetter is born", - ]) -bullet_list_slide("Background: 2013", [ - "July: 'COLR'/'CPAL' table", - "August: Google color fonts", - "August: 'SVG ' table from Read Roberts", - "August: Cosimo shows up", - "August: Remove numpy dependency", - "September: 'sbix' table form Jens Kutilek", - "October: ATypI 2013 Amsterdam", - "November: Port to Python 2/3", - "...", - ]) - -bullet_list_slide("2014", [ - "Optimized the subsetter", - "Implemented merger", - "Hooked up the test suite", - "Released 2.5", - "ATypI 2014 Barcelona", - ]) - -bullet_list_slide("2015", [ - "Sascha joiners", - "gvar/fvar/avar", - "Noto pipeline starts", - "Released 3.0", - "ATypI 2015 Saõ Paulo", - "Coninuous integration", - ]) + r.put_text ("Marek Jeziorek\nBehdad Esfahbod\nGoogle", halign=-1, valign=-1) bullet_list_slide("Noto pipeline", [ "glyphs2ufo", "robofab vs extractor", ]) -slide_title("2015-01", """ -https://github.com/robofab-developers/robofab/pull/29 - -@letterror: -Does this pull make robofab dependent on a -specific fork of FontTools? -""") - -slide_title("2015-04", """ -https://github.com/typesupply/compositor/issues/7 - -Subject: test Coverage object if it has a Format attr - -@typemytype: -a small patch to make compositor work with the github -fontTools version - -@typesupply: -Is there a change list somewhere of all the things that -you've done since forking from the original FontTools? -We're running into lots of things so it would be good to -have something to review. -""", scale=1.3) - -image_slide("lucky-cat.jpg") - -slide_title("\n\n", """ -"These Dutch people..." - -"Google forked us..." -""") - bullet_list_slide("Noto pipeline", [ "glyphs2ufo", "robofab", @@ -219,53 +155,6 @@ bullet_list_slide("Noto pipeline: defcon", [ "cu2qu", ]) -bullet_list_slide("OpenType 2.0 / GX / Saõ Paulo", '') - -slide_title("2015-11-26",""" -From: Behdad Esfahbod -To: Erik van Blokland - -Hi Erik, - -I'm planning to visit The Hague in January, mostly to -meet Bahman, and hopefully to work with you. We -can discuss / hack on interpolation, OpenType GX, -or really anything fonts & Python. Would you be -interested in that? I'm thinking some time the week -of January 18th. -""") -slide_title("2015-11-27",""" -From: Erik van Blokland -To: Behdad Esfahbod - -Hi Behdad, - -That's unexpected :) I have time that week and we -can meet earlier in the week. I do have some -academic obligations on Thursday and Friday and -the Type and Media open day that Saturday. - -Would that work for you? -""") - -slide_title("2016-01-16",""" -From: Erik van Blokland -To: Behdad Esfahbod - -Hi Behdad, - -I hope to see you next week! It’s above freezing -but a lot of rain. - -Just is at the academy on Wednesday and would like -to meet you. Frederik Berlaen lives in Gent, Belgium -and can come up on Friday or Thursday. -""") - -slide_title("2016-01-20",""" -Tabs or spaces? -""", scale=2) - bullet_list_slide("Noto pipeline", [ "glyphs2ufo", "ufoLib", @@ -319,46 +208,20 @@ bullet_list_slide("Noto pipeline: noto-source", [ bullet_list_slide("Noto pipeline: TODO", [ "fontTools.varLib", "CFF operator specializer", - "ttfautohint", "FDK hinter", ]) -image_slide("jenga1.jpg") +#image_slide("jenga1.jpg") image_slide("jenga2.jpg") bullet_list_slide("Noto pipeline: challenges", [ - "Dependency hell (see pen hell?!)", + "Dependency hell", "Stability", "Speed", "Flexibility", ]) -slide_title("Eng time!", "") -slide_title("from fontTools.misc.py23 import *", "") -slide_title("Snippets/symfont.py roboto.ttf", """ -glyph: slash -Area: 0.0631374 -Correlation: 0.964027 -Covariance: 0.0190825 -MeanX: 0.196996 -MeanY: 0.324567 -Moment1X: 0.0124378 -Moment1Y: 0.0204923 -Moment2XX: 0.00294835 -Moment2XY: 0.00524173 -Moment2YY: 0.00978664 -Perimeter: 1.81758 -Slant: 0.38425 -StdDevX: 0.0888251 -StdDevY: 0.222849 -VarianceX: 0.0078899 -VarianceY: 0.0496617 -""", scale=1.0) -slide_title("compreffor", "") -slide_title("cu2qu", "") - -slide_title("Links", """ -github.com/googlei18n/noto-source +slide_title("", """ github.com/googlei18n/fontmake github.com/googlei18n/glyphsLib github.com/unified-font-object/ufoLib @@ -370,6 +233,7 @@ github.com/typemytype/booleanOperations github.com/googlei18n/cu2qu github.com/googlei18n/compreffor github.com/behdad/fonttools +www.freetype.org/ttfautohint/ """) slide_title("Q&A", '') @@ -377,4 +241,4 @@ slide_title("Q&A", '') if __name__ == "__main__": import slippy import fontpipeline_theme - slippy.main (slides, fontpipeline_theme, args=['--geometry', '1920x1200']) + slippy.main (slides, fontpipeline_theme, args=['--geometry', '1920x1024']) diff --git a/fontpipeline/fontpipeline_theme.py b/fontpipeline/fontpipeline_theme.py index 2ba7b9f..69e4e8d 100644 --- a/fontpipeline/fontpipeline_theme.py +++ b/fontpipeline/fontpipeline_theme.py @@ -24,21 +24,8 @@ footer_margin = .03 padding = .000 bubble_rad = .25 -fg_color = (.2,.2,.2) -palette = [ -(0x0f,0x00,0x7e), -(0x74,0x00,0xa5), -(0xae,0x00,0x92), -(0xdf,0x00,0x4e), -(0xff,0x1a,0x0f), -(0xff,0x42,0x04), -(0xf1,0x90,0x00), -(0xff,0xbc,0x00), -] -palette = palette + list(reversed(palette[1:-1])) -palette_cairo = [tuple(c/1. for c in color) for color in palette] -palette = ["#%02x%02x%02x" % color for color in palette] -j = 0 +fg_color = (.3,.3,.3) +bg_color = (0xf6/255., 0x48/255., 0x48/255.) def prepare_page (renderer): cr = renderer.cr @@ -52,20 +39,17 @@ def prepare_page (renderer): p = padding * min (width, height) p2 = 2 * p - cr.set_source_rgb (.9, .9, .9) + cr.set_source_rgb (1, 1, 1) cr.paint () cr.set_source_rgb (*fg_color) cr.move_to (.5 * width, height-p2) - text = unicode("Behdad Esfahbod | FontTools/TTX | TYPO Labs Berlin | 11 may 2016") - letters = [] - global j - for i,c in enumerate(text): - color = palette[(i+j) % len(palette)] - letters.append('<span foreground="%s">%s</span>' % (color, c)) - j -= 1 - markup = ''.join(letters) - renderer.put_text (markup, height=f-p2, valign=-1, desc="") + text = unicode("Behdad Esfahbod | Pipeline | ATypI 2016 Warsaw | September 14, 2016") + renderer.save() + renderer.set_source_rgb (*bg_color) + renderer.put_text (text, height=f-p2, valign=-1, desc="") + renderer.restore() + # Compute rectangle available for slide content w = width - s - s - p * 2 |