ID:811154
 
Keywords: maptext, space, spacing
BYOND Version:495
Operating System:Windows XP Home
Web Browser:Firefox 12.0
Applies to:Dream Seeker
Status: Unverified

Thus far we've been unable to verify or reproduce this bug. Or, it has been observed but it cannot be triggered with a reliable test case. You can help us out by editing your report or adding a comment with more information.
Descriptive Problem Summary:
If you use maptext and start the text with a space, or multiple spaces, they'll be ignored and it will show the rest of the text at position 0 of the object.

Numbered Steps to Reproduce Problem:
- Create an object with maptext
- Write something along the lines of " big gap"
- The text visible then becomes "big gap" over the object, rather then " big gap"

Expected Results:
Spaces that are placed at the beginning of maptext should be displayed.

Actual Results:
Spaces are ignored, and the next letter/symbol/etc that appears after the spaces will be placed at the beginning of the maptext.

Does the problem occur:
Every time? Or how often?
- Every time
In other games?
- Yes
In other user accounts?
- N/A
On other computers?
- Unknown

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Unknown.

Workarounds:
Using no-break spaces.
Lige wrote:
I actually don't have this issue in my project, which uses the " big gap" method you mentioned. Thus far, I use it four times on four separate objects. Unfortunately, I have no real insight as to what could be causing this issue on your end.

Hm, really? Maybe it's an issue with version 495? I'll download previous version and check.
Can you upload a small demo of the game/example + source.

Alternatively you can send it to Lummox Jr, instead of us either way.

I feel that something else may be at fault here.
In response to A.T.H.K
A.T.H.K wrote:
Can you upload a small demo of the game/example + source.

Alternatively you can send it to Lummox Jr, instead of us either way.

I feel that something else may be at fault here.

There's literally nothing to demo, do obj/maptext = " blah" and it'll ignore the spaces when on the map.

Also, I checked version 494 with the same results.

[Edit]:
Well, either way I realized I could use non-breaking spaces instead while I wrote the report, so if if it's not something simple to fix, it's not a big deal.
Strange works fine for me on the latest release.

With hardware graphics enabled/disabled.

[EDIT] Have you set your maptext_height and width? or is the icon_size a different value instead of the default 32.

I noticed that if you have " <font color=white>blah <B<B>" with an icon size of 20 it'll just show the "<B"

world
icon_size = 20 // 32x32 icon size by default
obj/maptext = " <font color=white>blah <B<B>"
In response to A.T.H.K
A.T.H.K wrote:
Strange works fine for me on the latest release.

With hardware graphics enabled/disabled.

[EDIT] Have you set your maptext_height and width? or is the icon_size a different value instead of the default 32.

I noticed that if you have " <font color=white>blah <B<B>" with an icon size of 20 it'll just show the "<B"

> world
> icon_size = 20 // 32x32 icon size by default
> obj/maptext = " <font color=white>blah <B<B>"
>

No, the width is width and height are set appropriately, it works in all other senses, it doesn't cut off anything except the spaces at the beginning of maptext. That's all there is to the glitch.

Through further testing I believe this is NOT a bug, some of the interaction with it caused me to believe this, but I'm confident that it is not a bug and can be removed.

[Edit]:
I take it back, there's still an issue with the version in my game, just the test game worked, if lummox or someone else can take a look at it, I'd appreciate it.

[Edit2]:
Actually, is it possible there's an issue with the font style? For this specific font I'm using Courier.
More testing seems to show that there's an issue when using html/css:

obj
glitch
icon_state = "glitch"
maptext = {"<html><head><style type="text/css">p.courier{font-family:Courier;}</style></head>
<body><p class="courier"><font color=#5F7082 size=3> Test</font></p></body></html>"}

maptext_width = 1000


That doesn't work, but if I remove the html tags (specifically ), it works:

obj
glitch
icon_state = "glitch"
maptext = {"<style type="text/css">p.courier{font-family:Courier;}</style>
<p class="courier"><font color=#5F7082 size=3> Test</font></p>"}

maptext_width = 1000


I'm not sure if this is an expected result or not, it's just what I've found out...
I don't think adding full html is necessary anyway.

I had the same results as you

obj
space
maptext = {"<p style="font-family:Courier;"><font color="white" size="3"> fffff ff Test</font></p>"}
nospace
maptext = {"<p style="font-family:Courier;"><font color="white" size="3">start</font></p>"}
maptext_width = 1000


I can't reproduce any issues here at all, at least not using better HTML. If you insert a <body> tag you're definitely going to confuse the parser though so that's probably all there is to it.

Closing the tags isn't necessary for maptext, so these are some of the things I tried:

maptext = "        Test!"
maptext = " <b>Test!"
maptext = "<b> Test!"
maptext = "<p> Test!"

All of those produced the proper leading space.
Lummox JR changed status to 'Unverified'