1
\alias{cairo-scaled-font}
2
\alias{CairoScaledFont}
3
\alias{CairoFontExtents}
4
\alias{CairoTextExtents}
5
\alias{cairoScaledFont}
6
\name{cairo-scaled-font}
7
\title{cairo_scaled_font_t}
8
\description{Font face at particular size and options}
9
\section{Methods and Functions}{
10
\code{\link{cairoScaledFontCreate}(font.face, font.matrix, ctm, option)}\cr
11
\code{\link{cairoScaledFontStatus}(scaled.font)}\cr
12
\code{\link{cairoScaledFontExtents}(scaled.font)}\cr
13
\code{\link{cairoScaledFontTextExtents}(scaled.font, utf8)}\cr
14
\code{\link{cairoScaledFontGlyphExtents}(scaled.font, glyphs, num.glyphs)}\cr
15
\code{\link{cairoScaledFontTextToGlyphs}(scaled.font, x, y, utf8, utf8.len = -1)}\cr
16
\code{\link{cairoScaledFontGetFontFace}(scaled.font)}\cr
17
\code{\link{cairoScaledFontGetFontOptions}(scaled.font)}\cr
18
\code{\link{cairoScaledFontGetFontMatrix}(scaled.font)}\cr
19
\code{\link{cairoScaledFontGetCtm}(scaled.font)}\cr
20
\code{\link{cairoScaledFontGetScaleMatrix}(scaled.font)}\cr
21
\code{\link{cairoScaledFontGetType}(scaled.font)}\cr
22
\code{\link{cairoScaledFontSetUserData}(scaled.font, key, user.data)}\cr
23
\code{\link{cairoScaledFontGetUserData}(scaled.font, key)}\cr
24
\code{cairoScaledFont(font.face, font.matrix, ctm, option)}
26
\section{Detailed Description}{\code{\link{CairoScaledFont}} represents a realization of a font face at a particular
27
size and transformation and a certain set of font options.}
28
\section{Structures}{\describe{
29
\item{\verb{CairoScaledFont}}{
30
A \code{\link{CairoScaledFont}} is a font scaled to a particular size and device
31
resolution. A \code{\link{CairoScaledFont}} is most useful for low-level font
32
usage where a library or application wants to cache a reference
33
to a scaled font to speed up the computation of metrics.
35
There are various types of scaled fonts, depending on the
36
\dfn{font backend} they use. The type of a
37
scaled font can be queried using \code{\link{cairoScaledFontGetType}}.
39
Memory management of \code{\link{CairoScaledFont}} is done with
40
\code{cairoScaledFontReference()} and \code{cairoScaledFontDestroy()}.
43
\item{\verb{CairoFontExtents}}{
44
The \code{\link{CairoFontExtents}} structure stores metric information for
45
a font. Values are given in the current user-space coordinate
48
Because font metrics are in user-space coordinates, they are
49
mostly, but not entirely, independent of the current transformation
50
matrix. If you call \code{cairo_scale(cr, 2.0, 2.0)},
51
text will be drawn twice as big, but the reported text extents will
52
not be doubled. They will change slightly due to hinting (so you
53
can't assume that metrics are independent of the transformation
54
matrix), but otherwise will remain unchanged.
55
\strong{\verb{CairoFontExtents} is a \link{transparent-type}.}
58
\item{\verb{ascent}}{[numeric] the distance that the font extends above the baseline.
59
Note that this is not always exactly equal to the maximum
60
of the extents of all the glyphs in the font, but rather
61
is picked to express the font designer's intent as to
62
how the font should align with elements above it.}
63
\item{\verb{descent}}{[numeric] the distance that the font extends below the baseline.
64
This value is positive for typical fonts that include
65
portions below the baseline. Note that this is not always
66
exactly equal to the maximum of the extents of all the
67
glyphs in the font, but rather is picked to express the
68
font designer's intent as to how the the font should
69
align with elements below it.}
70
\item{\verb{height}}{[numeric] the recommended vertical distance between baselines when
71
setting consecutive lines of text with the font. This
72
is greater than \code{ascent}+\code{descent} by a
73
quantity known as the \dfn{line spacing}
74
or \dfn{external leading}. When space
75
is at a premium, most fonts can be set with only
76
a distance of \code{ascent}+\code{descent} between lines.}
77
\item{\verb{maxXAdvance}}{[numeric] the maximum distance in the X direction that
78
the the origin is advanced for any glyph in the font.}
79
\item{\verb{maxYAdvance}}{[numeric] the maximum distance in the Y direction that
80
the the origin is advanced for any glyph in the font.
81
this will be zero for normal fonts used for horizontal
82
writing. (The scripts of East Asia are sometimes written
87
\item{\verb{CairoTextExtents}}{
88
The \code{\link{CairoTextExtents}} structure stores the extents of a single
89
glyph or a string of glyphs in user-space coordinates. Because text
90
extents are in user-space coordinates, they are mostly, but not
91
entirely, independent of the current transformation matrix. If you call
92
\code{cairo_scale(cr, 2.0, 2.0)}, text will
93
be drawn twice as big, but the reported text extents will not be
94
doubled. They will change slightly due to hinting (so you can't
95
assume that metrics are independent of the transformation matrix),
96
but otherwise will remain unchanged.
99
\item{\verb{xBearing}}{[numeric] the horizontal distance from the origin to the
100
leftmost part of the glyphs as drawn. Positive if the
101
glyphs lie entirely to the right of the origin.}
102
\item{\verb{yBearing}}{[numeric] the vertical distance from the origin to the
103
topmost part of the glyphs as drawn. Positive only if the
104
glyphs lie completely below the origin; will usually be
106
\item{\verb{width}}{[numeric] width of the glyphs as drawn}
107
\item{\verb{height}}{[numeric] height of the glyphs as drawn}
108
\item{\verb{xAdvance}}{[numeric] distance to advance in the X direction
109
after drawing these glyphs}
110
\item{\verb{yAdvance}}{[numeric] distance to advance in the Y direction
111
after drawing these glyphs. Will typically be zero except
112
for vertical text layout as found in East-Asian languages.}
117
\section{Convenient Construction}{\code{cairoScaledFont} is the equivalent of \code{\link{cairoScaledFontCreate}}.}
118
\references{\url{http://www.cairographics.org/manual/cairo-scaled-font.html}}
119
\author{Derived by RGtkGen from GTK+ documentation}