[Top][All Lists]

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

[ft] Render 16x16 font, ASCII is gray, but CJK is Mono

From: Charles Wang
Subject: [ft] Render 16x16 font, ASCII is gray, but CJK is Mono
Date: Thu, 18 May 2006 17:45:32 +0800


    Using FT Lib which version is 2.2.1.

    ************* Code start **************** 
    error = FT_New_Face(library, "SimHei.ttf", 0, &face);
    error = FT_Select_Charmap(face, FT_ENCODING_UNICODE);
    error = FT_Set_Char_Size(face,  16 << 6, 16 << 6,   96,   96);  
    error = FT_Set_Pixel_Sizes(face,  16,  16);
    error = FT_Load_Char(face, uwCode, FT_LOAD_RENDER);
    ************* Code end **************** 

The render is OK, I can draw the font correctly, BUT,
If I render a ASCII (uwCode = 'A' ) , face->glyph->bitmap.pixel_mode = 2
If I render a CJK char (a Chinese charactor, unicode), face->glyph-> bitmap.pixel_mode = 1

If I set the font size to 22x22, or bigger, then display CJK charactor,  face->glyph->bitmap.pixel_mode = 2

I just want to render CJK charactor (unicode) which pixel mode is GRAY.
But now if I render small size font (less than 22x22), the pixel mode is always MONO

Thanks and Regards

reply via email to

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