Class engine.FontPackage
Define and load fonts
Tables
engine.FontPackage.packages
All of the packages
Fields
engine.FontPackage.cur_size
Default font style, "normal"
engine.FontPackage.cur_id
Default font id, "default"
Methods
engine.FontPackage:loadDefinition (file, env)
Loads lore
engine.FontPackage:setDefaultSize (size)
engine.FontPackage:setDefaultId (id)
Set default font to use
engine.FontPackage:resolveFont (name, orname)
Resolves a font
engine.FontPackage:getFont (name, orname)
Fetches the actual font by calling resolveFont() internally
engine.FontPackage:get (name, force)
Get by name.
engine.FontPackage:list ()
List all fonts
engine.FontPackage:init (t)
Initialize font package
Tables
Fields
- engine.FontPackage.cur_size
- Default font style, "normal"
- engine.FontPackage.cur_id
- Default font id, "default"
Methods
- engine.FontPackage:loadDefinition (file, env)
-
Loads lore
Parameters:
- file string
- env
- engine.FontPackage:setDefaultSize (size)
-
Parameters:
- size string "normal", "bold", etc
- engine.FontPackage:setDefaultId (id)
-
Set default font to use
Parameters:
- id string if it can't find it, then the font will be "basic"
- engine.FontPackage:resolveFont (name, orname)
-
Resolves a font
Parameters:
Returns:
- font object
- size
- engine.FontPackage:getFont (name, orname)
-
Fetches the actual font by calling resolveFont() internally
Parameters:
Returns:
- font
- size
- engine.FontPackage:get (name, force)
-
Get by name.
Parameters:
- name string
- force optional boolean make a font bold no matter what
- engine.FontPackage:list ()
- List all fonts
- engine.FontPackage:init (t)
-
Initialize font package
Parameters: