Mark the inverted exclamation mark as confusable with i

They look pretty much the same in our font, but for some reason, the
inverted exclamation mark doesn't have confusables.
This commit is contained in:
heinrich5991 2021-07-27 02:43:04 +02:00
parent 707e13ff7a
commit 1f68e11445
3 changed files with 5 additions and 1 deletions

View file

@ -26,6 +26,7 @@ def generate_decompositions():
ignore = category("C") | category("M") | category("Z")
con[0x006C] = [0x0069] # LATIN SMALL LETTER L -> LATIN SMALL LETTER I
con[0x00A1] = [0x0069] # INVERTED EXCLAMATION MARK -> LATIN SMALL LETTER I
con[0x2800] = [] # BRAILLE PATTERN BLANK
con[0xFFFC] = [] # OBJECT REPLACEMENT CHARACTER

View file

@ -9,7 +9,7 @@ struct DECOMP_SLICE
enum
{
NUM_DECOMP_LENGTHS = 8,
NUM_DECOMPS = 9605,
NUM_DECOMPS = 9606,
};
static const uint8_t decomp_lengths[NUM_DECOMP_LENGTHS] = {
@ -100,6 +100,7 @@ static const int32_t decomp_chars[NUM_DECOMPS] = {
0x9e,
0x9f,
0xa0,
0xa1,
0xa2,
0xa5,
0xad,
@ -9708,6 +9709,7 @@ static const struct DECOMP_SLICE decomp_slices[NUM_DECOMPS] = {
{0, 0},
{0, 0},
{0, 0},
{855, 1},
{824, 1},
{789, 1},
{0, 0},

View file

@ -59,6 +59,7 @@ TEST(Str, Utf8CompConfusables)
EXPECT_TRUE(str_utf8_comp_confusable("abc", "abc") == 0);
EXPECT_TRUE(str_utf8_comp_confusable("rn", "m") == 0);
EXPECT_TRUE(str_utf8_comp_confusable("l", "ӏ") == 0); // CYRILLIC SMALL LETTER PALOCHKA
EXPECT_TRUE(str_utf8_comp_confusable("i", "¡") == 0); // INVERTED EXCLAMATION MARK
EXPECT_FALSE(str_utf8_comp_confusable("o", "x") == 0);
EXPECT_TRUE(str_utf8_comp_confusable("aceiou", "ąçęįǫų") == 0);
}