ttf2mesh
ttf2mesh copied to clipboard
Is it possible to convert 2byte txt into STL ?
Hi Sergey Fetisov
Thank you for sharing this great code. I am wondering how to convert 2byte txt into STL with your code.
It seems that the code use char(one byte) to find character in TTF.
Please give me some idea to convert 2byte txt like Korean into STL in your code.
Thanks.
Sangjo
Hello. Did I understand correctly that by 2byte text you mean utf16 encoded text? If so, then you can use the ttf_find_glyph function and then ttf_glyph2mesh to tessellate the glyph. If your text is in utf8 encoding with a two-byte character representation sequence, then you need to convert it to utf16. In that case, the following discussion may help you: https://stackoverflow.com/questions/7153935/how-to-convert-utf-8-stdstring-to-utf-16-stdwstring
Thank you for the link. I will try and get back to you.