GetTextHeight - beyond-all-reason/springrts_engine_wiki_mirror GitHub Wiki

Development < Lua Scripting <

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

Image:Gettextheight_singleline.png

GetTextHeight

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

Image:Gettextheight_multiline.png

Category: Lua

⚠️ **GitHub.com Fallback** ⚠️