freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] The kind of anti-aliased colored fonts I'm talking about.


From: Dave Williss
Subject: Re: [Freetype] The kind of anti-aliased colored fonts I'm talking about...
Date: Fri, 7 Jun 2002 14:29:56 -0500

One way to implement this is to get a pixmap out from FreeType.
Scale the grays to the range of 0-255 if necessary,  Now create
an ARGB pixmap (or whatever it's called in your target API) using
the gray anti-aliased text as the A and make the color parts constant.
Blit to screen.  You can even adjust the alpha range so that the solid
parts are partly transparent and all sorts of cool things.

Here's a trick that would be cool:
Render the glyph to a pixmap which is just  a bit bigger than needed
by a few pixels each way (center the glyph).  Use this to create, an
ARGB pixmap like above, but don't blit it yet.  Next, run a low pass
filter on the grayscale glyph to blur it out and make it more transparent.
Now use that as the alpha channel of another ARGB pixmap with a solid
gray.  Now render this down and to the right a few pixels from where
the real glyph will go.  Easy drop-shadow.  For best results, you want to
blit all the shadows before the glyphs.

All of this can be done outside FreeType using the pixmaps FreeType
produces.

----- Original Message -----
From: "Pedriana, Paul" <address@hidden>
To: "Freetype" <address@hidden>
Sent: Thursday, June 06, 2002 7:11 PM
Subject: [Freetype] The kind of anti-aliased colored fonts I'm talking
about...


> I posted last month lamenting the imability of font systems to support
> colored alpha blended fonts. I also mentioned that in the game industry,
> all the best quality games implement this. I thought I'd post a typical
> example taken from Blizzard's Warcraft series of games. Here is a
> typical screenshot of what I'm talking about:
>       http://www.blizzard.com/war3/screenshots/s14-large.shtml
>
> Click on the image to see it at 100% scale. Click on the "next screenshot"
> link to see other screenshots. Here is another example:
>       http://www.blizzard.com/diablo2exp/screenshots/800x/ss06b.shtml
>
> This is the kind of text display we want and while standard TrueType and
> PostScript text is OK and convenient, they are not as professional looking
> as anti-aliased colored ("ARGB") text. I think that perhaps they lack the
> support for ARGB because they were designed at a time when alpha was
> considered somewhat exotic for realtime desktop computing.
>
> The Freetype documentation for FT_Bitmap suggests that in fact colored
> bitmaps are a possibility if a driver was written for such a thing. I
> imagine
> that this is the route I want to take. It seems that the num_grays field
> would be meaningless for such a thing and that the pixel_mode field
> would be set to some value defining the ARGB format of the bitmap.
> As many people are aware, there are many common ARGB formats, such
> as ARGB_8888, ARGB_1555, RGBA_5551, and ARGB_4444. The pixel
> mode field, however, says how many bits there are, and says nothing about
> what the format of the bits is.
>
> Thanks.
>
>
>
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype




reply via email to

[Prev in Thread] Current Thread [Next in Thread]