Drawing non-fuzzy text on a Form

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Drawing non-fuzzy text on a Form

Stephan Eggermont-3
How am I supposed to draw text on a Form(Canvas) without it looking  
all blurred?
I've installed Freetype and Polymorph (the pharo image with both), but  
it's unclear how to get a font that draws correctly. The non-truetype  
fonts give
much beter results, but are still blurred.

Stephan
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Drawing non-fuzzy text on a Form

Yoshiki Ohshima-2
At Tue, 28 Oct 2008 18:42:40 +0100,
[hidden email] wrote:
>
> How am I supposed to draw text on a Form(Canvas) without it looking  
> all blurred?
> I've installed Freetype and Polymorph (the pharo image with both), but  
> it's unclear how to get a font that draws correctly. The non-truetype  
> fonts give
> much beter results, but are still blurred.

  How *didn't* it work?  Are you talking about the text in a
particular place or results from some code you wrote?

  Does the result look as blurry as a normal TextMoprh on screen?  Or
even blurrier?  If it is the former, that is how it looks.  If the
latter, code like the following gives me a reasonable result.

t := TextMorph new.
t beAllFont: (StrikeFont familyName: 'BitstreamVeraSans' size: 18).
             "Choose your favorite font here."
t contents: 'ABC'.
f := Form extent: 100@100 depth: 32.
f fillColor: Color white.
t drawOn: f getCanvas.
f display

-- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners