Version: stable

FUNCTIONS
font.add_glyphs() adds more glyphs to a .fontc resource
font.remove_glyphs() removes glyphs from the font

Functions

font.add_glyphs()

font.add_glyphs(path,text,callback)

Asynchronoously adds more glyphs to a .fontc resource

PARAMETERS

path string
hash
The path to the .fontc resource
text string
A string with unique unicode characters to be loaded
[callback] function(self, request_id, result, errstring)
(optional) A callback function that is called after the request is finished
self
object The current object.
request_id
number The request id
result
boolean True if request was succesful
errstring
string nil if the request was successful

RETURNS

request_id number
Returns the asynchronous request id

EXAMPLES

-- Add glyphs
local requestid = font.add_glyphs("/path/to/my.fontc", "abcABC123", function (self, request, result, errstring)
        -- make a note that all the glyphs are loaded
        -- and we're ready to present the text
        self.dialog_text_ready = true
    end)
-- Remove glyphs
local requestid = font.remove_glyphs("/path/to/my.fontc", "abcABC123")

font.remove_glyphs()

font.remove_glyphs(path,text)

Removes glyphs from the font

PARAMETERS

path string
hash
The path to the .fontc resource
text string
A string with unique unicode characters to be removed