[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype
Subject: Re: Hollow fonts and character spacing questions
From: Werner Lemberg <sx0005 () sx2 ! hrz ! uni-dortmund ! de>
Date: 1998-05-21 13:25:40
[Download RAW message or body]
On Wed, 20 May 1998, Pavel Kankovsky wrote:
> > Can FreeType "out of the box", do hollow fonts (i.e., fonts that aren't
> > filled-in)? I saw in the GLTT library a system that produces a polygon
>
> Nope. The rasterizer itself can't do that. As a workaround, you can
> extract the outline and draw it yourself or post-process the rendered
> bitmap.
A simple way is to use the following method: if a pixel is painted once,
write a 1 into the bitmap, if it is painted twice, write a 2 etc.
Now draw the pixmap five times:
the first time as usual,
the other four times with 1 pixel offset (up/down/left/right)
After doing this, remove all pixels with a count > 1, and you're done.
Of course, this only works well for larger resolutions; additionally it's
really slow -- on the other hand, it's rather simple.
Werner
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic