diff --git a/src/ImGui.NET/IO.cs b/src/ImGui.NET/IO.cs index 78b3c17..4cd8e85 100644 --- a/src/ImGui.NET/IO.cs +++ b/src/ImGui.NET/IO.cs @@ -249,6 +249,11 @@ namespace ImGuiNET ImGuiNative.ImFontAtlas_SetTexID(_atlasPtr, textureID.ToPointer()); } + public void Clear() + { + ImGuiNative.ImFontAtlas_Clear(_atlasPtr); + } + public void ClearTexData() { ImGuiNative.ImFontAtlas_ClearTexData(_atlasPtr); @@ -271,6 +276,13 @@ namespace ImGuiNET NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(_atlasPtr, ttfData.ToPointer(), ttfDataSize, pixelSize, IntPtr.Zero, null); return new Font(nativeFontPtr); } + + public Font AddFontFromMemoryTTF(IntPtr ttfData, int ttfDataSize, float pixelSize, IntPtr fontConfig) + { + NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(_atlasPtr, ttfData.ToPointer(), ttfDataSize, pixelSize, fontConfig, null); + return new Font(nativeFontPtr); + } + } public unsafe struct FontTextureData