ID:2426897
 
BYOND Version:512
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 64.0.3282.140
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
When I close center tag in maptext, text move upper by one line.
It's happend just for <center></center> tag.
e.g. When i leave opened <font> tag, text look fine as opposed to <center> tag.
maptext="<font color=red>Hello World</font>"// it's look fine
maptext="<font color=red>Hello World"// it's also look fine

Code Snippet (if applicable) to Reproduce Problem:
#include<kaiochao/shapes/shapes.dme>

world
fps = 60
maxx = 25
maxy = 25
turf = /turf
mob = /mob

turf
icon_state = "rect"
New()
..()
color = (x + y) % 2 ? rgb(50, 50, 50) : rgb(55, 55, 55)

mob
step_size=2
Login()
..()
new/obj/mt(locate(3,3,1),"<center><b><font color=red>Hello World</font>")// What i expected

new/obj/mt(locate(6,3,1),"<center><b><font color=red>Bye World</font></center>")// buged line

obj/mt
icon_state="oval"
maptext_width=96
maptext_x=-32
New(locate, text)
..()
maptext=text


Actual Results:

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes
Not a bug. There is maptext_height that you have to account for. If you want just the horizontal center you have to do
"<span style='text-align: center;'>TEXT</span>"
Actually is a bug. The center tag closure results in a line break. The thing is a closure at the end of the text should not have a line break.
I've been looking at this a bit and I'm actually wondering if it would be more sensible to save this fix for 513 as I'm thinking of doing an overhaul to the HTML parser/printer anyway. In an updated system it should be easier to deal with issues like this.
In response to Lummox JR
Lummox JR wrote:
Actually is a bug. The center tag closure results in a line break. The thing is a closure at the end of the text should not have a line break.

Oh, that's what causes that? I noticed something similar a long time ago with align: top styles having an extra break.