[Newbies] Drawing non-fuzzy text on a Form

Yoshiki Ohshima yoshiki at vpri.org
Wed Oct 29 06:04:21 UTC 2008


At Tue, 28 Oct 2008 18:42:40 +0100,
stephan at stack.nl 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 at 100 depth: 32.
f fillColor: Color white.
t drawOn: f getCanvas.
f display

-- Yoshiki


More information about the Beginners mailing list