golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
https://github.com/vurtun/nuklear
MIT License
1.57k stars 98 forks source link

Add FontConfig.SetRange(*Rune) for CJK fonts #36

Closed 1l0 closed 6 years ago

1l0 commented 6 years ago

Example:

fc := nk.NkFontConfig(0)
fc.SetRange(nk.NkFontChineseGlyphRanges())
sansFont := nk.NkFontAtlasAddFromBytes(atlas, MustAsset("assets/GenShinGothic-P-Regular.ttf"), 16, &fc)

screen shot 2017-12-30 at 19 16 26