Skip to content

class Blob

Blobs wrap a chunk of binary data to handle lifecycle management of data while it is passed between client and HarfBuzz. Blobs are primarily used to create font faces, but also to access font face tables, as well as pass around other binary data.

Wraps hb_blob_t.

Reference:


methods


Blob.new


function Blob.new(data: string) ->  Blob {
    new = function,
    new_from_file = function,
    get_length = function,
    get_data = function,
}
@param data - A Lua string containing binary or character data.

Create a new "blob" object wrapping data.

Wraps hb_blob_create.

Reference:

Blob.new_from_file


function Blob.new_from_file(filename: string) ->  Blob {
    new = function,
    new_from_file = function,
    get_length = function,
    get_data = function,
}
@param filename - lua string.

Create a new blob containing the data from the specified binary font file.

Wraps hb_blob_create_from_file.

Reference:

Blob.get_length


function Blob.get_length() ->  integer

Fetch the length of a blob's data.

Wraps hb_blob_get_length.

Reference:

Blob.get_data


function Blob.get_data() -> data string

@return data - the byte data of blob as a string

😱 Types incomplete or incorrect? 🙏 Please contribute!

Fetch the data from a blob.

Wraps hb_blob_get_data.

Reference: