a Rich Text library for LÖVE

Showcase your libraries, tools and other projects that help your fellow love users.

Which license should richtext use?

Poll ended at Sat Oct 09, 2010 4:36 pm

Public Domain
4
22%
BSD
1
6%
MIT/X11
5
28%
LPCL
0
No votes
zlib
6
33%
LGPL
1
6%
Other (please specify in replies)
1
6%
 
Total votes: 18

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by Robin »

That's odd. It looks different from what I have (definitely better, by the way), but it's still not right. "Marley" is printed two lines down, and the rest just looks like there wasn't a "\n\n" in there at all.

What version of LÖVE are you using?

EDIT: you are using the version of RT that comes with the .love, right?
Help us help you: attach a .love.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: a Rich Text library for LÖVE

Post by miko »

Robin wrote:That's odd. It looks different from what I have (definitely better, by the way), but it's still not right. "Marley" is printed two lines down, and the rest just looks like there wasn't a "\n\n" in there at all.

What version of LÖVE are you using?
love-jit 0.7.2-2 on archlinux, intel graphics card (which has its issues),
Robin wrote: EDIT: you are using the version of RT that comes with the .love, right?
Ops, that is fun (or not so...), I had richtext.love downloaded just now, and older richtext.lua downloaded earlier in the same directory. When run by "love richtext.love" I got the result from the previous post, but when unzipped into the new directory and run from it, I got different result (attached).

So except that I get the same issue now, there seems to be a bug in love with order of files. When love is run with *.love as an argument, the search patch should have the content of *.love files before all the rest (standard lua package.path).
Attachments
richtext.png
richtext.png (17.11 KiB) Viewed 3072 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by Robin »

That's more like it (well, less, actually, but anyway...)

Which version of richtext.lua did you have in your directory? Do you know which commit? Or maybe just which branch?
Help us help you: attach a .love.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: a Rich Text library for LÖVE

Post by miko »

Robin wrote:That's more like it (well, less, actually, but anyway...)

Which version of richtext.lua did you have in your directory? Do you know which commit? Or maybe just which branch?
I think I have downloaded it after it was announced in the forum. Anyways, the file date is January 26th, file is 6557 bytes long. I can send it to you if you want.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by Robin »

No, that's okay. Thank you, I think now know where the problem lies.
Help us help you: attach a .love.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco »

Hey-O, just bumping this once again. Is this dead? I dunno. But I downloaded the current version and aside from having to change the "newFrameBuffer" to "newCanvas" it works perfectly in 0.8.0. You should probably at least update this to change that part if anything. This is a really useful library. It could be more useful if there could be a way to have text type itself in at a certain speed one character at a time. Normally I would just have a string, a ticker variable and use string.mid to show the leftmost part of the string over time until the ticker reaches the length of the string. I can't do this with this library out of the box so it'd be neat if it could have an option to do this via a flag.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: a Rich Text library for LÖVE

Post by coffee »

Jasoco wrote:Hey-O, just bumping this once again. Is this dead? I dunno. But I downloaded the current version and aside from having to change the "newFrameBuffer" to "newCanvas" it works perfectly in 0.8.0. You should probably at least update this to change that part if anything. This is a really useful library. It could be more useful if there could be a way to have text type itself in at a certain speed one character at a time. Normally I would just have a string, a ticker variable and use string.mid to show the leftmost part of the string over time until the ticker reaches the length of the string. I can't do this with this library out of the box so it'd be neat if it could have an option to do this via a flag.
And I rebump it too because this library deserves a better ending! Jasoco what you asking is a bit what litearc is technically doing now with his message system (viewtopic.php?f=5&t=9265) with printing string speed, in-text formatting for display colors (and other stuff). When I saw it that reminded me right away Robin's "abandoned" RTF project. Since Love's don't have for default such text features, libs like this would really be useful. The only thing "bad" i see in this project is the need of use canvas, otherwise even with bugs/things to be solved it's great.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco »

That's pretty cool. I will look into it now and see what it can do.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by Robin »

Reviving this goes on my Big List Of Things I Need To Do Some Time.
Help us help you: attach a .love.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by Robin »

So, yeah. Time to update this topic.

See GitHub for the latest version, which is 0.8.0-compatible, uses isSupported to make sure a fallback is used on platforms where Canvasses are not supported, and fixes a strange wrapping-related bug.

You can get the current version of richtext.lua directly via this link.

This library is mostly meant for static texts, that can be pre-rendered if the computer allows it.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest