4.3
I am trying to import a custom font using a png, and I figured out I could space the characters using the “Kerning Pairs” tool. However, my solution looks like this:
i qwertyuiopasdfghjklzxcvbnm<>?:"{}|+)(*&^%$#@!1234567890-=[];',./ -3
l qwertyuiopasdfghjklzxcvbnm<>?:"{}|+)(*&^%$#@!1234567890-=;',./ -3
…
You get the idea. Is there a way I can set the range of characters that the kerning tool applies to instead of manually writing out each character?
It’s not a perfect solution, but I wrote a short python program that will automatically generate the Kerning Pairs, which you can then copy and paste.
You can change any of the variables (ones, twos, threes, fours) and any of the ones += " -4"
at the end of the program, those are just the characters and values I used.
ones = "!',:;il| "
twos = "()[]` "
threes = '"*fjt{} '
fours = "-<>^abcdeghpqrsuyz "
for c in range(33, 127):
ones += chr(c)
twos += chr(c)
threes += chr(c)
fours += chr(c)
ones += " -4"
twos += " -3"
threes += " -2"
fours += " -1"
print(ones, "\n", twos, "\n", threes, "\n", fours)