 
 				if (numChars == 0) continue;
 
+				var xOffset:int = 0;
 				var lastLocation:CharLocation = line[line.length - 1];
-				var right:Number = lastLocation.x + lastLocation.char.width;
-				var xOffset:int = 0;
+				var right:Number = lastLocation.x - lastLocation.char.xOffset + lastLocation.char.xAdvance;
 
 				if (hAlign == HAlign.RIGHT) xOffset = containerWidth - right;
 				else if (hAlign == HAlign.CENTER) xOffset = (containerWidth - right) / 2;

	{
		this.char = char;
	}
}

		/** Creates a bitmap font by parsing an XML file and uses the specified texture. 
		 *  If you don't pass any data, the "mini" font will be created. */
		public function BitmapFont2D(texture:Texture2D = null, fontXml:XML = null)
		{
			// if no texture is passed in, we create the minimal, embedded font
			if (texture == null && fontXml == null)
			{
				texture = MiniBitmapFont2D.texture;
				fontXml = MiniBitmapFont2D.xml;
			}

			mName = "unknown";
