<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ALabelSetFont</id>
	<title>API:LabelSetFont - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ALabelSetFont"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LabelSetFont&amp;action=history"/>
	<updated>2026-10-17T14:22:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:LabelSetFont&amp;diff=30553&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LabelSetFont&amp;diff=30553&amp;oldid=prev"/>
		<updated>2026-10-16T19:46:25Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Label}}&lt;br /&gt;
Changes the font of a Label.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LabelSetFont(labelName, fontName, lineSpacing)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;labelName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of a Label window.&lt;br /&gt;
;fontName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the font, for example &amp;lt;code&amp;gt;&amp;quot;font_default_text_large&amp;quot;&amp;lt;/code&amp;gt;. These are the names used with the &amp;lt;code&amp;gt;font&amp;lt;/code&amp;gt; attribute in XML.&lt;br /&gt;
;lineSpacing : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Required, but not used by the client. The stock UI passes &amp;lt;code&amp;gt;WindowUtils.FONT_DEFAULT_TEXT_LINESPACING&amp;lt;/code&amp;gt; (20).&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* All three arguments must be given. &amp;lt;code&amp;gt;lineSpacing&amp;lt;/code&amp;gt; is checked to be a number and then ignored.&lt;br /&gt;
* If the font is the one the label already uses, nothing happens. Otherwise the label&amp;#039;s text is laid out again with the new font.&lt;br /&gt;
* If no font has the given name, the label is left unchanged and the client reports &amp;lt;code&amp;gt;ERROR: Invalid font definition for Label %s (%s)&amp;lt;/code&amp;gt; (label name, font name).&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;LabelSetFont&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;LabelSetFont&amp;#039;: Window %s is not a Label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ERROR: Invalid font definition for Label %s (%s)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_eventtext/source/system_eventtext.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LabelSetFont( self:GetName(), &amp;quot;font_default_text_huge&amp;quot;, WindowUtils.FONT_DEFAULT_TEXT_LINESPACING )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:LabelGetFont|LabelGetFont]]&lt;br /&gt;
* [[API:LabelSetText|LabelSetText]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>