Buffer#
- class Buffer(**kwargs)#
- Constructors:
new(font:PangoFc.Font) -> PangoOT.Buffer
Constructors#
Methods#
- class Buffer
- add_glyph(glyph: int, properties: int, cluster: int) None#
Appends a glyph to a
PangoOTBuffer, withpropertiesidentifying which features should be applied on this glyph.See
add_feature.Added in version 1.4.
- Parameters:
glyph – the glyph index to add, like a
PangoGlyphproperties – the glyph properties
cluster – the cluster that this glyph belongs to
- get_glyphs() list[Glyph]#
Gets the glyph array contained in a
PangoOTBuffer.The glyphs are owned by the buffer and should not be freed, and are only valid as long as buffer is not modified.
Added in version 1.4.
- output(glyphs: GlyphString) None#
Exports the glyphs in a
PangoOTBufferinto aPangoGlyphString.This is typically used after the OpenType layout processing is over, to convert the resulting glyphs into a generic Pango glyph string.
Added in version 1.4.
- Parameters:
glyphs – a
PangoGlyphString
- set_rtl(rtl: bool) None#
Sets whether glyphs will be rendered right-to-left.
This setting is needed for proper horizontal positioning of right-to-left scripts.
Added in version 1.4.
- Parameters:
rtl –
Truefor right-to-left text
- set_zero_width_marks(zero_width_marks: bool) None#
Sets whether characters with a mark class should be forced to zero width.
This setting is needed for proper positioning of Arabic accents, but will produce incorrect results with standard OpenType Indic fonts.
Added in version 1.6.
- Parameters:
zero_width_marks –
Trueif characters with a mark class should be forced to zero width