TrueType based TextStyle

Andreas Raab andreas.raab at gmx.de
Mon Dec 2 00:33:16 UTC 2002


Hi Yoshiki,

The cached TTF rendering rocks!!! It is not only a zillion times faster
but also fixes some weird problems with the raw bezier rendering (when I
turned it on I sometimes got it overlayed with menus on top and at other
times it looks like the AA "got lost" someplace). It's beautiful and
fast - this is great!

Thank you so much.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Yoshiki.Ohshima at acm.org
> Sent: Sunday, December 01, 2002 10:04 AM
> To: squeak-dev at lists.squeakfoundation.org
> Cc: craig.latta at netjam.org; Andreas.Raab at gmx.de
> Subject: Re: TrueType based TextStyle
> 
> 
>   Hello,
> 
> > Unfortunately, I haven't yet looked at the code, but here's 
> something that
> > might be of help. For >= 8 bpp you can use rule 34 (this is 
> what Balloon
> > uses). There is one gotcha though since rule 34 expects 
> *prescaled* rgb in the
> > source. Meaning that the encoding for rule 34 needs to be 
> like what you see in
> > #scaledPixelValue32 (that's what this method is for). This 
> will perform alpha
> > blending regardless of destination depth but it's pretty 
> clear that the
> > results will be less than optimal for 8bpp. However, for 
> 16bpp (which is the most
> > likely use) you even get a very reasonable ordered dither for free.
> 
>   I tried the rule 34 and it works for 16bpp and 32bpp destinations!
> Attached is the revised version of change set.  File it in and you'll
> see 'ComicSansMS' and 'RenderedComicSansMS' styles in the font list
> menu.
> 
>   A little nice to have feature is to map the translucent anti-aliased
> fringe color to the specified color.  Namely, if the user specifies
> some color other than black, it would be nice if we can simply change
> the color of previously rendered bitmaps.  Right now, it always
> flushes the internal bitmap cache when it is requested to change the
> text color.
> 
>   I haven't done any serious performance evaluation.  It'd be higly
> appriciated:-)
> 




More information about the Squeak-dev mailing list