<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsWindowGetFontHeight?action=history&amp;feed=atom</id>
	<title>DgsWindowGetFontHeight - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsWindowGetFontHeight?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsWindowGetFontHeight&amp;action=history"/>
	<updated>2026-04-05T18:08:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsWindowGetFontHeight&amp;diff=75647&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;{{Client function}} __NOTOC__ This function returns the height of the font currently used in title text of a DGS window.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; float dgsWindowGetFontHeight ( element theWindow ) &lt;/syntaxhighlight&gt;  ===Required Arguments===  *'''theWindow:''' The window to get the font height from.  ===Returns=== Returns the absolute height of the font currently used in the window if the function is successful, ''false'' otherwise.  ==Example==  This ex...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsWindowGetFontHeight&amp;diff=75647&amp;oldid=prev"/>
		<updated>2022-11-03T13:55:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client function}} __NOTOC__ This function returns the height of the font currently used in title text of a DGS window.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; float dgsWindowGetFontHeight ( element theWindow ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments===  *&amp;#039;&amp;#039;&amp;#039;theWindow:&amp;#039;&amp;#039;&amp;#039; The window to get the font height from.  ===Returns=== Returns the absolute height of the font currently used in the window if the function is successful, &amp;#039;&amp;#039;false&amp;#039;&amp;#039; otherwise.  ==Example==  This ex...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the height of the font currently used in title text of a DGS window.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float dgsWindowGetFontHeight ( element theWindow )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theWindow:''' The window to get the font height from.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the absolute height of the font currently used in the window if the function is successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a window, gets the title text extent and font height, and sets the window width and height size according to these values.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
-- create the window&lt;br /&gt;
local myWindow = DGS:dgsCreateWindow ( 0, 0, 0.5, 0.4, &amp;quot;Information&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
-- get the (absolute) text extent and font height, and use these to resize the window width and title height&lt;br /&gt;
local textExtent = DGS:dgsWindowGetTextExtent( myWindow )&lt;br /&gt;
local fontHeight = DGS:dgsWindowGetFontHeight( myWindow )&lt;br /&gt;
DGS:dgsSetSize ( myWindow, textExtent, _, false )&lt;br /&gt;
DGS:dgsSetProperty ( myWindow, &amp;quot;titleHeight&amp;quot;, fontHeight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>