]> gitweb.factorcode.org Git - factor.git/commitdiff
Add a larger text section example to "cairo.pango.gadgets" run
authorMatthew Willis <matthew.willis@mac.com>
Sun, 25 May 2008 20:24:56 +0000 (13:24 -0700)
committerMatthew Willis <matthew.willis@mac.com>
Sun, 25 May 2008 20:24:56 +0000 (13:24 -0700)
extra/cairo/pango/gadgets/gadgets.factor

index 0ba901d453f67e4f618bdef9849e7b94137d1771..fa12f966229a46cf093f5c375e9b38bf94b4bfac 100644 (file)
@@ -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
         <pango-gadget> gadget. yield
-    ] each ;
+    ] each
+    [ 
+        "resource:extra/cairo/pango/gadgets/gadgets.factor"
+        normalize-path utf8 file-contents layout-text
+    ] <pango-gadget> gadget. ;
 
 MAIN: hello-pango