Page 2 of 2

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 2:12 am
by utunnels
Well that depends on what you are working on. If you are dealing with a string cosntant, then there's no problem and your method should be faster than the iterator(maybe) function.

I want the game to display a dialogue (like many 2D RPGs do, a box plus some strings), but additionally, I don't want the whole sentence to be displayed at one time, I want the characters to appear one by one.

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 2:20 am
by hryx
utunnels wrote:I want the game to display a dialogue (like many 2D RPGs do, a box plus some strings), but additionally, I don't want the whole sentence to be displayed at one time, I want the characters to appear one by one.
Exactly. And what if your dialog is in, say, any language other than English? These are legitimate concerns for Lovers, including me.

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 2:53 am
by utunnels
Yeah, you are right.
But I'm using ttf, so things get a bit more complex (the font is not monospace, so probably I have to 'force' it to be by drawing the characters one by one). For example, I want a certain word to be displayed in red. I guess I have to break down the sentence to characters, unless there's some easiler way I don't know.

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 2:58 am
by legendman3
What if i have custom unicode characters?

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 11:36 am
by Robin
utunnels wrote:I want a certain word to be displayed in red. I guess I have to break down the sentence to characters, unless there's some easiler way I don't know.
Seems like a good use for RichText (although it has no functions for displaying text one character at a time).

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 12:21 pm
by utunnels
Hah, thank you. That is far more plenty than what I need, at least it gives me ideas on how to do such rendering.

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 2:34 pm
by utunnels
legendman3 wrote:What if i have custom unicode characters?
The Image Font (if you are talking about your another topic) only supports single-byte characters as its glyphs data.
This has not been updated last time when I glanced at the code. So I think you need to wait for a bit longer. Or you can try ttf instead.

Or you can check my private build which has this support already.

Re: Box-drawing characters/other UTF-8?

Posted: Sun Feb 05, 2012 5:35 pm
by legendman3
utunnels wrote:
legendman3 wrote:What if i have custom unicode characters?
The Image Font (if you are talking about your another topic) only supports single-byte characters as its glyphs data.
This has not been updated last time when I glanced at the code. So I think you need to wait for a bit longer. Or you can try ttf instead.

Or you can check my private build which has this support already.
Eh im going to use ttf.