freetype
[Top][All Lists]
Advanced

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

[ft] How to use Standalone?


From: Aya Koshigaya
Subject: [ft] How to use Standalone?
Date: Sun, 23 Aug 2009 14:33:46 +0200

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~




reply via email to

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