memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.15k stars 771 forks source link

Help. how to render chinese ? #597

Open LightSun opened 3 years ago

LightSun commented 3 years ago

Nanovg is a good project. I am using it. but when i render chinese. it display error. I had tried a chinese ttf file and also tried freetype.

c828847945cb3b57bf685a0e789f6e9

Could anyone help me ?

wtjcn commented 2 years ago

1.use chinese font, like simsun.ttf (not .ttc) 2.use string like : u8"中文" ,this is supported since vs2015

tazok81 commented 9 months ago

Hi, it is old, but I faced this issue just now. This project helped me a lot. They merged fonts into one file, now I can render latin, cyrilic, greek, korean, chinese, japanese etc characters loading one ttf