feat: add support for lots of different glyph ranges

This commit is contained in:
Anna
2022-06-01 17:14:32 -04:00
parent bae9ce458a
commit b3ae2dbc1a
3 changed files with 54 additions and 6 deletions
+4 -2
View File
@@ -116,8 +116,10 @@ internal sealed class PluginUi : IDisposable {
ImGui.GetIO().Fonts.GetGlyphRangesDefault(),
};
if (this.Plugin.Config.EnableChineseRange) {
ranges.Add(ImGui.GetIO().Fonts.GetGlyphRangesChineseFull());
foreach (var extraRange in Enum.GetValues<ExtraGlyphRanges>()) {
if (this.Plugin.Config.ExtraGlyphRanges.HasFlag(extraRange)) {
ranges.Add(extraRange.Range());
}
}
BuildRange(out this._ranges, null, ranges.ToArray());