ID:939100
 
Keywords: fontstyle, maptext
(See the best response by DarkCampainger.)
Code:
mob/proc/update_descriptor(o as text)
if(src.descriptor)
src.descriptor:overlays=null
var/image/I = new
I.layer=FLY_LAYER
I.maptext_height=224
I.maptext_width=192
I.maptext="<span style='color:white;font-family:arial;font-style:normal;font-size:8pt'> [o] </span>"
src.descriptor:overlays+=I


Problem description:
I am trying to display text in an inventory menu on screen. I have no trouble getting the text to appear, however nomatter what I set font-style to be it always appears to be in italics and looks like this: http://imgur.com/SsoeV

In this instance all I passed to this proc was "TEST" and as you can see it is italic. The most bizarre thing is that maptext appears to change between italic and non-italic between server re-compiles without any change to the above code. It is starting to really drive me crazy.
Best response
If you open up your interface and edit your map control, does it have italics set under the Appearance or Style tabs? If so, it's possible that styles aren't properly cascading in BYOND, or that the font-style attribute isn't recognized. If not, try switching to software graphics mode to see if that makes a difference. Because you're specifying the font-style inline, I'm guessing this a limitation or bug in BYOND.
There is no italics under appearance, and style is currently set to <style>BODY{'font-style: normal; font-size:8pt;font-family:arial; color:white'}</style>. I've tried deleting the style parameter of the map object, etc but I've had no luck so far.

I disabled graphic hardware for maps, and voila. Problem fixed. So what does this imply? Bugfix?
You might want to add what you've found to this bug report:
http://www.byond.com/forum/?post=865562

Hopefully it's something that BYOND can fix, as software rendering mode is not ideal.