From a56d4ec50d94c13a722d81fe4648162fbea1f381 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 26 Aug 2009 14:58:15 -0500 Subject: [PATCH] core-text: always create at least a 1x1 bitmap context. snow leopard refuses to create 0x0 contexts --- basis/core-text/core-text.factor | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/basis/core-text/core-text.factor b/basis/core-text/core-text.factor index 4add71b08f..52f4eb5e2e 100644 --- a/basis/core-text/core-text.factor +++ b/basis/core-text/core-text.factor @@ -2,10 +2,11 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays alien alien.c-types alien.syntax kernel destructors accessors fry words hashtables strings sequences memoize assocs math -math.vectors math.rectangles math.functions locals init namespaces -combinators fonts colors cache core-foundation core-foundation.strings -core-foundation.attributed-strings core-foundation.utilities -core-graphics core-graphics.types core-text.fonts core-text.utilities ; +math.order math.vectors math.rectangles math.functions locals init +namespaces combinators fonts colors cache core-foundation +core-foundation.strings core-foundation.attributed-strings +core-foundation.utilities core-graphics core-graphics.types +core-text.fonts core-text.utilities ; IN: core-text TYPEDEF: void* CTLineRef @@ -120,7 +121,7 @@ TUPLE: line < disposable line metrics image loc dim ; (ext) [ (loc) (dim) v+ ] loc [ (loc) [ floor ] map ] ext [ (loc) (dim) [ + ceiling ] 2map ] - dim [ ext loc [ - >integer ] 2map ] + dim [ ext loc [ - >integer 1 max ] 2map ] metrics [ open-font line compute-line-metrics ] | line >>line @@ -149,4 +150,4 @@ SYMBOL: cached-lines : cached-line ( font string -- line ) cached-lines get [ ] 2cache ; -[ cached-lines set-global ] "core-text" add-init-hook \ No newline at end of file +[ cached-lines set-global ] "core-text" add-init-hook