- Home /
Changing distance between characters in a custom font.
Ok, so, I have setup a custom Font, where I edit how the font has been setup. I generated the font with Unity Font Mapper, and I get the fonts in a grid. I also exported a text file with all the character Width's.
The Font displays fine, but it draws the characters with equal distance between them, which makes the words look odd.
I assumed that I would type the spacing info into the "Per Character Kerning" Fields. However, it doesnt seem to respond to anything I type in there.
The font file is a 10x10 grid, so 100 Characters. I assume I would need 100 elements then, and type in the character width for all. This Per Character Element has 2 Fields, Element 0 and then First and Second. I read somewhere that I should type in the character in the first field, and the actual value in the second, but the first field won't allow Letter input, only numbers.
In any event, I tried with 0-10 in it, and that didnt seem to work. No respons from that.
So, any idea what I can do? Basically, I just want to use an edited bitmap version of a Font, and I can't be the only one wanting this :)
MinceD
Answer by Eric5h5 · Jul 14, 2010 at 09:41 PM
You don't necessarily need 100 elements; you only have to specify spacing for characters whose spacing differs from the default spacing. Make sure you're using Unity 2.6.1...at one point (2.5?) the font system reverted to having to use Unicode numbers for the characters, but in 2.6.1 you can just use letters again, which is much simpler.
yep, I'm just adding the letters I'm using. Not all 100. And yes, they dont have to be in order or anything so...yeah, it's working fine.
Answer by MinceD · Jul 14, 2010 at 09:35 PM
Okay, it seems typing in the ascii value of the letter worked.
So, code in First element, and offset in the second.
http://slayeroffice.com/tools/ascii/ There's a good web page for the codes.
Your answer
Follow this Question
Related Questions
Is there a way to measure the pixel with/height of a string with a given font? 2 Answers
How to find a font via script? 2 Answers
How to have a texture instead of a color as a background of Text? 0 Answers
Font Render Issue Unity 5.3.4f1 on Samsung devices 1 Answer
Preferred Vertical Size not Working with Custom Bitmap Font 0 Answers