freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Can FreeType rasterize the glyph bitmap in several bands?


From: David Turner
Subject: Re: [Freetype] Can FreeType rasterize the glyph bitmap in several bands?
Date: Wed, 12 Jun 2002 00:25:16 +0200

Hello net pl,

net pl a écrit :
> 
> Hi,
> 
> I'd like to use the FT library to rasterize the fonts for our application.
> In our own memory allocation, the maximum memory allocated for a block is
> 35K. In this case, we will have a problem if the glyph bitmap is bigger than
> 35K.
> I saw in a document (old changes 14/apr/2000)that FT supports sub-banding to
> render large glyphs. Is it possible now to render the glyph by sub-banding?
>

sub-banding is an internal feature of the rasterizers that allow any outline
to be rendered into any bitmap with a fixed amount of memory during the
rasterization process.

if your bitmap sizes are limited, you can simply do something like:

 - load the glyph outlines without rendering them

 - compute their bounding boxes in pixels to compute
   the corresponding bitmap buffer size

 - create as many "bitmap buffer bands" that you need

 - and render the outline into them with FT_Outline_Get_Bitmap
   (this function accepts a pre-allocated bitmap as argument),
   one call per "band", provided that you correctly shift
   the outline before each rendering.
 
you won't be able to use the FT_Glyph facility of the cache
sub-system, but that's still better than nothing..

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)



reply via email to

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