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 »

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: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco »

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 »

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 »

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 »

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: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: a Rich Text library for LÖVE

Post by Jasoco »

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.
JmTs1.png
JmTs1.png (5.75 KiB) Viewed 195 times
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.
ZAfXG.png
ZAfXG.png (8.84 KiB) Viewed 195 times
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 »

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 »

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 »

Sure.
richtext.love
Example
(5.05 KiB) Downloaded 73 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 »

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 2361 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 75 guests