diff --git a/ImGui.Forms/Factories/FontFactory.cs b/ImGui.Forms/Factories/FontFactory.cs index 61423ad..88a003a 100644 --- a/ImGui.Forms/Factories/FontFactory.cs +++ b/ImGui.Forms/Factories/FontFactory.cs @@ -172,8 +172,10 @@ private static unsafe ImVector GetGlyphRanges(FontGlyphRange rangeFlags, string builder.AddRanges(GlyphRangeProvider.GetLatinRange()); if (rangeFlags.HasFlag(FontGlyphRange.Cyrillic)) builder.AddRanges(GlyphRangeProvider.GetCyrillicRange()); - if (rangeFlags.HasFlag(FontGlyphRange.ChineseJapaneseKorean)) - builder.AddRanges(GlyphRangeProvider.GetCjkRange()); + if (rangeFlags.HasFlag(FontGlyphRange.ChineseJapanese)) + builder.AddRanges(GlyphRangeProvider.GetCjRange()); + if (rangeFlags.HasFlag(FontGlyphRange.Korean)) + builder.AddRanges(GlyphRangeProvider.GetKoreanRange()); if (rangeFlags.HasFlag(FontGlyphRange.Greek)) builder.AddRanges(GlyphRangeProvider.GetGreekRange()); if (rangeFlags.HasFlag(FontGlyphRange.Thai)) diff --git a/ImGui.Forms/ImGui.Forms.nuspec b/ImGui.Forms/ImGui.Forms.nuspec index 7e8a603..aef6f43 100644 --- a/ImGui.Forms/ImGui.Forms.nuspec +++ b/ImGui.Forms/ImGui.Forms.nuspec @@ -2,7 +2,7 @@ Imgui.Forms - 1.3.3 + 1.3.4 A WinForms-inspired object-oriented framework around Dear ImGui (https://github.com/ocornut/imgui) onepiecefreak diff --git a/ImGui.Forms/Models/FontGlyphRange.cs b/ImGui.Forms/Models/FontGlyphRange.cs index e793351..37480fa 100644 --- a/ImGui.Forms/Models/FontGlyphRange.cs +++ b/ImGui.Forms/Models/FontGlyphRange.cs @@ -7,12 +7,13 @@ public enum FontGlyphRange { Latin = 1 << 0, Cyrillic = 1 << 1, - ChineseJapaneseKorean = 1 << 2, - Greek = 1 << 3, - Thai = 1 << 4, - Vietnamese = 1 << 5, - Symbols = 1 << 6, + ChineseJapanese = 1 << 2, + Korean = 1 << 3, + Greek = 1 << 4, + Thai = 1 << 5, + Vietnamese = 1 << 6, + Symbols = 1 << 7, - All = 0x7F + All = 0xFF } } diff --git a/ImGui.Forms/Providers/GlyphRangeProvider.cs b/ImGui.Forms/Providers/GlyphRangeProvider.cs index 218d23d..bf9a9a6 100644 --- a/ImGui.Forms/Providers/GlyphRangeProvider.cs +++ b/ImGui.Forms/Providers/GlyphRangeProvider.cs @@ -26,8 +26,9 @@ internal class GlyphRangeProvider //0x1e030,0x1e08f }; - private static readonly ushort[] _cjkRange = new ushort[] + private static readonly ushort[] _cjRange = new ushort[] { + 0x2026,0x2026, 0x2e80,0x2fd5, 0x3000,0x303f, 0x3041,0x3096, @@ -41,6 +42,12 @@ internal class GlyphRangeProvider 0xff01,0xff9f }; + private static readonly ushort[] _koreanRange = new ushort[] + { + 0x3131, 0x3163, + 0xac00, 0xd79d + }; + private static readonly ushort[] _greekRange = new ushort[] { 0x0370,0x03ff, @@ -90,9 +97,14 @@ public static nint GetCyrillicRange() return GetPointer(_cyrillicRange); } - public static nint GetCjkRange() + public static nint GetCjRange() + { + return GetPointer(_cjRange); + } + + public static nint GetKoreanRange() { - return GetPointer(_cjkRange); + return GetPointer(_koreanRange); } public static nint GetGreekRange()