feat: add support for Chinese characters

This commit is contained in:
Anna
2022-06-01 16:44:45 -04:00
parent b5c0a6221d
commit 2987247fcf
3 changed files with 39 additions and 13 deletions
+9 -1
View File
@@ -112,7 +112,15 @@ internal sealed class PluginUi : IDisposable {
builder.Destroy();
}
BuildRange(out this._ranges, null, ImGui.GetIO().Fonts.GetGlyphRangesDefault());
var ranges = new List<IntPtr> {
ImGui.GetIO().Fonts.GetGlyphRangesDefault(),
};
if (this.Plugin.Config.EnableChineseRange) {
ranges.Add(ImGui.GetIO().Fonts.GetGlyphRangesChineseFull());
}
BuildRange(out this._ranges, null, ranges.ToArray());
BuildRange(out this._jpRange, GlyphRangesJapanese.GlyphRanges);
this.SetUpUserFonts();