Difference between revisions of "Lua:createFont"

From Cheat Engine
Jump to navigation Jump to search
(Initial page creation.)
 
m (Added related function template.)
 
Line 21: Line 21:
  
 
===Examples===
 
===Examples===
<pre>
+
<syntaxhighlight lang="lua" line>
 
local font = createFont()
 
local font = createFont()
 
font.Name = "Consolas"
 
font.Name = "Consolas"
 
font.Size = 12
 
font.Size = 12
</pre>
+
</syntaxhighlight>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
 +
 +
{{Creation}}

Latest revision as of 23:50, 26 June 2026

<> Lua API Reference

function createFont() : Font

Creates a Font object initialized from Cheat Engine's main window font.

Assign the returned object to a control's Font property or change its properties before assigning it.

Function Parameters[edit]

Parameter Type Description
None This function does not take parameters.

Returns[edit]

Font — A new font object.

Examples[edit]

1 local font = createFont()
2 font.Name = "Consolas"
3 font.Size = 12

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Basic Visual Controls

Text / Input Controls

Value / Progress Controls

Graphics / Resources

Strings / Streams

Timers / Hotkeys

Scanning / Found Lists

Other Creation Helpers