27 lines
1.4 KiB
C#
27 lines
1.4 KiB
C#
namespace HellionChat;
|
|
|
|
// Reduced CJK fallback coverage for the v1.5.3 NotoSansCjk fallback merge (B1).
|
|
// Before B1 the fallback merged over the full `Ranges` array (Default + endonyms),
|
|
// duplicating the Latin/Default work already done by the global/Japanese fonts.
|
|
// This is the trimmed remainder the fallback is actually the sole source for:
|
|
// - Hangul Syllables (AC00-D7A3): no other merged font ships Korean glyphs.
|
|
// - The full CJK Unified Ideographs (Han) block: at UseHellionFont=true the global
|
|
// font is Inter-Light (no CJK), so the fallback is the SOLE Han source. The JpRange
|
|
// overlap is harmless (MergeMode: the Japanese font wins for shared kanji).
|
|
// Deliberately excluded: ONLY the ASCII/Latin Default block (0x20-0xFF), which the
|
|
// global font already owns -- that doubled Latin merge is the B1 waste being removed.
|
|
// Kept as plain start/end pairs so it is unit-testable without the unsafe ImGui
|
|
// glyph-range builder (mirrors FontSizeResolver's split-for-test rationale).
|
|
internal static class CjkFallbackRange
|
|
{
|
|
// Hangul Syllables + the full CJK Unified Ideographs (Han) block. Rationale: see
|
|
// class comment. Plain start/end pairs so it stays unit-testable.
|
|
internal static readonly ushort[] Pairs =
|
|
[
|
|
0xAC00,
|
|
0xD7A3, // Hangul Syllables
|
|
0x4E00,
|
|
0x9FFF, // CJK Unified Ideographs (full Han) -- sole source at UseHellionFont
|
|
];
|
|
}
|