PgGlyphItem

pango_shape() produces a string of glyphs which can be measured or drawn to the screen. The following structures are used to store information about glyphs.

Constructors

this
this(PangoGlyphItem* pangoGlyphItem)

Sets our main struct and passes it to the parent class

Members

Functions

applyAttrs
ListSG applyAttrs(string text, PgAttributeList list)

Splits a shaped item (PangoGlyphItem) into multiple items based on an attribute list. The idea is that if you have attributes that don't affect shaping, such as color or underline, to avoid affecting shaping, you filter them out (pango_attr_list_filter()), apply the shaping process and then reapply them to the result using this function. All attributes that start or end inside a cluster are applied to that cluster; for instance, if half of a cluster is underlined and the other-half strikethrough, then the cluster will end up with both underline and strikethrough attributes. In these cases, it may happen that item->extra_attrs for some of the result items can have multiple attributes of the same type. This function takes ownership of glyph_item; it will be reused as one of the elements in the list. Since 1.2

copy
PgGlyphItem copy()

Make a deep copy of an existing PangoGlyphItem structure. Since 1.20

free
void free()

Frees a PangoGlyphItem and resources to which it points. Since 1.6

getLogicalWidths
void getLogicalWidths(string text, int[] logicalWidths)

Given a PangoGlyphItem and the corresponding text, determine the screen width corresponding to each character. When multiple characters compose a single cluster, the width of the entire cluster is divided equally among the characters. See also pango_glyph_string_get_logical_widths(). Since 1.26

getPgGlyphItemStruct
PangoGlyphItem* getPgGlyphItemStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

letterSpace
void letterSpace(string text, PangoLogAttr logAttrs, int letterSpacing)

Adds spacing between the graphemes of glyph_item to give the effect of typographic letter spacing. Since 1.6

split
PgGlyphItem split(string text, int splitIndex)

Modifies orig to cover only the text after split_index, and returns a new item that covers the text before split_index that used to be in orig. You can think of split_index as the length of the returned item. split_index may not be 0, and it may not be greater than or equal to the length of orig (that is, there must be at least one byte assigned to each item, you can't create a zero-length item). This function is similar in function to pango_item_split() (and uses it internally.) Since 1.2

Variables

pangoGlyphItem
PangoGlyphItem* pangoGlyphItem;

the main Gtk struct

Meta