Skip to content

class HbScript

Data type for scripts. Each Script 's value is an Tag corresponding to the four-letter values defined by ISO 15924.

Lua wrapper for hb_script_t type.

Reference:

😱 Types incomplete or incorrect? 🙏 Please contribute!


methods


HbScript.new


function HbScript.new(script: string) ->  HbScript {
    COMMON = string,
    INHERITED = string,
    UNKNOWN = string,
    INVALID = string,
    new = function,
    from_iso15924_tag = function,
    to_iso15924_tag = function,
    __to_string = function,
    __eq = function,
}
@param script - 4-letter script code according to the ISO 15924 standard.

@return - a Script object.

😱 Types incomplete or incorrect? 🙏 Please contribute!

Convert a string representing an ISO 15924 script tag to a corresponding Script object. Wraps hb_script_from_string.

Reference:

HbScript.from_iso15924_tag


function HbScript.from_iso15924_tag(tag: HbTag {
    new = function,
    __to_string = function,
    __eq = function,
})
@param tag - a Tag object representing a ISO 15924 script.

😱 Types incomplete or incorrect? 🙏 Please contribute!

Convert an ISO 15924 script Tag object to a corresponding Script object.

Wraps hb_script_from_iso15924_tag

Reference:

HbScript.to_iso15924_tag


function HbScript.to_iso15924_tag() ->  HbTag {
    new = function,
    __to_string = function,
    __eq = function,
}

@return - a Tag object representing the script.

😱 Types incomplete or incorrect? 🙏 Please contribute!

Converts an Script object to a corresponding ISO 15924 script Tag.

Wraps hb_script_to_iso15924_tag.

Reference:

HbScript.__to_string


function HbScript.__to_string() ->  string

@return - Returns a 4-letter ISO 15924 script code for the script object.

😱 Types incomplete or incorrect? 🙏 Please contribute!

Enable nice output with tostring(…).

Reference:

HbScript.__eq


function HbScript.__eq() ->  boolean

@return - true or false depending on whether the two scripts are equal.

😱 Types incomplete or incorrect? 🙏 Please contribute!

Enables equality comparisions with == between two scripts.

Reference:

fields


HbScript.COMMON


HbScript.COMMON : string

Wraps HB_SCRIPT_COMMON.

Reference:

HbScript.INHERITED


HbScript.INHERITED : string

Wraps HB_SCRIPT_INHERITED.

Reference:

HbScript.UNKNOWN


HbScript.UNKNOWN : string

Wraps HB_SCRIPT_UNKNOWN.

Reference:

HbScript.INVALID


HbScript.INVALID : string

Wraps HB_SCRIPT_INVALID.

Reference: