]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.text: more globals.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 22 Sep 2012 01:40:38 +0000 (18:40 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 22 Sep 2012 01:40:38 +0000 (18:40 -0700)
basis/ui/text/pango/pango.factor
basis/ui/text/uniscribe/uniscribe.factor

index 8499acf15e6297e0c16baff8d0421827f980e0d0..b6501fe7952386f39f94a1b7fc261614dd8d8e3a 100644 (file)
@@ -128,7 +128,7 @@ SYMBOL: dpi
     ] [ escape-nulls >>string ] if ; inline
 
 : set-layout-resolution ( layout -- )
-    pango_layout_get_context dpi get pango_cairo_context_set_resolution ;
+    pango_layout_get_context dpi get-global pango_cairo_context_set_resolution ;
 
 : <PangoLayout> ( text font -- layout )
     dummy-cairo pango_cairo_create_layout |g_object_unref
@@ -170,7 +170,7 @@ M: layout dispose* layout>> g_object_unref ;
 SYMBOL: cached-layouts
 
 : cached-layout ( font string -- layout )
-    cached-layouts get [ <layout> ] 2cache ;
+    cached-layouts get-global [ <layout> ] 2cache ;
 
 : cached-line ( font string -- line )
     cached-layout layout>> first-line ;
@@ -185,7 +185,7 @@ M: pango-renderer string-dim
     [ cached-layout logical-rect>> dim>> [ >integer ] map ] if-empty ;
 
 M: pango-renderer flush-layout-cache
-    cached-layouts get purge-cache ;
+    cached-layouts get-global purge-cache ;
 
 M: pango-renderer string>image ( font string -- image loc )
     cached-layout [ layout>image ] [ text-position vneg ] bi ;
index ef28868bc36c187173c2ced253b7abc65c3e829e..b06ec10506e4cc81cd0ed9a13fc289daf2ac048b 100644 (file)
@@ -11,7 +11,7 @@ M: uniscribe-renderer string-dim
     [ cached-script-string size>> ] if-empty ;\r
 \r
 M: uniscribe-renderer flush-layout-cache\r
-    cached-script-strings get purge-cache ;\r
+    cached-script-strings get-global purge-cache ;\r
 \r
 M: uniscribe-renderer string>image ( font string -- image loc )\r
     cached-script-string script-string>image { 0 0 } ;\r