[HarfBuzz] Thai rendering problem

신선미 uv557 at naver.com
Sat Jul 14 11:06:06 PDT 2012


 
Hi, I'm Sun Mi Shin.

I'm HB newers and using HB for rendering Thai language.

I ran simple application but it display incorrect output. 

I test thai rendering with HB shape output( info codepoint, glyph positions ). 

But the glyphs appears that they are just decomposed when I print them out on our canvas.

 

My test program is below. Am I doing somethig wrong?

Please correct following program problems.

I'm using HB 0.7.0.

Thank you.


   buffer = hb_buffer_create(len);
   hb_buffer_set_unicode_funcs(buffer, hb_unicode_funcs_get_default());
   hb_buffer_set_language(buffer, hb_language_from_string("th"));
   hb_buffer_set_script(buffer, HB_SCRIPT_THAI);

   hb_buffer_set_direction(buffer, HB_DIRECTION_LTR);

   hb_buffer_add_utf32(buffer, (const uint32_t *) text, len, 0, len);

 

   hb_font_t *hb_ft_font;

   hb_font_t *hb_sub_font;

   hb_ft_font = hb_ft_font_create(face, NULL);
   hb_sub_font = hb_font_create_sub_font(hb_ft_font);
   hb_font_destroy(hb_ft_font);

   

   hb_shape(hb_sub_font, buffer, NULL, 0);

 

   unsigned int slen = hb_buffer_get_length(buffer);
   positions = hb_buffer_get_glyph_positions(buffer, NULL);
   infos = hb_buffer_get_glyph_infos(buffer, NULL);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20120715/1883dd4e/attachment.html>


More information about the HarfBuzz mailing list