freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Glyph.bitmap.rows and width are zero


From: arc
Subject: [ft-devel] Glyph.bitmap.rows and width are zero
Date: Tue, 26 May 2009 17:11:00 +0800
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Hi all:
I use an Unicode ttf file to render my chinese text.But I got a problem
in some charcodes.

here is my code:

glyph_index = FT_Get_Char_Index( m_pkFT_ChtFace, charcode);
if (glyph_index == 0)
return;

error = FT_Load_Glyph( m_pkFT_ChtFace, glyph_index, FT_LOAD_DEFAULT );
if (error)
return;

error = FT_Render_Glyph( m_pkFT_ChtFace->glyph, FT_RENDER_MODE_NORMAL );
if (error)
return;

rows = m_pkFT_ChtFace->glyph.bitmap.rows;

width= m_pkFT_ChtFace->glyph.bitmap.width;

after FT_Render_Glyph() function (this function return error code 0)
m_pkFT_ChtFace->glyph.bitmap.rows and width are zero.
(1) Is that means my ttf file doesn't have this charcode 's bitmap ?
(2) If my ttf file doesn't have this charcode 's bitmap, Why
FT_Render_Glyph() doesn't return an error code?

Thanks all
-- 
Arc




reply via email to

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