From 743478ad348c2cae0ac67360a7c23a7940cdcd8b Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Thu, 14 Sep 2023 12:01:22 +0200 Subject: [PATCH] font atlas: use SliceToPtr imgui func --- FontAtlasProsessor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FontAtlasProsessor.go b/FontAtlasProsessor.go index 4020ed07..0897417c 100644 --- a/FontAtlasProsessor.go +++ b/FontAtlasProsessor.go @@ -289,7 +289,7 @@ func (a *FontAtlas) rebuildFontAtlas() { } else { fontConfig.SetFontDataOwnedByAtlas(false) fonts.AddFontFromMemoryTTFV( - unsafe.Pointer(&fontInfo.fontByte[0]), + unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte)), int32(fontInfo.size), fontInfo.size, // TODO: validate fontConfig, @@ -327,7 +327,7 @@ func (a *FontAtlas) rebuildFontAtlas() { fontConfig := imgui.NewFontConfig() fontConfig.SetFontDataOwnedByAtlas(false) f = fonts.AddFontFromMemoryTTFV( - unsafe.Pointer(&fontInfo.fontByte[0]), + unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte)), int32(fontInfo.size), fontInfo.size, fontConfig,