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:
- Corresponding C source code: luaharfbuzz.h#L18
- HarfBuzz online documentation: hb_script_t
😱 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,
}
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:
- Corresponding C source code: script.c#L3-L14
- HarfBuzz online documentation: hb_script_from_string
HbScript.from_iso15924_tag
function HbScript.from_iso15924_tag(tag: HbTag {
new = function,
__to_string = function,
__eq = function,
})
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:
- Corresponding C source code: script.c#L16-L25
- HarfBuzz online documentation: harfbuzz-hb-common.html#hb-script-from-iso15924-tag
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:
- Corresponding C source code: script.c#L37-L46
- HarfBuzz online documentation: harfbuzz-hb-common.html#hb-script-to-iso15924-tag
HbScript.__to_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:
- Corresponding C source code: script.c#L27-L35
HbScript.__eq
@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:
- Corresponding C source code: script.c#L48-L54
fields
HbScript.COMMON
Wraps HB_SCRIPT_COMMON
.
Reference:
HbScript.INHERITED
Wraps HB_SCRIPT_INHERITED
.
Reference:
HbScript.UNKNOWN
Wraps HB_SCRIPT_UNKNOWN
.
Reference:
HbScript.INVALID
Wraps HB_SCRIPT_INVALID
.
Reference: