Font¶
Font registration and loading helpers for Lilia UI and HUD text.
Overview
lia.font.loadFonts()View Source
lia.font.register(fontName, fontData)View Source
Purpose
Registers a font definition under `lia.font.stored` and creates it immediately on the client.
Realm
Shared
Parameters
string fontName The name used to reference the font through Garry's Mod font APIs.
table fontData The font definition table passed to `surface.CreateFont` on the client.
Returns
nil|any Returns the result of `lia.error(L("invalidFont"))` when the font name or data is invalid. Otherwise, this function has no explicit return value.
Example Usage
lia.font.register("LiliaCustomFont", {
font = "Montserrat Medium",
size = 20,
extended = true,
antialias = true,
weight = 500
})
lia.font.getAvailableFonts()View Source
Purpose
Returns unique registered font face names that can be shown as selectable font configuration options.
Realm
Shared
Returns
table A sorted list of unique font face names, excluding Lilia-generated configuration aliases.
Example Usage
local fonts = lia.font.getAvailableFonts()
lia.font.getBoldFontName(fontName)View Source
lia.font.registerFonts(fontName)View Source
Purpose
Registers the default Montserrat faces, core Lilia font aliases, HUD font aliases, and generated size variants.
Realm
Shared
Parameters
string fontName optional Optional main interface font. When omitted, the value from the `Font` configuration is used.
Example Usage
lia.font.registerFonts("Montserrat Medium")
Hooks
Library-specific hooks documented for this library.