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

luminosity
Prole
Posts: 34
Joined: Fri Sep 24, 2010 5:46 am

Re: a Rich Text library for LÖVE

Post by luminosity » Thu Jun 23, 2011 12:43 am

Just played around with the distortion problems. If I put a solid black background behind the text it looks much better than with the semi transparent one -- in fact it looks much like my other tooltips that use frambuffers. Looking closely at the text it all looks a little distorted if it's in a framebuffer. Wondering now if this is a problem with framebuffers in love, or something with my ATI card possibly (HD5850 fwiw).

User avatar
Jasoco
Inner party member
Posts: 3655
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco » Thu Jun 23, 2011 1:00 am

So, where's the current stable version of this and how do I use it again? What's the syntax? Also, does it work with image fonts?

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 » Thu Jun 23, 2011 6:59 am

Thanks, luminosity, I hope I get around to incorporate your changes this week.
Jasoco wrote:So, where's the current stable version of this
http://github.com/gvx/richtext, but I would wait until the bugs are fixed before downloading it.
Jasoco wrote:and how do I use it again? What's the syntax?
See https://github.com/gvx/richtext#readme (under the header "usage").
Jasoco wrote:Also, does it work with image fonts?
I have no idea. Probably? I never tried. :P
Help us help you: attach a .love.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: a Rich Text library for LÖVE

Post by bartbes » Thu Jun 23, 2011 9:10 am

luminosity wrote:Wondering now if this is a problem with framebuffers in love, or something with my ATI card possibly (HD5850 fwiw).
Perhaps fonts in framebuffers have some problems atm, I've heard this complaint more often. Let's hope 0.8.0's new font engine changes this.

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 » Thu Jun 23, 2011 1:36 pm

bartbes wrote:Let's hope 0.8.0's new font engine changes this.
I also hope 0.8.0's new font engine doesn't break the things that do work in Rich Text.
Help us help you: attach a .love.

User avatar
Jasoco
Inner party member
Posts: 3655
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco » Thu Jun 23, 2011 9:55 pm

Robin wrote:Thanks, luminosity, I hope I get around to incorporate your changes this week.
Jasoco wrote:So, where's the current stable version of this
http://github.com/gvx/richtext, but I would wait until the bugs are fixed before downloading it.
Jasoco wrote:and how do I use it again? What's the syntax?
See https://github.com/gvx/richtext#readme (under the header "usage").
Jasoco wrote:Also, does it work with image fonts?
I have no idea. Probably? I never tried. :P
That's why I want to try it. So I can let you know if it works with them. Maybe get it to work with them if it doesn't already.

Edit: Good news, everyone! It does.

Image

Kind of? Not sure why my three fonts are all misplaced. But I suspect it has something to do with each one having a different line height. But since in my games I would probably use one font for each line of text anyway, I guess it's not as big a deal.

Hmmm.. it also seems to screw up my own window resizing methods. If I resize the window, the FrameBuffer that the text uses (Not mine) gets all distorted. I bet it can be fixed if I recreate the RichText call after resizing.

Image

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 » Sun Jun 26, 2011 8:48 pm

I made some fixes and other changes, unfortunately this crap keeps getting worse. I made a small change that should make luminosity's change work even after the last {tag}, but somehow it doesn't want to wrap at all anymore. It's all up on GitHub, if anyone wants to lend a an eyeball, please do so, because this is frustrating as hell.
Help us help you: attach a .love.

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: a Rich Text library for LÖVE

Post by kikito » Sun Jun 26, 2011 10:00 pm

I'd gladly lend a hand, but I don't understand what the issue is. Can you upload a sample file illustrating the problem?
When I write def I mean function.

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 » Mon Jun 27, 2011 6:03 am

Sure.
richtext.love
Example
(5.05 KiB) Downloaded 49 times
This should wrap after 200 pixels. It doesn't ever wrap. It has two newlines. If you remove those, there is some wrapping, but sometimes it's too late and other times it's too early.

If you could help my, that would be awesome.
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 » Mon Jun 27, 2011 9:33 am

Robin wrote:Sure.
The attachment richtext.love is no longer available
This should wrap after 200 pixels. It doesn't ever wrap. It has two newlines. If you remove those, there is some wrapping, but sometimes it's too late and other times it's too early.

If you could help my, that would be awesome.
This is what I see (attached). So does it work for me as expected?
Attachments
richtext.png
richtext.png (26.99 KiB) Viewed 1454 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests