closes PR 11293
This commit is contained in:
parent
b9b7bb784a
commit
05d16d9311
|
@ -880,6 +880,12 @@
|
||||||
=>
|
=>
|
||||||
(text "ab" 18 "blue"))
|
(text "ab" 18 "blue"))
|
||||||
|
|
||||||
|
;; make sure this doesn't crash (there was a bug that would be triggered by drawing these guys)
|
||||||
|
(test (equal? (scale 0.1 (text "Howdy!" 12 'black))
|
||||||
|
(scale 0.1 (text "Howdy!" 12 'red)))
|
||||||
|
=>
|
||||||
|
#f)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; triangle
|
;; triangle
|
||||||
|
|
|
@ -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)))
|
(set-bitmap-rendered-mask! bitmap new-mask)))
|
||||||
|
|
||||||
(define (text->font text)
|
(define (text->font text)
|
||||||
|
(define adjusted-size (min (max (inexact->exact (round (text-size text))) 1) 255))
|
||||||
(cond
|
(cond
|
||||||
[(text-face text)
|
[(text-face text)
|
||||||
(send the-font-list find-or-create-font
|
(send the-font-list find-or-create-font
|
||||||
(text-size text)
|
adjusted-size
|
||||||
(text-face text)
|
(text-face text)
|
||||||
(text-family text)
|
(text-family text)
|
||||||
(text-style 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))]
|
(text-underline text))]
|
||||||
[else
|
[else
|
||||||
(send the-font-list find-or-create-font
|
(send the-font-list find-or-create-font
|
||||||
(text-size text)
|
adjusted-size
|
||||||
(text-family text)
|
(text-family text)
|
||||||
(text-style text)
|
(text-style text)
|
||||||
(text-weight text)
|
(text-weight text)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user