TrueType based TextStyle

Yoshiki.Ohshima at acm.org Yoshiki.Ohshima at acm.org
Sun Dec 1 09:04:29 UTC 2002


  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:-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TrueTypeTextStyle2.cs.gz
Type: application/octet-stream
Size: 4304 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021201/c2b11386/TrueTypeTextStyle2.cs.obj
-------------- next part --------------




More information about the Squeak-dev mailing list