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: Pedriana, Paul
Subject: RE: [Freetype] The kind of anti-aliased colored fonts I'm talking about...
Date: Fri, 7 Jun 2002 12:52:09 -0700

Thanks, but unless I misunderstand, this doesn't address what 
we need. We need to be able to have artists create the 
multi-color ARGB glyphs by hand and embed them into the 
font data. This gives us more than one color (e.g. custom 
shading, specular effects, texture, etc.) and lets us fine 
tune the alpha instead of letting a curve fitting algorithm 
guess at it like Freetype does.

What you describe, if I understand correctly, is a way to convert 
the grayscale data into the alpha channel. That's basically what
we do already and likely what everybody else is doing as well
if they are working with color displays. The shadow trick you 
describe is something we in fact do for some text.

Paul



-----Original Message-----
From: Dave Williss [mailto:address@hidden
Sent: Friday, June 07, 2002 12:30 PM
To: address@hidden
Subject: Re: [Freetype] The kind of anti-aliased colored fonts I'm
talking about...

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.




reply via email to

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