[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] manual anti-aliasing
From: |
Jeff Chow |
Subject: |
[Freetype] manual anti-aliasing |
Date: |
Tue, 7 May 2002 23:44:39 -0700 |
Hi Everyone,
I haven't posted to this list in a while so here goes:
We're experimenting with doing a manual antialias on all the glyphs that we
rasterize. Instead of
rendering a glyph at some pixel size in ft_render_mode_normal mode, we're
quadrupling the pixel size, rendering it in ft_render_mode_mono mode, and
manually downsampling the 1-bit output down to the right glyph size. We'd
like the final rasterized sizes to the as similar as possible, and here's
where the problem happens:
Suppose I specify 17 in my FT_Set_Pixel_Sizes() call and it yields a glyph
that's 10 rows tall for the 'B' character. That's fine but when I specify 68
(17*4) in FT_Set_Pixel_Sizes, I get back a glyph that's 36 rows tall. 36 / 4
is 9, and *not* the 10 that we'd expect. At first I thought that rastering
monochrome glyphs may yield smaller bitmaps, but I verified that behaviour
with a number of different characters and pixel sizes and it seems like the
same size glyph is always generated.
So why would rastering a large pixel size yield a disproportionately smaller
glyph? Does anyone out there in Freetype land know what's going on? Even if
I round up the division (36 + 3)/4 I still get a value that's 1 off from the
real size.
Thanks in advance,
Jeff
- [Freetype] manual anti-aliasing,
Jeff Chow <=