ui.text: more globals.

db4
John Benediktsson 2012-09-21 18:40:38 -07:00
parent be85b3bee3
commit a32ac00389
2 changed files with 4 additions and 4 deletions

View 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 ;

View File

@ -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 } ;