~ubuntu-branches/ubuntu/trusty/rgtk2/trusty

« back to all changes in this revision

Viewing changes to man/gdk-Fonts.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-03 11:35:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101103113546-a7fi7jdxdebp0tw1
Tags: 2.20.1-1
* New upstream release

* debian/control: Set (Build-)Depends: to current R version
* debian/control: Set Standards-Version: to current version 

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
\code{\link{gdkTextHeight}(object, text, text.length = -1)}\cr
33
33
\code{\link{gdkCharHeight}(object, character)}\cr
34
34
}
35
 
\section{Detailed Description}{The \verb{\link{GdkFont}} data type represents a font for drawing on
 
35
\section{Detailed Description}{The \code{\link{GdkFont}} data type represents a font for drawing on
36
36
the screen. These functions provide support for
37
37
loading fonts, and also for determining the dimensions
38
38
of characters and strings when drawn with a particular
39
39
font.
40
40
  
41
41
Fonts in X are specified by a
42
 
\dfn{X Logical Font Description}. 
 
42
\dfn{X Logical Font Description}.
43
43
The following description is considerably simplified.
44
 
For definitive information about XLFD's see the 
 
44
For definitive information about XLFD's see the
45
45
X reference documentation. A X Logical Font Description (XLFD)
46
46
consists of a sequence of fields separated (and surrounded by) '-'
47
47
characters. For example, Adobe Helvetica Bold 12 pt, has the
48
 
full description: 
 
48
full description:
49
49
\preformatted{"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
50
50
}
51
51
  
52
52
The fields in the XLFD are:
53
 
 
54
53
\tabular{ll}{
55
54
Foundry \tab the company or organization where the font originated. \cr
56
55
Family \tab the font family (a group of related font designs). \cr
83
82
also be specified as
84
83
\preformatted{"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
85
84
}
86
 
 
87
85
It is generally a good idea to use wildcards for any
88
86
portion of the XLFD that your program does not care
89
87
about specifically, since that will improve the
92
90
A \dfn{fontset} is a list of fonts
93
91
that is used for drawing international text that may
94
92
contain characters from a number of different character
95
 
sets. It is represented by a list of XLFD's. 
 
93
sets. It is represented by a list of XLFD's.
96
94
  
97
95
The font for a given character set is determined by going
98
96
through the list of XLFD's in order. For each one, if
107
105
The functions for determining the metrics of a string
108
106
come in several varieties that can take a number
109
107
of forms of string input:
110
 
 
111
108
\describe{
112
109
\item{8-bit string}{    When using functions like \code{\link{gdkStringWidth}} that
113
110
    take a \verb{character}, if the font is of type
135
132
    }
136
133
\item{Wide character string}{    For a number of the text-measuring functions, GDK
137
134
    provides a variant (such as \code{\link{gdkTextWidthWc}}) which
138
 
    takes a \verb{numeric} instead of a 
 
135
    takes a \verb{numeric} instead of a
139
136
    \verb{character}. The input is then taken to
140
137
    be a wide character string in the encoding of the
141
138
    current locale. (A wide character string is a string
142
139
    in which each character consists of several bytes,
143
 
    and the width of each character in the string is 
 
140
    and the width of each character in the string is
144
141
    constant.)
145
142
    }
146
143
}
148
145
GDK provides functions to determine a number of different
149
146
measurements (metrics) for a given string. (Need diagram
150
147
here).
151
 
 
152
148
\describe{
153
149
\item{ascent}{    The vertical distance from the origin of the drawing
154
150
    opereration to the top of the drawn character.
165
161
\item{width bearing}{    The horizontal distance from the origin of the drawing
166
162
    operation to the correct origin for drawing another
167
163
    string to follow the current one. Depending on the
168
 
    font, this could be greater than or less than the 
 
164
    font, this could be greater than or less than the
169
165
    right bearing.
170
166
    }
171
167
}}
197
193
}
198
194
 
199
195
}}}
200
 
\references{\url{http://developer.gnome.org/doc/API/2.0/gdk/gdk-Fonts.html}}
 
196
\references{\url{http://library.gnome.org/devel//gdk/gdk-Fonts.html}}
201
197
\author{Derived by RGtkGen from GTK+ documentation}
202
198
\keyword{internal}