Created
August 2, 2020 08:06
-
-
Save se5a/ee9997d1d1113ee81bdd2fa4fd2cc7c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unsafe | |
| { | |
| string rf = "Resources"; | |
| ImFontConfig* rawPtr = ImGuiNative.ImFontConfig_ImFontConfig(); | |
| ImFontConfigPtr config = new ImFontConfigPtr(rawPtr); | |
| config.PixelSnapH = true; | |
| config.MergeMode = true; | |
| ImFontAtlasPtr fontAtlas = ImGui.GetIO().Fonts; | |
| var builder = new ImFontGlyphRangesBuilderPtr(ImGuiNative.ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder()); | |
| builder.AddText("ΩωΝνΔδθΘ"); //Omega, Nu, Delta, Theta (UPPER and lower cases) | |
| //builder.AddText("ΩωνΔθ"); | |
| //builder.AddRanges(fontAtlas.GetGlyphRangesDefault()); | |
| builder.BuildRanges(out ImVector ranges); | |
| fontAtlas.AddFontFromFileTTF(Path.Combine(rf, "ProggyClean.ttf"), 13); | |
| fontAtlas.AddFontFromFileTTF(Path.Combine(rf, "DejaVuSans.ttf"), 13, config, ranges.Data); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment