How to use Standalone?

View: New views
1 Messages — Rating Filter:   Alert me  

How to use Standalone?

by Aya Koshigaya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am trying to use the Standalone rasterizer, but have some problems with it..

This is how I am rendering the glyph-outline:

FT_Bitmap bmp;
bmp.buffer = (unsigned char*)bitmap->getBuffer();
bmp.width = bitmap->getWidth();
bmp.rows = bitmap->getHeight();
bmp.pitch = bitmap->getWidth();
bmp.num_grays = 256;
bmp.pixel_mode = FT_PIXEL_MODE_GRAY;

FT_Raster_Params params;
CIMath::zeroMemory(&params, sizeof(params));
params.source = &outl;
params.target = &bmp;
params.flags = FT_RASTER_FLAG_AA;

ft_standard_raster.raster_render((FT_Raster)raster, &params);


the bitmap has a size of 512x512 and is only one grayscale channel.
The resulting image looks like this:

http://koshigaya.de/misc/ftstandalone.png

But why..? it's not a fault of my bitmap or the display - I think I forgot someting in the Standalone Rasterizer..

Anyway, is there somewhere a nice example of how to use the Standalone Rasterizer?


Aya~
_______________________________________________
Freetype-devel mailing list
Freetype-devel@...
http://lists.nongnu.org/mailman/listinfo/freetype-devel