[GOODIE] Freetype/2 antialiased fonts demo
Ned Konz
ned at squeakland.org
Sun Mar 21 16:28:44 UTC 2004
On Saturday 20 March 2004 11:08 pm, Avi Bryant wrote:
> So I can see these in the system fonts menu, and they do look great -
> much better at smaller sizes than with TTCFont. However, if I try to
> choose one, I get an MNU for #actualTextStyles.
Oops. Change "Utilities" to "TextStyle" in AbstractFont>>textStyle.
> Also, when
> selected/inverted, they suddenly look awful, like a horribly aliased
> 1-bit version of themselves. Is this expected?
No, but I'm not surprised. I think what's happening is that the destination is
transparent and the antialiased parts are coming up as black.
See, this was a "demo"; it wasn't actually intended to be useful <g>.
I just was going through my disk and remembered that I'd been working on the
FT2 fonts (the original work was done by Arjen van Elteren, and I was just
working on packaging and bug fixes). So I decided to put a demo out (and get
a working plugin for my own use).
There's more work that should be done before this is ready for prime time:
* get the plugin working on other platforms
* fix the leading problems (missing pixels on descenders)
* come up with a new rendering mode that uses the source value as an alpha
channel for alpha-blending the fill style with the destination.
Arjen added (a version of) this as a submode to mode 34. I'm not sure that's
the best idea (we could alternately make up a new mode).
I'm faking this in the demo by converting the 8-bit alpha channel Form stored
in the FT2Font instances into a colored 32-bit Form and then using the
existing mode 34 to alpha-blend it with the destination. However, this is
probably slow (there's no caching, etc.)
* unify font handling between the TTCFont, FT2Font, FontPlugin, FT2Plugin,
StrikeFont, and PlatformFont.
* use the font family information in the TT fonts to build families for
emphasis (italic/bold/etc.).
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|