From: Matthew Willis Date: Sun, 25 May 2008 20:24:56 +0000 (-0700) Subject: Add a larger text section example to "cairo.pango.gadgets" run X-Git-Tag: 0.94~3178 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=03ceb011259add3a688a9550a4165b72eb080acf Add a larger text section example to "cairo.pango.gadgets" run --- diff --git a/extra/cairo/pango/gadgets/gadgets.factor b/extra/cairo/pango/gadgets/gadgets.factor index 0ba901d453..fa12f96622 100644 --- a/extra/cairo/pango/gadgets/gadgets.factor +++ b/extra/cairo/pango/gadgets/gadgets.factor @@ -10,7 +10,7 @@ IN: cairo.pango.gadgets [ cr layout pango_cairo_show_layout ] (pango-gadget) ; USING: prettyprint sequences ui.gadgets.panes -threads ; +threads io.backend io.encodings.utf8 io.files ; : hello-pango ( -- ) 50 [ 6 + ] map [ "Sans " swap unparse append @@ -19,6 +19,10 @@ threads ; layout-font "今日は、 Pango!" layout-text ] curry gadget. yield - ] each ; + ] each + [ + "resource:extra/cairo/pango/gadgets/gadgets.factor" + normalize-path utf8 file-contents layout-text + ] gadget. ; MAIN: hello-pango