Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: jimt on August 03, 2012, 11:10:40 AM
-
Hello I am using NGUIMath.CalculateRelativeWidgetBounds() along with scale to find the width of a UILabel in pixels. This works fine unless I have a line width set in the UILabel. In that case I get the size of the UILabel text line width instead of the actual text.
Is there a clever way of getting only the actual text width in pixels of a UILabel with a line width that is non-zero? (it works when the line width is 0 or unbounded)
-
UIFont.CalculatePrintedSize will tell you what you want to know.