psydack / uimgui

UImGui (Unity ImGui) is an UPM package for the immediate mode GUI library using ImGui.NET. This project is based on RG.ImGui project.
MIT License
348 stars 55 forks source link

add font initialize callback #24

Closed ousttrue closed 2 years ago

ousttrue commented 2 years ago

Hello.

I've added flexible initialization with callbacks. Register the function as follows for UnityEvent.

        io.Fonts.AddFontDefault();
        io.Fonts.AddFontFromFileTTF("C:/Windows/Fonts/MSGothic.ttc", 24, config.Ptr, io.Fonts.GetGlyphRangesJapanese());
        io.Fonts.Build();

This is useful. Thank you.