class HbDirection
The direction of a text segment or buffer.
Lua wrapper for hb_direction_t
type.
Reference:
- Corresponding C source code: luaharfbuzz.h#L19
- HarfBuzz online documentation: hb_direction_t
😱 Types incomplete or incorrect? 🙏 Please contribute!
methods
HbDirection.new
function HbDirection.new(dir: unknown) -> HbDirection {
LTR = integer?,
RTL = integer?,
TTB = integer?,
BTT = integer?,
new = function,
__to_string = function,
__eq = function,
is_valid = function,
is_horizontal = function,
is_vertical = function,
is_forward = function,
is_backward = function,
...(+0)
}
dir
- can be one of ltr
, rtl
, ttb
, btt
or invalid
.
@return - a Direction
object.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Wraps hb_direction_from_string
.
Reference:
- Corresponding C source code: direction.c#L4-L14
- HarfBuzz online documentation: hb_direction_from_string
HbDirection.__to_string
@return - Returns a string representation for direction.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Enable nice output with tostring(…)
.
Wraps hb_direction_to_string
.
Reference:
- Corresponding C source code: direction.c#L16-L21
HbDirection.__eq
@return - true
or false
depending on whether the two tags are equal.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Enable equality comparisions with ==
between two directions.
Reference:
- Corresponding C source code: direction.c#L23-L29
HbDirection.is_valid
@return - a boolean value
😱 Types incomplete or incorrect? 🙏 Please contribute!
Test whether a text direction is valid.
Wraps HB_DIRECTION_IS_VALID
.
Reference:
- Corresponding C source code: direction.c#L31-L36
- HarfBuzz online documentation: HB_DIRECTION_IS_VALID
HbDirection.is_horizontal
@return - a boolean value
😱 Types incomplete or incorrect? 🙏 Please contribute!
Test whether a text direction is horizontal.
Requires that the direction be valid. Wraps HB_DIRECTION_IS_HORIZONTAL
.
Reference:
- Corresponding C source code: direction.c#L38-L43
- HarfBuzz online documentation: HB_DIRECTION_IS_HORIZONTAL
HbDirection.is_vertical
@return - a boolean value
😱 Types incomplete or incorrect? 🙏 Please contribute!
Test whether a text direction is vertical.
Requires that the direction be valid. Wraps HB_DIRECTION_IS_VERTICAL
.
Reference:
- Corresponding C source code: direction.c#L45-L50
- HarfBuzz online documentation: HB_DIRECTION_IS_VERTICAL
HbDirection.is_forward
@return - a boolean value
😱 Types incomplete or incorrect? 🙏 Please contribute!
Test whether a text direction moves forward (from left to right, or from top to bottom).
Requires that the direction be valid. Wraps HB_DIRECTION_IS_FORWARD
.
Reference:
- Corresponding C source code: direction.c#L52-L57
- HarfBuzz online documentation: HB_DIRECTION_IS_FORWARD
HbDirection.is_backward
@return - a boolean value
😱 Types incomplete or incorrect? 🙏 Please contribute!
Test whether a text direction moves backward (from right to left, or from bottom to top).
Requires that the direction be valid. Wraps HB_DIRECTION_IS_BACKWARD
.
Reference:
- Corresponding C source code: direction.c#L59-L64
- HarfBuzz online documentation: HB_DIRECTION_IS_BACKWARD
fields
HbDirection.LTR
Wraps HB_DIRECTION_LTR
.
Predefined directions that correspond to their original definitions in Harfbuzz.
Reference:
- HarfBuzz online documentation: hb_direction_t
HbDirection.RTL
Wraps HB_DIRECTION_RTL
.
Predefined directions that correspond to their original definitions in Harfbuzz.
Reference:
- HarfBuzz online documentation: hb_direction_t
HbDirection.TTB
Wraps HB_DIRECTION_TTB
.
Predefined directions that correspond to their original definitions in Harfbuzz.
Reference:
- HarfBuzz online documentation: hb_direction_t
HbDirection.BTT
Wraps HB_DIRECTION_LTR
.
Predefined directions that correspond to their original definitions in Harfbuzz.
Reference:
- HarfBuzz online documentation: hb_direction_t