] [ 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
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 ;
[ 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 ;
[ 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