Ejemplo n.º 1
0
        private unsafe ImFontPtr LoadEmbeddedFont(string resourceName, float sizePixels)
        {
            var data = EmbeddedResource.LoadFromAssembly(typeof(ImGuiSystem).Assembly, $"Mana.IMGUI.Fonts.{resourceName}");

            fixed(byte *fontPtr = &data[0])
            {
                return(IO.Fonts.AddFontFromMemoryTTF(new IntPtr(fontPtr), data.Length, sizePixels));
            }
        }