freetype-devel
[Top][All Lists]
Advanced

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

[Devel] [Devel]Problem with versions above 2.0.5


From: gjh
Subject: [Devel] [Devel]Problem with versions above 2.0.5
Date: Fri, 1 Mar 2002 16:53:08 +0100

I've encountered a problem with the versions of FreeType 2 above 2.0.5.


I'm drawing Japanese fonts from the MS Gothic TTF file. The size of the font
is smaller then 23 pixels.
With version 2.0.5 I get good glyph images but with version 2.0.7 and 2.0.8
the glyphs just consists of a few diagonal lines.
(I'm not able to check version 2.0.6 because I get linker error, see bellow)
I also found the FT_bitmap.width, .rows and .pitch values were completely
changed from version 2.0.5.
For sizes larger then 22, everything works fine and also for other unicode
ranges.


The basic code I use:

wchar_t x = 12458;   // for example. The first character in the unicode
'Katakana'-range
int size = 16;

FT_Init_FreeType(&m_ft_library)
FT_New_Face(m_ft_library, "c:/windows/fonts/msgothic.ttf", 0, &m_ft_face);
FT_Select_Charmap(m_ft_face, ft_encoding_unicode);
FT_Set_Pixel_Sizes(m_ft_face, 0, size);
int index = FT_Get_Char_Index(m_ft_face, (FT_ULong)x);
FT_Load_Glyph(m_ft_face, index, FT_LOAD_RENDER);
FT_Render_Glyph(m_ft_face->glyph, ft_render_mode_normal);

FT_Bitmap bmp = m_ft_face->glyph->bitmap;

//                              2.0.5   2.0.7
int width = bmp.width;      //  14        16
int height = bmp.rows;      //  13        16
int pitch = bmp.pitch;      //  14        2


What's going on!?? please help!

-------------------
freetype206.lib(ftinit.obj) : error LNK2001: unresolved external symbol
_pshinter_module_class
Greets,

gjh




reply via email to

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