font asset
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mxl-player/internal/assets"
|
||||
"mxl-player/internal/imgui"
|
||||
"mxl-player/internal/playback"
|
||||
"mxl-player/internal/renderer"
|
||||
@@ -232,12 +233,17 @@ func main() {
|
||||
}
|
||||
defer sdl.DestroyWindow(windowHandler)
|
||||
|
||||
fontData, fontDataSize, releaseFont := assets.PinUIFont()
|
||||
defer releaseFont()
|
||||
|
||||
// ImGui init
|
||||
gui := imgui.New()
|
||||
defer gui.Destroy()
|
||||
fontConfig := cimgui.NewFontConfig()
|
||||
font := gui.IO().Fonts().AddFontFromFileTTFV(
|
||||
"/home/itten/Downloads/JetBrainsMono/JetBrainsMonoNLNerdFontMono-Regular.ttf",
|
||||
fontConfig.SetFontDataOwnedByAtlas(false)
|
||||
font := gui.IO().Fonts().AddFontFromMemoryTTFV(
|
||||
fontData,
|
||||
fontDataSize,
|
||||
18,
|
||||
fontConfig,
|
||||
nil,
|
||||
|
||||
Reference in New Issue
Block a user