Werner LEMBERG | 1 Mar 2009 11:13
Picon

Re: [ft] Compound bitmaps

> I am attaching the patch which resolved the problem for me.

Thanks!  Can you provide a test font for my collection?

    Werner
Werner LEMBERG | 2 Mar 2009 09:33
Picon

Re: [ft] Compound bitmaps


> I am attaching the patch which resolved the problem for me.

Applied, thanks.

    Werner
Werner LEMBERG | 7 Mar 2009 10:20
Picon

Re: [ft] Questions with freetype


> 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
Jun.Wang | 6 Mar 2009 03:56
Picon

[ft] Should I call FT_Done_Glyph()?


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.
googoo | 8 Mar 2009 10:08
Picon

[ft] Drawing chinese text with FreeType on OpenGL


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.
Werner LEMBERG | 8 Mar 2009 13:22
Picon

Re: [ft] Drawing chinese text with FreeType on OpenGL


> 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
Jun.Wang | 9 Mar 2009 02:13
Picon

Re: [ft] Drawing chinese text with FreeType on OpenGL


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.
googoo | 9 Mar 2009 02:43
Picon

Re: [ft] Drawing chinese text with FreeType on OpenGL


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.
Werner LEMBERG | 10 Mar 2009 18:01
Picon

Re: [ft] can i obtain the number of available face indexs of a font file before we new faces from it?


> 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
Werner LEMBERG | 11 Mar 2009 07:03
Picon

Re: [ft] Drawing chinese text with FreeType on OpenGL


> 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

Gmane