Structures for storing information about glyphs

`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.

— Function: **pango-matrix-copy** (`self `` ⇒ `(`ret `

`<pango-matrix>`

)`<pango-matrix>`

)Copies a

`<pango-matrix>`

.

matrix- a
`<pango-matrix>`

, can be ‘’`#f`

ret- the newly allocated
`<pango-matrix>`

, which should be freed with`pango-matrix-free`

, or ‘’ if`#f`

matrixwas ‘’.`#f`

Since 1.6

— Function: **pango-matrix-translate** (`self ``tx ``ty `

`<pango-matrix>`

) (`double`

) (`double`

)Changes the transformation represented by

matrixto be the transformation given by first translating by (tx,ty) then applying the original transformation.

matrix- a
`<pango-matrix>`

tx- amount to translate in the X direction
ty- amount to translate in the Y direction
Since 1.6

— Function: **pango-matrix-scale** (`self ``scale_x ``scale_y `

`<pango-matrix>`

) (`double`

) (`double`

)Changes the transformation represented by

matrixto be the transformation given by first scaling bysxin the X direction andsyin the Y direction then applying the original transformation.

matrix- a
`<pango-matrix>`

scale-x- amount to scale by in X direction
scale-y- amount to scale by in Y direction
Since 1.6

— Function: **pango-matrix-rotate** (`self ``degrees `

`<pango-matrix>`

) (`double`

)Changes the transformation represented by

matrixto be the transformation given by first rotating bydegreesdegrees counter-clockwise then applying the original transformation.

matrix- a
`<pango-matrix>`

degrees- degrees to rotate counter-clockwise
Since 1.6

— Function: **pango-matrix-concat** (`self ``new_matrix `

`<pango-matrix>`

) (`<pango-matrix>`

)Changes the transformation represented by

matrixto be the transformation given by first applying transformation given bynew-matrixthen applying the original transformation.

matrix- a
`<pango-matrix>`

new-matrix- a
`<pango-matrix>`

Since 1.6

— Function: **pango-matrix-get-font-scale-factor** (`self `` ⇒ `(`ret `

`<pango-matrix>`

)`double`

)Returns the scale factor of a matrix on the height of the font. That is, the scale factor in the direction perpendicular to the vector that the X coordinate is mapped to.

matrix- a
`<pango-matrix>`

, may be ‘’`#f`

ret- the scale factor of
matrixon the height of the font, or 1.0 ifmatrixis ‘’.`#f`

Since 1.12

— Function: **pango-glyph-string-new**` ⇒ `(`ret `

`<pango-glyph-string>`

)Create a new

`<pango-glyph-string>`

.

ret- the newly allocated
`<pango-glyph-string>`

, which should be freed with`pango-glyph-string-free`

.

— Function: **pango-glyph-string-copy** (`self `` ⇒ `(`ret `

`<pango-glyph-string>`

)`<pango-glyph-string>`

)Copy a glyph string and associated storage.

string- a
`<pango-glyph-string>`

.ret- the newly allocated
`<pango-glyph-string>`

, which should be freed with`pango-glyph-string-free`

.

— Function: **pango-glyph-string-set-size** (`self ``new_len `

`<pango-glyph-string>`

) (`int`

)Resize a glyph string to the given length.

string- a
`<pango-glyph-string>`

.new-len- the new length of the string.

— Function: **pango-glyph-string-extents** (`self ``font `` ⇒ `(`ink_rect ``logical_rect `

`<pango-glyph-string>`

) (`<pango-font>`

)`<pango-rectangle>`

) (`<pango-rectangle>`

)Compute the logical and ink extents of a glyph string. See the documentation for

`pango-font-get-glyph-extents`

for details about the interpretation of the rectangles.

glyphs- a
`<pango-glyph-string>`

font- a
`<pango-font>`

ink-rect- rectangle used to store the extents of the glyph string as drawn or ‘
’ to indicate that the result is not needed.`#f`

logical-rect- rectangle used to store the logical extents of the glyph string or ‘
’ to indicate that the result is not needed.`#f`

— Function: **pango-glyph-string-extents-range** (`self ``start ``end ``font `` ⇒ `(`ink_rect ``logical_rect `

`<pango-glyph-string>`

) (`int`

) (`int`

) (`<pango-font>`

)`<pango-rectangle>`

) (`<pango-rectangle>`

)Computes the extents of a sub-portion of a glyph string. The extents are relative to the start of the glyph string range (the origin of their coordinate system is at the start of the range, not at the start of the entire glyph string).

glyphs- a
`<pango-glyph-string>`

start- start index
end- end index (the range is the set of bytes with indices such that start <= index < end)
font- a
`<pango-font>`

ink-rect- rectangle used to store the extents of the glyph string range as drawn or ‘
’ to indicate that the result is not needed.`#f`

logical-rect- rectangle used to store the logical extents of the glyph string range or ‘
’ to indicate that the result is not needed.`#f`

— Function: **pango-glyph-string-get-width** (`self `` ⇒ `(`ret `

`<pango-glyph-string>`

)`int`

)Computes the logical width of the glyph string as can also be computed using

`pango-glyph-string-extents`

. However, since this only computes the width, it's much faster. This is in fact only a convenience function that computes the sum of geometry.width for each glyph in theglyphs.

glyphs- a
`<pango-glyph-string>`

ret- the logical width of the glyph string.
Since 1.14