@@ -48,9 +48,9 @@ public unsafe partial struct ImFontPtr
4848 public ref float Descent => ref Unsafe . AsRef < float > ( & NativePtr ->Descent ) ;
4949 public ref bool DirtyLookupTables => ref Unsafe . AsRef < bool > ( & NativePtr ->DirtyLookupTables ) ;
5050 public ref int MetricsTotalSurface => ref Unsafe . AsRef < int > ( & NativePtr ->MetricsTotalSurface ) ;
51- public void GrowIndex ( int new_size )
51+ public void AddGlyph ( ushort c , float x0 , float y0 , float x1 , float y1 , float u0 , float v0 , float u1 , float v1 , float advance_x )
5252 {
53- ImGuiNative . ImFont_GrowIndex ( NativePtr , new_size ) ;
53+ ImGuiNative . ImFont_AddGlyph ( NativePtr , c , x0 , y0 , x1 , y1 , u0 , v0 , u1 , v1 , advance_x ) ;
5454 }
5555 public void AddRemapChar ( ushort dst , ushort src )
5656 {
@@ -62,51 +62,51 @@ public void AddRemapChar(ushort dst, ushort src, bool overwrite_dst)
6262 byte native_overwrite_dst = overwrite_dst ? ( byte ) 1 : ( byte ) 0 ;
6363 ImGuiNative . ImFont_AddRemapChar ( NativePtr , dst , src , native_overwrite_dst ) ;
6464 }
65- public void AddGlyph ( ushort c , float x0 , float y0 , float x1 , float y1 , float u0 , float v0 , float u1 , float v1 , float advance_x )
65+ public void BuildLookupTable ( )
6666 {
67- ImGuiNative . ImFont_AddGlyph ( NativePtr , c , x0 , y0 , x1 , y1 , u0 , v0 , u1 , v1 , advance_x ) ;
67+ ImGuiNative . ImFont_BuildLookupTable ( NativePtr ) ;
6868 }
69- public ImFontGlyphPtr FindGlyphNoFallback ( ushort c )
69+ public void ClearOutputData ( )
7070 {
71- ImFontGlyph * ret = ImGuiNative . ImFont_FindGlyphNoFallback ( NativePtr , c ) ;
71+ ImGuiNative . ImFont_ClearOutputData ( NativePtr ) ;
72+ }
73+ public ImFontGlyphPtr FindGlyph ( ushort c )
74+ {
75+ ImFontGlyph * ret = ImGuiNative . ImFont_FindGlyph ( NativePtr , c ) ;
7276 return new ImFontGlyphPtr ( ret ) ;
7377 }
74- public bool IsLoaded ( )
78+ public ImFontGlyphPtr FindGlyphNoFallback ( ushort c )
7579 {
76- byte ret = ImGuiNative . ImFont_IsLoaded ( NativePtr ) ;
77- return ret != 0 ;
80+ ImFontGlyph * ret = ImGuiNative . ImFont_FindGlyphNoFallback ( NativePtr , c ) ;
81+ return new ImFontGlyphPtr ( ret ) ;
7882 }
7983 public float GetCharAdvance ( ushort c )
8084 {
8185 float ret = ImGuiNative . ImFont_GetCharAdvance ( NativePtr , c ) ;
8286 return ret ;
8387 }
84- public void SetFallbackChar ( ushort c )
85- {
86- ImGuiNative . ImFont_SetFallbackChar ( NativePtr , c ) ;
87- }
88- public void RenderChar ( ImDrawListPtr draw_list , float size , Vector2 pos , uint col , ushort c )
88+ public string GetDebugName ( )
8989 {
90- ImDrawList * native_draw_list = draw_list . NativePtr ;
91- ImGuiNative . ImFont_RenderChar ( NativePtr , native_draw_list , size , pos , col , c ) ;
90+ byte * ret = ImGuiNative . ImFont_GetDebugName ( NativePtr ) ;
91+ return Util . StringFromPtr ( ret ) ;
9292 }
93- public ImFontGlyphPtr FindGlyph ( ushort c )
93+ public void GrowIndex ( int new_size )
9494 {
95- ImFontGlyph * ret = ImGuiNative . ImFont_FindGlyph ( NativePtr , c ) ;
96- return new ImFontGlyphPtr ( ret ) ;
95+ ImGuiNative . ImFont_GrowIndex ( NativePtr , new_size ) ;
9796 }
98- public string GetDebugName ( )
97+ public bool IsLoaded ( )
9998 {
100- byte * ret = ImGuiNative . ImFont_GetDebugName ( NativePtr ) ;
101- return Util . StringFromPtr ( ret ) ;
99+ byte ret = ImGuiNative . ImFont_IsLoaded ( NativePtr ) ;
100+ return ret != 0 ;
102101 }
103- public void BuildLookupTable ( )
102+ public void RenderChar ( ImDrawListPtr draw_list , float size , Vector2 pos , uint col , ushort c )
104103 {
105- ImGuiNative . ImFont_BuildLookupTable ( NativePtr ) ;
104+ ImDrawList * native_draw_list = draw_list . NativePtr ;
105+ ImGuiNative . ImFont_RenderChar ( NativePtr , native_draw_list , size , pos , col , c ) ;
106106 }
107- public void ClearOutputData ( )
107+ public void SetFallbackChar ( ushort c )
108108 {
109- ImGuiNative . ImFont_ClearOutputData ( NativePtr ) ;
109+ ImGuiNative . ImFont_SetFallbackChar ( NativePtr , c ) ;
110110 }
111111 }
112112}
0 commit comments