The MeasureText proc will return a zero height value if text being measured leads with a HTML encoded angle brace. (>)
Numbered Steps to Reproduce Problem:
1. MeasureText with a leading encoded > (see below) with a pre-set width of 96 pixels
2. The returned height is zero (specifically returns "96x0")
Code Snippet (if applicable) to Reproduce Problem:
var/wxh = client.MeasureText("<span class='center maptext'>> test</span>", null, 96)
var/h = text2num(copytext(wxh, findtextEx(wxh, "x") + 1))
Expected Results:
Return a non-zero value
Actual Results:
Returns a zero
Does the problem occur:
Every time? Or how often? Every time.
In other games? n/a, didn't test
In other user accounts? n/a, didn't test
On other computers? n/a, didn't test
When does the problem NOT occur?
When measuring a string that doesn't start with a HTML-encoded right-angle brace with the exact same classes and styling.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
n/a
Workarounds:
Swap out the problematic encoded character for temporary characters to measure, or to assume some minimum height.