Closed subsoap closed 6 years ago
Couldn't you just ignore the <br/>
tags? Line-breaks (\n
) are accepted as well.
If I remove the <br/>
tags it looks like this
It's the tabs adding the extra initial character removing them
Something changed since last update to make words squish together?
If I set the size to 1 it looks closer to right, related to that in some way?
Higher scales seem to have more space than they need
Ah, I do not properly handle \r\n. Fixed in 2.5.2
I'm still seeing
with I think latest release
local text = [[
<size=1>Lara</size><br/>
<size=1.2>Well, hello there!</size><br/>
<size=0.3>What do we have here?</size><img=icons:waiting/>]]
local text = [[<size=1>???</size><br/><size=0.7>Well, hello there!</size><br/><size=0.7>What do we have here?</size><img=icons:waiting/>]]
Happens in example too
local text = "<size=0.5>RichText several words to test this</size>Lorem <color=0,0.5,0,1>ipsum </color><img=smileys:zombie/> dolor <color=red>sit </color><color=#ff00ffff>amet, </color><size=1.15><font=Nanum>consectetur </font></size>adipiscing elit.<br/><b>Nunc </b>tincidunt <b><i>mattis</i> libero</b> <i>non viverra</i>.\n\nNullam ornare <img=smileys:hungry></img>accumsan rhoncus.\n\nNunc placerat nibh a purus auctor, id scelerisque massa <size=2>rutrum.</size>"
Ok, what about now? https://github.com/britzl/defold-richtext/releases/tag/2.5.3
Looks to be fixed!
Becomes
It should be
Which requires
It would be nice to be able to format in scripts with multiline strings so it's a little easier to manage.