Skip to content

Commit

Permalink
font atlas: use SliceToPtr imgui func
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Sep 14, 2023
1 parent 5627394 commit 743478a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FontAtlasProsessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 743478a

Please sign in to comment.