2D Toolkit Forum
2D Toolkit => Support => Topic started by: gonzalez.martin90 on March 26, 2014, 12:43:48 pm
-
Hi, i have a problem with some characters that i dont have in the spritesheet.
I would like to replace the characters that dont exist in the sprite for "?". Is it possible?
Thanks!
-
Yes it is - in tk2dTextGeomGen.cs, look for these lines:
if (fontInst.useDictionary)
{
if (!fontInst.charDict.ContainsKey(idx)) idx = 0;
chr = fontInst.charDict[idx];
}
else
{
if (idx >= fontInst.chars.Length) idx = 0; // should be space
chr = fontInst.chars[idx];
}
idx = 0 is picked when the character isn't found, you can replace that with anything else there.
-
Amazing, thanks!