From e95cd5e19e87218bb3bb89a6a9c0af1ae50cf9a2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 26 Jan 2009 02:36:49 -0600 Subject: [PATCH] Clear font cache on startup --- basis/ui/text/core-text/core-text.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basis/ui/text/core-text/core-text.factor b/basis/ui/text/core-text/core-text.factor index 3e31908197..8b06793e89 100644 --- a/basis/ui/text/core-text/core-text.factor +++ b/basis/ui/text/core-text/core-text.factor @@ -3,7 +3,7 @@ USING: assocs accessors alien core-graphics.types core-text kernel hashtables namespaces sequences ui.gadgets.worlds ui.text ui.text.private opengl opengl.gl destructors combinators core-foundation -core-foundation.strings memoize math math.vectors ; +core-foundation.strings memoize math math.vectors init ; IN: ui.text.core-text SINGLETON: core-text-renderer @@ -40,6 +40,8 @@ MEMO: cache-font ( font -- open-font ) ] keep apply-font-traits ] with-destructors ; +[ \ cache-font reset-memoized ] "ui.text.core-text" add-init-hook + M: core-text-renderer open-font dup alien? [ cache-font ] unless ;