[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Render in 128 instead of 256 gray levels ?
From: |
Scott Long |
Subject: |
Re: [Devel] Render in 128 instead of 256 gray levels ? |
Date: |
Thu, 04 Dec 2003 14:47:21 -0800 |
On Thu, 04 Dec 2003 17:13:07 -0500
Sebastien BARRE <address@hidden> wrote:
Hi
Is there an easy way to have FreeType render a glyph using 128 gray
levels (or 64, 32, a power of 2) instead of the standard 256 gray
levels ?
There's no explicit setting in FreeType for this, and I believe the
rasterizer (found in ftgrays.c) is hard-coded and optimized to output
256 gray levels, so it wouldn't be easy to change it to use a
different number of gray levels.
Why not just shift each pixel's value to the right by one bit, i.e.,
discard the least significant bit of each gray level value? If the
glyph has just been rendered, then the graymap will be in data cache
already, and you should be able to burn through it in no time at all.
Scott Long
SwiftView, Inc. http://www.swiftview.com