Replies above are helpful for me .
Text rendering is a hard work,I need to study about it for a long time .Then I can decide.
This gives me a nice "fire and forget" text which, differently from freetype, can be zoomed and transformed without loosing too much detail. It required quite some work (warning) and quality isn't much of a big deal for the time being. Small character text is often a blurry mess. Think about it.
Infact ,I can draw images no matter with CPU or GPU ,no matter GLSL shaders or OpenCL .
If I know the path to draw pixels I can do it..
But now,the hardest for me is how to get the "path data" in font files..
Yes I know the inofmation in fonts files expresses where to draw pixels ,so want I want is getting the right infos ..
Such a charactor "A" there're infomation express the out lines if it in a font file ..
typedef struct _CharRenderingInfo
//what we need ?
typedef unsigned int uint;
int getTextImage(wchar_t charactor,unsigned char font_size,char* font_file_path,char* out_bit_buffer,uint out_width,uint out_height)
fstream file(font_file_path);//First we open the font files .
//OK now we should find the right info data from the file.But :HOW
//We need a struct to express the need info for this our "A"
CharRenderingInfo CRINFO = findInfoFromFontFile(file);//how?
//Here we can render it by the CRINFO
If you know any links can explain the data structs in TTF files ,that'll be kind..