Last chance! 50% off unlimited learning
Sale ends in
cairoScaledFontCreate(font.face, font.matrix, ctm, option)
cairoScaledFontStatus(scaled.font)
cairoScaledFontExtents(scaled.font)
cairoScaledFontTextExtents(scaled.font, utf8)
cairoScaledFontGlyphExtents(scaled.font, glyphs, num.glyphs)
cairoScaledFontTextToGlyphs(scaled.font, x, y, utf8, utf8.len = -1)
cairoScaledFontGetFontFace(scaled.font)
cairoScaledFontGetFontOptions(scaled.font)
cairoScaledFontGetFontMatrix(scaled.font)
cairoScaledFontGetCtm(scaled.font)
cairoScaledFontGetScaleMatrix(scaled.font)
cairoScaledFontGetType(scaled.font)
cairoScaledFontSetUserData(scaled.font, key, user.data)
cairoScaledFontGetUserData(scaled.font, key)
cairoScaledFont(font.face, font.matrix, ctm, option)
CairoScaledFont
represents a realization of a font face at a particular
size and transformation and a certain set of font options.CairoScaledFont
CairoScaledFont
is a font scaled to a particular size and device
resolution. A CairoScaledFont
is most useful for low-level font
usage where a library or application wants to cache a reference
to a scaled font to speed up the computation of metrics. There are various types of scaled fonts, depending on the
font backend they use. The type of a
scaled font can be queried using cairoScaledFontGetType
. Memory management of CairoScaledFont
is done with
cairoScaledFontReference()
and cairoScaledFontDestroy()
. CairoFontExtents
CairoFontExtents
structure stores metric information for
a font. Values are given in the current user-space coordinate
system. Because font metrics are in user-space coordinates, they are
mostly, but not entirely, independent of the current transformation
matrix. If you call cairo_scale(cr, 2.0, 2.0)
,
text will be drawn twice as big, but the reported text extents will
not be doubled. They will change slightly due to hinting (so you
can't assume that metrics are independent of the transformation
matrix), but otherwise will remain unchanged.
CairoFontExtents
is a transparent-type. ascent
descent
height
ascent
+descent
by a
quantity known as the line spacing
or external leading. When space
is at a premium, most fonts can be set with only
a distance of ascent
+descent
between lines.maxXAdvance
maxYAdvance
CairoTextExtents
CairoTextExtents
structure stores the extents of a single
glyph or a string of glyphs in user-space coordinates. Because text
extents are in user-space coordinates, they are mostly, but not
entirely, independent of the current transformation matrix. If you call
cairo_scale(cr, 2.0, 2.0)
, text will
be drawn twice as big, but the reported text extents will not be
doubled. They will change slightly due to hinting (so you can't
assume that metrics are independent of the transformation matrix),
but otherwise will remain unchanged. xBearing
yBearing
width
height
xAdvance
yAdvance
cairoScaledFont
is the equivalent of cairoScaledFontCreate
.