freetype
[Top][All Lists]
Advanced

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

Re: [ft] Thick contours


From: Adam D. Moss
Subject: Re: [ft] Thick contours
Date: Wed, 30 Mar 2005 16:04:19 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Mnenhy/0.7

Laurent Auneau wrote:
Well, on the 'Q' of Quit, the 4 sides looks flat

Oh, I see.  I didn't notice that you're using the four
diagonals -- I'm using the four adjoining pixels.  Using
the diagonals will cause some gaps between the text and its
own outlines when a letter contains strokes which are one
pixel thick and diagonal, though this doesn't affect your
given example.  Using the four adjoining pixels (north,
south, east, west) avoids that problem and also avoids
the problem you have spotted where horizontal/vertical
outlines are thinner than on slopes, but n/s/e/w slightly
has the opposite problem (and also yields a slightly
thinner outline overall).

I haven't tried this idea for drawing fonts but it works
for 'round' blurs: for a near-perfect omnidirectional 1-
pixel outline, try painting north/south/east/west at full
strength and ne/se/nw/sw at 1/sqrt(2) strength.  That
should work out quite nicely (I haven't used this because
I'm happy enough with n/s/e/w overpainting at the moment;
9 font painting passes seems a bit of an overkill, but if
you're doing this directly to the characters before putting
them into the texture then that's probably okay because
you only do it once, plus there are other optimizations
you can do for this process when you can get at the raw
pixel data).

--Adam
--
Adam D. Moss   -   address@hidden




reply via email to

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