From 872c5872555d372b4320b6f4be503acb7053df56 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 7 Oct 2010 19:35:53 -0500 Subject: [PATCH] closes PR 11293 original commit: 05d16d931121f56a2b98454d61d17588635cbadc --- collects/mrlib/image-core.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index 6c15ac3a..5088b252 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -905,10 +905,11 @@ the mask bitmap and the original bitmap are all together in a single bytes! (set-bitmap-rendered-mask! bitmap new-mask))) (define (text->font text) + (define adjusted-size (min (max (inexact->exact (round (text-size text))) 1) 255)) (cond [(text-face text) (send the-font-list find-or-create-font - (text-size text) + adjusted-size (text-face text) (text-family text) (text-style text) @@ -916,7 +917,7 @@ the mask bitmap and the original bitmap are all together in a single bytes! (text-underline text))] [else (send the-font-list find-or-create-font - (text-size text) + adjusted-size (text-family text) (text-style text) (text-weight text)