Game Development Community

1.1.3 Text object alignment bug

by Nelson A. K. Gonsalves · in Torque Game Builder · 12/05/2006 (9:44 pm) · 2 replies

This image explains it better than I could:
img92.imageshack.us/img92/990/2dtextbugqs6.jpg
In the image you see 3 text objects, created as displayed below and mounted with varying offsets above the rabbit, with the only changes between them being the textAlign variable.
The right and center alignments have visible overlapping issues.

new t2dTextObject()
{
	scenegraph = SceneWindow2D.getScenegraph();
	position = "0 0";
	size = "128 36";
	text = "";
	font = "Verdana Bold";
	wordWrap = "1";
	hideOverflow = "1";
	textAlign = "Center";
	lineHeight = "12";
	aspectRatio = "1";
	lineSpacing = "0";
	characterSpacing = "0";
	autoSize = "0";
	fontSizes = "12";
	textColor = "1 1 1 1";
};

#1
12/06/2006 (12:31 pm)
That's very odd and I thought that bug had been fixed. It might be something else though - if your fontSizes list doesn't have anything close enough to the actual size, it sometimes produces weird effects. Does the weirdness still show up if you auto-generate the font size as I explained here?
#2
12/06/2006 (8:56 pm)
I've just tried the font auto-generation and nothing changed, the weirdness was still there. Also I've played around with the text object in the editor testing various settings and I seem to get the weirdness no matter how the text is setup in all but the left alignments.