private void FontStash(FontStashAction stashAction = null) { Nuklear.nk_font_atlas_init(_fontAtlas, _allocator); Nuklear.nk_font_atlas_begin(_fontAtlas); stashAction?.Invoke(new IntPtr(_fontAtlas)); int W, H; var Image = Nuklear.nk_font_atlas_bake(_fontAtlas, &W, &H, nk_font_atlas_format.NK_FONT_ATLAS_RGBA32); var TexHandle = Device.CreateTextureHandle(W, H, Image); Nuklear.nk_font_atlas_end(_fontAtlas, Nuklear.nk_handle_id(TexHandle), _nullTexture); if (_fontAtlas->default_font != null) { Nuklear.nk_style_set_font(_nuklearContext, &_fontAtlas->default_font->handle); } }
public void SetFont(Nuklear.nk_font font) { Nuklear.nk_style_set_font(_ctx, font.handle); }