added diacritics placeholders to PUA

This commit is contained in:
minjaesong
2021-11-16 17:04:49 +09:00
parent b802f9b02e
commit b3a48b23ee
3 changed files with 18 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

View File

@@ -565,6 +565,8 @@ class TerrarumSansBitmap(
return SHEET_EXTD_VARW
else if (isCurrencies(c))
return SHEET_CURRENCIES_VARW
else if (isInternalSymbols(c))
return SHEET_INTERNAL_VARW
else
return SHEET_UNKNOWN
// fixed width
@@ -678,6 +680,10 @@ class TerrarumSansBitmap(
sheetX = currenciesIndexX(ch)
sheetY = currenciesIndexY(ch)
}
SHEET_INTERNAL_VARW -> {
sheetX = internalIndexX(ch)
sheetY = internalIndexY(ch)
}
else -> {
sheetX = ch % 16
sheetY = ch / 16
@@ -1400,6 +1406,7 @@ class TerrarumSansBitmap(
internal val SHEET_EXTC_VARW = 26
internal val SHEET_EXTD_VARW = 27
internal val SHEET_CURRENCIES_VARW = 28
internal val SHEET_INTERNAL_VARW = 29
internal val SHEET_UNKNOWN = 254
@@ -1442,7 +1449,8 @@ class TerrarumSansBitmap(
SHEET_GREEK_POLY_VARW,
SHEET_EXTC_VARW,
SHEET_EXTD_VARW,
SHEET_CURRENCIES_VARW
SHEET_CURRENCIES_VARW,
SHEET_INTERNAL_VARW
)
private val autoShiftDownOnLowercase = arrayOf(
SHEET_DIACRITICAL_MARKS_VARW
@@ -1477,7 +1485,8 @@ class TerrarumSansBitmap(
"greek_polytonic_xyswap_variable.tga",
"latinExtC_variable.tga",
"latinExtD_variable.tga",
"currencies_variable.tga"
"currencies_variable.tga",
"internal_variable.tga"
)
private val codeRange = arrayOf( // MUST BE MATCHING WITH SHEET INDICES!!
0..0xFF, // SHEET_ASCII_VARW
@@ -1508,7 +1517,8 @@ class TerrarumSansBitmap(
0x1F00..0x1FFF, // SHEET_GREEK_POLY_VARW
0x2C60..0x2C7F, // SHEET_EXTC_VARW
0xA720..0xA7FF, // SHEET_EXTD_VARW
0x20A0..0x20CF // SHEET_CURRENCIES_VARW
0x20A0..0x20CF, // SHEET_CURRENCIES_VARW
0xFFE00..0xFFF9F // SHEET_INTERNAL_VARW
)
private val codeRangeHangulCompat = 0x3130..0x318F
@@ -1661,6 +1671,7 @@ class TerrarumSansBitmap(
private fun isExtD(c: CodePoint) = c in codeRange[SHEET_EXTD_VARW]
private fun isHangulCompat(c: CodePoint) = c in codeRangeHangulCompat
private fun isCurrencies(c: CodePoint) = c in codeRange[SHEET_CURRENCIES_VARW]
private fun isInternalSymbols(c: CodePoint) = c in codeRange[SHEET_INTERNAL_VARW]
// underscored name: not a charset
private fun _isCaps(c: CodePoint) = Character.isUpperCase(c) || isKartvelianCaps(c)
@@ -1745,6 +1756,9 @@ class TerrarumSansBitmap(
private fun currenciesIndexX(c: CodePoint) = (c - 0x20A0) % 16
private fun currenciesIndexY(c: CodePoint) = (c - 0x20A0) / 16
private fun internalIndexX(c: CodePoint) = (c - 0xFFE00) % 16
private fun internalIndexY(c: CodePoint) = (c - 0xFFE00) / 16
/*
#!/usr/bin/python3
@@ -1756,7 +1770,7 @@ for c in s:
print(','.join(a))
*/ // acegijmnopqrsuvwxyzɱɳʙɾɽʒʂʐʋɹɻɥɟɡɢʛȵɲŋɴʀɕʑçʝxɣχʁʜʍɰʟɨʉɯuʊøɘɵɤəɛœɜɞʌɔæɐɶɑɒɚɝɩɪʅʈʏʞⱥⱦⱱⱳⱴⱶⱷⱸⱺⱻꜥꜩꜫꜭꜯꜰꜳꜵꜷꜹꜻꜽꜿꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝫꝯꝳꝴꝵꝶꝷꝺꝼꝿꞁꞃꞅꞇꞑꞓꞔꞛꞝꞡꞥꞧꞩꞮꞷꟺ\uA7AF\uA7B9\uA7C3\uA7CAƍƞơƣƨưƴƶƹƺƽƿ
private val lowHeightLetters = intArrayOf(0x61,0x63,0x65,0x67,0x69,0x6a,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x75,0x76,0x77,0x78,0x79,0x7a,0x271,0x273,0x299,0x27e,0x27d,0x292,0x282,0x290,0x28b,0x279,0x27b,0x265,0x25f,0x261,0x262,0x29b,0x235,0x272,0x14b,0x274,0x280,0x255,0x291,0xe7,0x29d,0x78,0x263,0x3c7,0x281,0x29c,0x28d,0x270,0x29f,0x268,0x289,0x26f,0x75,0x28a,0xf8,0x258,0x275,0x264,0x259,0x25b,0x153,0x25c,0x25e,0x28c,0x254,0xe6,0x250,0x276,0x251,0x252,0x25a,0x25d,0x269,0x26a,0x285,0x288,0x28f,0x29e,0x2c65,0x2c66,0x2c71,0x2c73,0x2c74,0x2c76,0x2c77,0x2c78,0x2c7a,0x2c7b,0xa725,0xa729,0xa72b,0xa72d,0xa72f,0xa730,0xa731,0xa733,0xa735,0xa737,0xa739,0xa73b,0xa73d,0xa73f,0xa74b,0xa74d,0xa74f,0xa751,0xa753,0xa755,0xa757,0xa759,0xa75b,0xa75d,0xa75f,0xa761,0xa76b,0xa76f,0xa773,0xa774,0xa775,0xa776,0xa777,0xa77a,0xa77c,0xa77f,0xa781,0xa783,0xa785,0xa787,0xa791,0xa793,0xa794,0xa79b,0xa79d,0xa79f,0xa7a1,0xa7a5,0xa7a7,0xa7a9,0xa7ae,0xa7b7,0xa7fa,0xa7af,0xa7b9,0xa7c3,0xa7ca,0x18d,0x19e,0x1a1,0x1a3,0x1a8,0x1b0,0x1b4,0x1b6,0x1b9,0x1ba,0x1bd,0x1bf).toSortedSet()
private val lowHeightLetters = intArrayOf(0x61,0x63,0x65,0x67,0x69,0x6a,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x75,0x76,0x77,0x78,0x79,0x7a,0x271,0x273,0x299,0x27e,0x27d,0x292,0x282,0x290,0x28b,0x279,0x27b,0x265,0x25f,0x261,0x262,0x29b,0x235,0x272,0x14b,0x274,0x280,0x255,0x291,0xe7,0x29d,0x78,0x263,0x3c7,0x281,0x29c,0x28d,0x270,0x29f,0x268,0x289,0x26f,0x75,0x28a,0xf8,0x258,0x275,0x264,0x259,0x25b,0x153,0x25c,0x25e,0x28c,0x254,0xe6,0x250,0x276,0x251,0x252,0x25a,0x25d,0x269,0x26a,0x285,0x288,0x28f,0x29e,0x2c65,0x2c66,0x2c71,0x2c73,0x2c74,0x2c76,0x2c77,0x2c78,0x2c7a,0x2c7b,0xa725,0xa729,0xa72b,0xa72d,0xa72f,0xa730,0xa731,0xa733,0xa735,0xa737,0xa739,0xa73b,0xa73d,0xa73f,0xa74b,0xa74d,0xa74f,0xa751,0xa753,0xa755,0xa757,0xa759,0xa75b,0xa75d,0xa75f,0xa761,0xa76b,0xa76f,0xa773,0xa774,0xa775,0xa776,0xa777,0xa77a,0xa77c,0xa77f,0xa781,0xa783,0xa785,0xa787,0xa791,0xa793,0xa794,0xa79b,0xa79d,0xa79f,0xa7a1,0xa7a5,0xa7a7,0xa7a9,0xa7ae,0xa7b7,0xa7fa,0xa7af,0xa7b9,0xa7c3,0xa7ca,0x18d,0x19e,0x1a1,0x1a3,0x1a8,0x1b0,0x1b4,0x1b6,0x1b9,0x1ba,0x1bd,0x1bf,0xFFE00).toSortedSet()
// TŢŤƬƮȚͲΤТҬᛏṪṬṮṰϮϯⴶꚌꚐ
private val kernTees = intArrayOf(0x54,0x162,0x164,0x1ac,0x1ae,0x21a,0x372,0x3a4,0x422,0x4ac,0x16cf,0x1e6a,0x1e6c,0x1e6e,0x1e70,0x2ca6,0x3ee,0x3ef,0x2d36,0xa68c,0xa690,0x13a2,0x16e0,0xa4d4).toSortedSet()
// ŦȾYÝŶŸɎΎΫΥҮҰᛉᛘẎỲỴỶỸὙὛὝὟῪΎȲ

Binary file not shown.