GetTextHeight

From Spring

Development < Lua Scripting < GetTextHeight

GetTextHeight() Illustrations

note: the returned heights are normalized, so you need to multiply them with your wanted fontSize


GetTextHeight

 ( string singlelined_text ) -> number textHeight, number textDescender, number num_lines=1

Gettextheight singleline.png

GetTextHeight

 ( string multilined_text ) -> number textHeight, number textDescender, number num_lines

Gettextheight multiline.png