exclude box and block glyphs from contrast ratio demands (#3844)

This commit is contained in:
Megan Rogge
2022-06-01 17:05:27 -07:00
committed by GitHub
parent 5aaa8dafc5
commit 6b16732192
5 changed files with 20 additions and 12 deletions
+9 -1
View File
@@ -14,5 +14,13 @@ export function isPowerlineGlyph(codepoint: number): boolean {
// Only return true for Powerline symbols which require
// different padding and should be excluded from minimum contrast
// ratio standards
return 0xE0A0 <= codepoint && codepoint <= 0xE0D6;
return 0xE0A4 <= codepoint && codepoint <= 0xE0D6;
}
function isBoxOrBlockGlyph(codepoint: number): boolean {
return (0x2500 <= codepoint && codepoint <= 0x259F);
}
export function excludeFromContrastRatioDemands(codepoint: number): boolean {
return isPowerlineGlyph(codepoint) || isBoxOrBlockGlyph(codepoint);
}