]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/tfont.tex
a couple of wors about wxObjArray::Index()
[wxWidgets.git] / docs / latex / wx / tfont.tex
CommitLineData
ccaaf5b0 1\section{wxFont overview}\label{wxfontoverview}
a660d684
KB
2
3Class: \helpref{wxFont}{wxfont}
4
5A font is an object which determines the appearance of text, primarily
fe604ccd 6when drawing text to a window or device context. A font is determined by
775a998e 7the following parameters (not all of them have to be specified, of course):
a660d684
KB
8
9\begin{twocollist}\itemsep=0pt
10\twocolitem{Point size}{This is the standard way of referring to text size.}
11\twocolitem{Family}{Supported families are:
cd77c085
JS
12 {\bf wxDEFAULT, wxDECORATIVE, wxROMAN, wxSCRIPT, wxSWISS, wxMODERN}.
13 {\bf wxMODERN} is a fixed pitch font; the others are either fixed or variable pitch.}
a660d684
KB
14\twocolitem{Style}{The value can be {\bf wxNORMAL, wxSLANT} or {\bf wxITALIC}.}
15\twocolitem{Weight}{The value can be {\bf wxNORMAL, wxLIGHT} or {\bf wxBOLD}.}
16\twocolitem{Underlining}{The value can be TRUE or FALSE.}
17\twocolitem{Face name}{An optional string specifying the actual typeface to be used. If NULL,
18a default typeface will chosen based on the family.}
775a998e
VZ
19\twocolitem{Encoding}{The font encoding (see {\bf wxFONTENCODING\_XXX}
20constants and the \helpref{font overview}{wxfontencodingoverview} for more
21details)}
a660d684
KB
22\end{twocollist}
23
775a998e
VZ
24Specifying a family, rather than a specific typeface name, ensures a degree of
25portability across platforms because a suitable font will be chosen for the
26given font family.
27
28Under Windows, the face name can be one of the installed fonts on the user's
29system. Since the choice of fonts differs from system to system, either choose
30standard Windows fonts, or if allowing the user to specify a face name, store
31the family id with any file that might be transported to a different Windows
32machine or other platform.
33
34\normalbox{{\bf Note:} There is currently a difference between the appearance
35of fonts on the two platforms, if the mapping mode is anything other than
36wxMM\_TEXT. Under X, font size is always specified in points. Under MS
37Windows, the unit for text is points but the text is scaled according to the
38current mapping mode. However, user scaling on a device context will also
39scale fonts under both environments.}
a660d684 40