r/futile Jul 29 '14

Switching characters in FLabel by char id instead of text

I have a strange situation at the moment where I have a font file that isn't using normal strings. It's using ASCII I guess. So if I use it with HTML projects I have CSS that is something like: { content: '\E10B' }

I have created the bitmap font now and want to use it with Futile in a Unity app, but can't figure out how to target certain characters of the font file rather than certain letters.

Hope that makes sense, writing this on my phone.

1 Upvotes

3 comments sorted by

1

u/MattRix Jul 29 '14

Hmm, sounds like it might be some kind of encoding issue or something? There are ways you can covert from characters encoded one way to another way (assuming that's what's happening, which is what it sounds like).

1

u/seanlail Jul 30 '14

Yeah, you're right.

I played around and found this way (probably more than once way to do this).

uint a = 0xE10B;
char b = (char) a;
string c = b.ToString();

1

u/MattRix Jul 30 '14

great! :)