From a32ac003896cc44b7ce3aeadfdb4f7b23f82c0ee Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 21 Sep 2012 18:40:38 -0700 Subject: [PATCH] ui.text: more globals. --- basis/ui/text/pango/pango.factor | 6 +++--- basis/ui/text/uniscribe/uniscribe.factor | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/ui/text/pango/pango.factor b/basis/ui/text/pango/pango.factor index 8499acf15e..b6501fe795 100644 --- a/basis/ui/text/pango/pango.factor +++ b/basis/ui/text/pango/pango.factor @@ -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 ; : ( 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 [ ] 2cache ; + cached-layouts get-global [ ] 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 ; diff --git a/basis/ui/text/uniscribe/uniscribe.factor b/basis/ui/text/uniscribe/uniscribe.factor index ef28868bc3..b06ec10506 100644 --- a/basis/ui/text/uniscribe/uniscribe.factor +++ b/basis/ui/text/uniscribe/uniscribe.factor @@ -11,7 +11,7 @@ M: uniscribe-renderer string-dim [ cached-script-string size>> ] if-empty ; M: uniscribe-renderer flush-layout-cache - cached-script-strings get purge-cache ; + cached-script-strings get-global purge-cache ; M: uniscribe-renderer string>image ( font string -- image loc ) cached-script-string script-string>image { 0 0 } ;