1 Mar 2009 11:13
2 Mar 2009 09:33
7 Mar 2009 10:20
Re: [ft] Questions with freetype
Werner LEMBERG <wl <at> gnu.org>
2009-03-07 09:20:18 GMT
2009-03-07 09:20:18 GMT
> Werner, I know the info on this topic is pretty sparse (or at least > it was when I tried to figure it out a while back) so if you could > check it out, maybe tidy it up a bit and make this sample available > in some freetype documentation I'm sure it'd help a lot of people... Done! http://freetype.org/freetype2/docs/tutorial/step3.html Please check whether everything is fine. I've fiddled around a bit to make it compile (almost) without warnings using gcc, so the code should be quite generic. Thanks again! Werner
6 Mar 2009 03:56
[ft] Should I call FT_Done_Glyph()?
Jun.Wang <xjwang <at> sunmedia.com.cn>
2009-03-06 02:56:53 GMT
2009-03-06 02:56:53 GMT
Hi, I'm a newer. In my programme, after the freetype runing a while, the
memory is low and can't malloc again. So I think there is leak in my
programe. I use freetype2 2.2.1 and get bitmap data like follows:
FT_Load_Glyph(face, glyphIndex, FT_LOAD_RENDER);
FT_Bitmap *bitmap = &(face->glyph->bitmap);
............
//use bitmap->buffer to draw
Should I call FT_Done_Glyph? I don't use FT_Get_Glyph.
--
--
View this message in context: http://www.nabble.com/Should-I-call-FT_Done_Glyph%28%29--tp22365373p22365373.html
Sent from the Freetype - User mailing list archive at Nabble.com.
8 Mar 2009 10:08
[ft] Drawing chinese text with FreeType on OpenGL
googoo <stanley.haryoto <at> gmail.com>
2009-03-08 09:08:30 GMT
2009-03-08 09:08:30 GMT
Hi, I have been trying to implement an OpenGL application that can display chinese text. I am using example from http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43 Nehe . However, I am not able to display the chinese text properly. It keeps displaying rectangle. I think there is problem with the way I specify the string. I am using widechar in C++ and specify unicode value such as 0xFD9D. Anyone has idea? Please help. -- -- View this message in context: http://www.nabble.com/Drawing-chinese-text-with-FreeType-on-OpenGL-tp22396018p22396018.html Sent from the Freetype - User mailing list archive at Nabble.com.
8 Mar 2009 13:22
Re: [ft] Drawing chinese text with FreeType on OpenGL
Werner LEMBERG <wl <at> gnu.org>
2009-03-08 12:22:15 GMT
2009-03-08 12:22:15 GMT
> I have been trying to implement an OpenGL application that can > display chinese text. You are probably writing to the wrong list... > I am using example from > http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43 Nehe . > However, I am not able to display the chinese text properly. > It keeps displaying rectangle. > I think there is problem with the way I specify the string. > I am using widechar in C++ and specify unicode value such as 0xFD9D. Do you select the right cmap? Chinese can be represented in different encodings like GB, Big 5, or Unicode. Werner
9 Mar 2009 02:13
Re: [ft] Drawing chinese text with FreeType on OpenGL
Jun.Wang <xjwang <at> sunmedia.com.cn>
2009-03-09 01:13:37 GMT
2009-03-09 01:13:37 GMT
Which font do you use? May be you use a font file(*.ttf) without chinese glyph. You just need select unicode charmp. -- -- View this message in context: http://www.nabble.com/Drawing-chinese-text-with-FreeType-on-OpenGL-tp22396018p22405491.html Sent from the Freetype - User mailing list archive at Nabble.com.
9 Mar 2009 02:43
Re: [ft] Drawing chinese text with FreeType on OpenGL
googoo <stanley.haryoto <at> gmail.com>
2009-03-09 01:43:21 GMT
2009-03-09 01:43:21 GMT
Jun.Wang wrote: > > Which font do you use? May be you use a font file(*.ttf) without chinese > glyph. You just need select unicode charmp. > I am using simhei.ttf. I tried to use the unicode charmap but all i see is a square on my screen. -- -- View this message in context: http://www.nabble.com/Drawing-chinese-text-with-FreeType-on-OpenGL-tp22396018p22405759.html Sent from the Freetype - User mailing list archive at Nabble.com.
10 Mar 2009 18:01
Re: [ft] can i obtain the number of available face indexs of a font file before we new faces from it?
Werner LEMBERG <wl <at> gnu.org>
2009-03-10 17:01:45 GMT
2009-03-10 17:01:45 GMT
> i see there`s face_index parameter in all new_face functions,i s it
> possible to list all available values, so i can let user make a
> choice to create a new face with the face index they choosed?
From the documentation of FT_Open_Face:
FT_Open_Face can be used to quickly check whether the font format of
a given font resource is supported by FreeType. If the ‘face_index’
field is negative, the function's return value is 0 if the font
format is recognized, or non-zero otherwise; the function returns a
more or less empty face handle in ‘*aface’ (if ‘aface’ isn't NULL).
The only useful field in this special case is ‘face->num_faces’
which gives the number of faces within the font file. After
examination, the returned FT_Face structure should be deallocated
with a call to FT_Done_Face.
Werner
_______________________________________________ Freetype mailing list Freetype <at> nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype
11 Mar 2009 07:03
Re: [ft] Drawing chinese text with FreeType on OpenGL
Werner LEMBERG <wl <at> gnu.org>
2009-03-11 06:03:03 GMT
2009-03-11 06:03:03 GMT
> I am using simhei.ttf. I tried to use the unicode charmap but all i
> see is a square on my screen.
Use ftstring from the ft2demos bundle as a template -- this program
supports UTF8 encoded input strings.
Werner
RSS Feed