Version: stable
FUNCTIONS | |
---|---|
fontgen.load_font() | |
fontgen.unload_font() | |
fontgen.add_glyphs() | |
fontgen.remove_glyphs() |
fontgen.load_font(fontc_path,ttf_path,options,complete_function)
Creates a mapping between a .fontc file and a .ttf file. Increases the ref count for both resources.
PARAMETERS
fontc_path |
string |
Path to a .fontc file in the project | ||||||
ttf_path |
string |
Path to a .ttf file in the project | ||||||
options |
table |
Options for generating the glyphs
|
||||||
complete_function |
function |
function to call when the animation has completed
|
fontgen.unload_font(fontc_path_hash)
Removes the generator mapping between the .fontc and .ttf file. Decreases the ref count for both resources. Does not remove the previously generated glyphs!
PARAMETERS
fontc_path_hash |
hash |
Path hash of the .fontc file in the project |
fontgen.add_glyphs(fontc_path_hash,text,callback)
Asynchronoously sdds glyphs to the .fontc resource.
PARAMETERS
fontc_path_hash |
hash |
Path hash of the .fontc file in the project | ||||||||||||
text |
string |
Utf-8 string containing glyphs to add to the .fontc *Note* No checks for duplicate glyphs is done. | ||||||||||||
callback |
function |
Function to be called after the last glyph was processed. May be nil.
|
RETURNS
integer |
Returns a request id, used in the callback |
fontgen.remove_glyphs(fontc_path_hash,text)
Removes glyphs from the .fontc resource
PARAMETERS
fontc_path_hash |
hash |
Path hash of the .fontc file in the project |
text |
string |
Utf-8 string containing glyphs to remove from the .fontc |