mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 20:01:52 +09:00
more kerning pairs
This commit is contained in:
@@ -1725,11 +1725,13 @@ class GameFontBase(
|
||||
/*
|
||||
#!/usr/bin/python3
|
||||
|
||||
s = "charseq"
|
||||
s = ""
|
||||
a = []
|
||||
|
||||
for c in s:
|
||||
#print(ord(c))
|
||||
print("0x{0:x}".format(ord(c)))
|
||||
a.append("0x{0:x}".format(ord(c)))
|
||||
|
||||
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,0x1bf).toSortedSet()
|
||||
// TŢŤƬƮȚͲΤТҬᛏṪṬṮṰⲦϮϯⴶꚌꚐᎢᛠꓔ
|
||||
@@ -1750,10 +1752,15 @@ print("0x{0:x}".format(ord(c)))
|
||||
private val kernDees = intArrayOf(0x64,0x10f,0x500,0x501,0x502,0x503,0x53a,0x56a,0x574,0x57e,0x583,0x13b4,0x13ca,0x13ef,0x1cab,0x1d81,0x1d91,0x1e0d,0x1e0f,0x1e11,0x1e13,0x2d13,0x2d1b,0x2d23,0x2d25,0xa771,0xa7c8)
|
||||
// bhkƙþĥķƄƅƕƙƥǩǶȟɓɦɧʣʤʥʪʫЪЬҺһԂԃԈԊԠԢԦԧԽՒիխհնփևსხᏏᏓᏥᲮᵬᶀᶄḅḇḣḥḧḱḳḵᾈᾉᾊᾋᾌᾍᾎᾏᾘᾙᾚᾛᾜᾝᾞᾟᾨᾩᾪᾫᾬᾭᾮᾯῌⴐⴑⴙⴛᲆⱨⱪꙎꝃꝧꞗꞣ
|
||||
private val kernBees = intArrayOf(0x62,0x68,0x6b,0x199,0xfe,0x125,0x137,0x184,0x185,0x195,0x199,0x1a5,0x1e9,0x1f6,0x21f,0x253,0x266,0x267,0x2a3,0x2a4,0x2a5,0x2aa,0x2ab,0x42a,0x42c,0x4ba,0x4bb,0x502,0x503,0x508,0x50a,0x520,0x522,0x526,0x527,0x53d,0x552,0x56b,0x56d,0x570,0x576,0x583,0x587,0x10e1,0x10ee,0x13cf,0x13d3,0x13e5,0x1cae,0x1d6c,0x1d80,0x1d84,0x1e05,0x1e07,0x1e23,0x1e25,0x1e27,0x1e31,0x1e33,0x1e35,0x1f88,0x1f89,0x1f8a,0x1f8b,0x1f8c,0x1f8d,0x1f8e,0x1f8f,0x1f98,0x1f99,0x1f9a,0x1f9b,0x1f9c,0x1f9d,0x1f9e,0x1f9f,0x1fa8,0x1fa9,0x1faa,0x1fab,0x1fac,0x1fad,0x1fae,0x1faf,0x1fcc,0x2d10,0x2d11,0x2d19,0x2d1b,0x1c86,0x2c68,0x2c6a,0xa64e,0xa743,0xa767,0xa797,0xa7a3)
|
||||
// yÿŷƴɏɣɤʏγνуўѵѷүұӯӱӳ
|
||||
private val kernLowVees = intArrayOf(0x79,0xff,0x177,0x1b4,0x24f,0x263,0x264,0x28f,0x3b3,0x3bd,0x443,0x45e,0x475,0x477,0x4af,0x4b1,0x4ef,0x4f1,0x4f3).toSortedSet()
|
||||
// ƛʌλлљѧԉԓԡԯ
|
||||
private val kernLowLambdas = intArrayOf(0x19b,0x28c,0x3bb,0x43b,0x459,0x467,0x509,0x513,0x521,0x52f).toSortedSet()
|
||||
|
||||
private val kernTee = -2
|
||||
private val kernYee = -1
|
||||
private val kernAV = -1
|
||||
private val kernAVlow = -1
|
||||
|
||||
private fun getKerning(prevChar: CodePoint, thisChar: CodePoint): Int {
|
||||
return if (prevChar in lowHeightLetters) {
|
||||
@@ -1805,6 +1812,16 @@ print("0x{0:x}".format(ord(c)))
|
||||
else if (thisChar in kernYees) kernYee // b - Y
|
||||
else 0
|
||||
}
|
||||
else if (prevChar in kernLowVees) {
|
||||
return if (thisChar in kernTees) kernTee
|
||||
else if (thisChar in kernLowLambdas) kernAVlow
|
||||
else 0
|
||||
}
|
||||
else if (prevChar in kernLowLambdas) {
|
||||
return if (thisChar in kernTees) kernTee
|
||||
else if (thisChar in kernLowVees) kernAVlow
|
||||
else 0
|
||||
}
|
||||
else 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user