Box-drawing characters/other UTF-8?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

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

Post 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.
User avatar
hryx
Party member
Posts: 110
Joined: Mon Mar 29, 2010 2:28 am
Location: SF<CA<USA

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

Post 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.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

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

Post 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.
User avatar
legendman3
Citizen
Posts: 68
Joined: Sun Jan 22, 2012 8:29 pm

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

Post by legendman3 »

What if i have custom unicode characters?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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).
Help us help you: attach a .love.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

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

Post 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.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

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

Post 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.
User avatar
legendman3
Citizen
Posts: 68
Joined: Sun Jan 22, 2012 8:29 pm

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

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 7 guests