[HarfBuzz] Render Persian probelm

bianxg 765033267 at qq.com
Sun Feb 9 13:04:41 UTC 2020


Hi,


I'm using HarfBuzz with freetype to render Persian text. I can not find any example about this. 
This is my config. Is it right? I can display Persian result.but I think it's not right.


m_language = "pes";
m_script = HB_SCRIPT_OLD_PERSIAN;
m_direction = HB_DIRECTION_RTL;



m_hbfont = hb_ft_font_create(s_ft_face, NULL);
m_hbbuffer = hb_buffer_create();
hb_buffer_allocation_successful(m_hbbuffer);

...
hb_buffer_reset(m_hbbuffer);
hb_buffer_set_direction(m_hbbuffer, m_direction);
hb_buffer_set_script(m_hbbuffer, m_script);
hb_buffer_set_language(m_hbbuffer, hb_language_from_string(m_language.c_str(), m_language.size()));





Thanks,
Bian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20200209/08ede1a6/attachment.htm>


More information about the HarfBuzz mailing list