class HbLanguage
Data type for languages. Each lanauge object corresponds to a BCP 47 language tag.
Lua wrapper for hb_language_t
type.
Reference:
- Corresponding C source code: luaharfbuzz.h#L20
- HarfBuzz online documentation: hb_language_t
methods
HbLanguage.new
function HbLanguage.new(language_tag) -> HbLanguage {
INVALID = HbLanguage,
new = function,
__tostring = function,
__eq = function,
}
@return - a Language
object.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Convert a string representing a BCP 47 language tag to the corresponding language object.
Wraps hb_language_from_string
.
Reference:
- Corresponding C source code: language.c#L4-L17
- HarfBuzz online documentation: hb_language_from_string
HbLanguage.__tostring
@return - Returns a string representation for the language object.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Enable nice output with tostring(…)
.
Wraps hb_language_to_string
.
Reference:
- Corresponding C source code: language.c#L19-L25
- HarfBuzz online documentation: hb_language_to_string
HbLanguage.__eq
function HbLanguage.__eq(lang: HbLanguage {
INVALID = HbLanguage,
new = function,
__tostring = function,
__eq = function,
}) -> boolean
@return - true
or false
depending on whether the two languages are equal.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Enable equality comparisions with ==
between two languages.
Reference:
- Corresponding C source code: language.c#L27-L34
fields
HbLanguage.INVALID
HbLanguage.INVALID : HbLanguage {
INVALID: HbLanguage,
new: function,
__tostring: function,
__eq: function,
}
Value to represent a nonexistent name ID.
Wraps HB_LANGUAGE_INVALID
.
Reference:
- HarfBuzz online documentation: HB_LANGUAGE_INVALID
- Corresponding C source code: harfbuzz.lua#L20