freetype
[Top][All Lists]
Advanced

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

RE: [ft] How to use Standalone?


From: Erik Möller
Subject: RE: [ft] How to use Standalone?
Date: Sun, 23 Aug 2009 18:29:08 +0200

That reminds me...that's where I stopped last...better pick it up again.

I'm getting the exact same results and I'd appreciate if someone could take
a quick peek and tell me where I go wrong. To avoid any sort of mental
barriers I boiled my sample down to 99 lines of code ;)

Kind regards,
Erik Möller
www.timetrap.se


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Aya
Koshigaya
Sent: den 23 augusti 2009 14:34
To: address@hidden
Subject: [ft] How to use Standalone?

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 mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4360 (20090823) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4360 (20090823) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

Attachment: standalone_test.cpp
Description: Text document


reply via email to

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