]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/font.tex
remove C++ comment
[wxWidgets.git] / docs / latex / wx / font.tex
1 \section{\class{wxFont}}\label{wxfont}
2
3 A font is an object which determines the appearance of text. Fonts are
4 used for drawing text to a device context, and setting the appearance of
5 a window's text.
6
7 This class uses \helpref{reference counting and copy-on-write}{trefcount}
8 internally so that assignments between two instances of this class are very
9 cheap. You can therefore use actual objects instead of pointers without
10 efficiency problems. If an instance of this class is changed it will create
11 its own data internally so that other instances, which previously shared the
12 data using the reference counting, are not affected.
13
14 You can retrieve the current system font settings with \helpref{wxSystemSettings}{wxsystemsettings}.
15
16 \helpref{wxSystemSettings}{wxsystemsettings}
17
18 \wxheading{Derived from}
19
20 \helpref{wxGDIObject}{wxgdiobject}\\
21 \helpref{wxObject}{wxobject}
22
23 \wxheading{Include files}
24
25 <wx/font.h>
26
27 \wxheading{Library}
28
29 \helpref{wxCore}{librarieslist}
30
31 \wxheading{Constants}
32
33 The possible values for the \arg{family} parameter of \helpref{wxFont
34 constructor}{wxfontctor} are (the old names are for compatibility only):
35
36 \begin{verbatim}
37 enum wxFontFamily
38 {
39 wxFONTFAMILY_DEFAULT = wxDEFAULT,
40 wxFONTFAMILY_DECORATIVE = wxDECORATIVE,
41 wxFONTFAMILY_ROMAN = wxROMAN,
42 wxFONTFAMILY_SCRIPT = wxSCRIPT,
43 wxFONTFAMILY_SWISS = wxSWISS,
44 wxFONTFAMILY_MODERN = wxMODERN,
45 wxFONTFAMILY_TELETYPE = wxTELETYPE,
46 wxFONTFAMILY_MAX
47 };
48 \end{verbatim}
49
50 The possible values for the \arg{weight} parameter are (the old names
51 are for compatibility only):
52
53 \begin{verbatim}
54 enum wxFontWeight
55 {
56 wxFONTWEIGHT_NORMAL = wxNORMAL,
57 wxFONTWEIGHT_LIGHT = wxLIGHT,
58 wxFONTWEIGHT_BOLD = wxBOLD,
59 wxFONTWEIGHT_MAX
60 };
61 \end{verbatim}
62
63 The font flags which can be used during the font creation are:
64
65 \begin{verbatim}
66 enum
67 {
68 // no special flags: font with default weight/slant/anti-aliasing
69 wxFONTFLAG_DEFAULT = 0,
70
71 // slant flags (default: no slant)
72 wxFONTFLAG_ITALIC = 1 << 0,
73 wxFONTFLAG_SLANT = 1 << 1,
74
75 // weight flags (default: medium)
76 wxFONTFLAG_LIGHT = 1 << 2,
77 wxFONTFLAG_BOLD = 1 << 3,
78
79 // anti-aliasing flag: force on or off (default: the current system default)
80 wxFONTFLAG_ANTIALIASED = 1 << 4,
81 wxFONTFLAG_NOT_ANTIALIASED = 1 << 5,
82
83 // underlined/strikethrough flags (default: no lines)
84 wxFONTFLAG_UNDERLINED = 1 << 6,
85 wxFONTFLAG_STRIKETHROUGH = 1 << 7,
86 };
87 \end{verbatim}
88
89 The known font encodings are:
90
91 \begin{verbatim}
92 enum wxFontEncoding
93 {
94 wxFONTENCODING_SYSTEM = -1, // system default
95 wxFONTENCODING_DEFAULT, // current default encoding
96
97 // ISO8859 standard defines a number of single-byte charsets
98 wxFONTENCODING_ISO8859_1, // West European (Latin1)
99 wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
100 wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
101 wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4)
102 wxFONTENCODING_ISO8859_5, // Cyrillic
103 wxFONTENCODING_ISO8859_6, // Arabic
104 wxFONTENCODING_ISO8859_7, // Greek
105 wxFONTENCODING_ISO8859_8, // Hebrew
106 wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
107 wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
108 wxFONTENCODING_ISO8859_11, // Thai
109 wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
110 // here anyhow to make all ISO8859
111 // consecutive numbers
112 wxFONTENCODING_ISO8859_13, // Baltic (Latin7)
113 wxFONTENCODING_ISO8859_14, // Latin8
114 wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro)
115 wxFONTENCODING_ISO8859_MAX,
116
117 // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
118 wxFONTENCODING_KOI8, // we don't support any of KOI8 variants
119 wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866
120 wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria
121
122 // what would we do without Microsoft? They have their own encodings
123 // for DOS
124 wxFONTENCODING_CP437, // original MS-DOS codepage
125 wxFONTENCODING_CP850, // CP437 merged with Latin1
126 wxFONTENCODING_CP852, // CP437 merged with Latin2
127 wxFONTENCODING_CP855, // another cyrillic encoding
128 wxFONTENCODING_CP866, // and another one
129 // and for Windows
130 wxFONTENCODING_CP874, // WinThai
131 wxFONTENCODING_CP1250, // WinLatin2
132 wxFONTENCODING_CP1251, // WinCyrillic
133 wxFONTENCODING_CP1252, // WinLatin1
134 wxFONTENCODING_CP1253, // WinGreek (8859-7)
135 wxFONTENCODING_CP1254, // WinTurkish
136 wxFONTENCODING_CP1255, // WinHebrew
137 wxFONTENCODING_CP1256, // WinArabic
138 wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7)
139 wxFONTENCODING_CP12_MAX,
140
141 wxFONTENCODING_UTF7, // UTF-7 Unicode encoding
142 wxFONTENCODING_UTF8, // UTF-8 Unicode encoding
143
144 wxFONTENCODING_UNICODE, // Unicode - currently used only by
145 // wxEncodingConverter class
146
147 wxFONTENCODING_MAX
148 };
149 \end{verbatim}
150
151 \wxheading{Predefined objects}
152
153 Objects:
154
155 {\bf wxNullFont}
156
157 Pointers:
158
159 {\bf wxNORMAL\_FONT\\
160 wxSMALL\_FONT\\
161 wxITALIC\_FONT\\
162 wxSWISS\_FONT}
163
164 \wxheading{See also}
165
166 \helpref{wxFont overview}{wxfontoverview}, \helpref{wxDC::SetFont}{wxdcsetfont},\rtfsp
167 \helpref{wxDC::DrawText}{wxdcdrawtext}, \helpref{wxDC::GetTextExtent}{wxdcgettextextent},\rtfsp
168 \helpref{wxFontDialog}{wxfontdialog}, \helpref{wxSystemSettings}{wxsystemsettings}
169
170 \latexignore{\rtfignore{\wxheading{Members}}}
171
172
173 \membersection{wxFont::wxFont}\label{wxfontctor}
174
175 \func{}{wxFont}{\void}
176
177 Default constructor.
178
179 \func{}{wxFont}{\param{const wxFont\&}{ font}}
180
181 Copy constructor, uses \helpref{reference counting}{trefcount}.
182
183 \func{}{wxFont}{\param{int}{ pointSize}, \param{wxFontFamily}{ family}, \param{int}{ style}, \param{wxFontWeight}{ weight},
184 \param{const bool}{ underline = false}, \param{const wxString\& }{faceName = ""},
185 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
186
187 \func{}{wxFont}{\param{const wxSize\&}{ pixelSize}, \param{wxFontFamily}{ family}, \param{int}{ style}, \param{wxFontWeight}{ weight},
188 \param{const bool}{ underline = false}, \param{const wxString\& }{faceName = ""},
189 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
190
191 Creates a font object with the specified attributes.
192
193 \wxheading{Parameters}
194
195 \docparam{pointSize}{Size in points.}
196
197 \docparam{pixelSize}{Size in pixels: this is directly supported only under MSW
198 currently where this constructor can be used directly, under other platforms a
199 font with the closest size to the given one is found using binary search and
200 the static \helpref{New}{wxfontnew} method must be used.}
201
202 \docparam{family}{Font family, a generic way of referring to fonts without specifying actual facename. One of:
203
204 \twocolwidtha{5cm}
205 \begin{twocollist}\itemsep=0pt
206 \twocolitem{{\bf wxFONTFAMILY\_DEFAULT}}{Chooses a default font.}
207 \twocolitem{{\bf wxFONTFAMILY\_DECORATIVE}}{A decorative font.}
208 \twocolitem{{\bf wxFONTFAMILY\_ROMAN}}{A formal, serif font.}
209 \twocolitem{{\bf wxFONTFAMILY\_SCRIPT}}{A handwriting font.}
210 \twocolitem{{\bf wxFONTFAMILY\_SWISS}}{A sans-serif font.}
211 \twocolitem{{\bf wxFONTFAMILY\_MODERN}}{A fixed pitch font.}
212 \twocolitem{{\bf wxFONTFAMILY\_TELETYPE}}{A teletype font.}
213 \end{twocollist}}
214
215 \docparam{style}{One of {\bf wxFONTSTYLE\_NORMAL}, {\bf wxFONTSTYLE\_SLANT} and {\bf wxFONTSTYLE\_ITALIC}.}
216
217 \docparam{weight}{Font weight, sometimes also referred to as font boldness. One of:
218
219 \twocolwidtha{5cm}
220 \begin{twocollist}\itemsep=0pt
221 \twocolitem{{\bf wxFONTWEIGHT\_NORMAL}}{Normal font.}
222 \twocolitem{{\bf wxFONTWEIGHT\_LIGHT}}{Light font.}
223 \twocolitem{{\bf wxFONTWEIGHT\_BOLD}}{Bold font.}
224 \end{twocollist}}
225
226 \docparam{underline}{The value can be true or false. At present this has an effect on Windows and Motif 2.x only.}
227
228 \docparam{faceName}{An optional string specifying the actual typeface to be used. If it is an empty string,
229 a default typeface will be chosen based on the family.}
230
231 \docparam{encoding}{An encoding which may be one of
232 \twocolwidtha{5cm}
233 \begin{twocollist}\itemsep=0pt
234 \twocolitem{{\bf wxFONTENCODING\_SYSTEM}}{Default system encoding.}
235 \twocolitem{{\bf wxFONTENCODING\_DEFAULT}}{Default application encoding: this
236 is the encoding set by calls to
237 \helpref{SetDefaultEncoding}{wxfontsetdefaultencoding} and which may be set to,
238 say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the
239 default application encoding is the same as default system encoding.}
240 \twocolitem{{\bf wxFONTENCODING\_ISO8859\_1...15}}{ISO8859 encodings.}
241 \twocolitem{{\bf wxFONTENCODING\_KOI8}}{The standard Russian encoding for Internet.}
242 \twocolitem{{\bf wxFONTENCODING\_CP1250...1252}}{Windows encodings similar to ISO8859 (but not identical).}
243 \end{twocollist}
244 If the specified encoding isn't available, no font is created
245 (see also \helpref{font encoding overview}{wxfontencodingoverview}).
246 }
247
248 \wxheading{Remarks}
249
250 If the desired font does not exist, the closest match will be chosen.
251 Under Windows, only scalable TrueType fonts are used.
252
253 See also \helpref{wxDC::SetFont}{wxdcsetfont}, \helpref{wxDC::DrawText}{wxdcdrawtext}
254 and \helpref{wxDC::GetTextExtent}{wxdcgettextextent}.
255
256
257 \membersection{wxFont::\destruct{wxFont}}\label{wxfontdtor}
258
259 \func{}{\destruct{wxFont}}{\void}
260
261 Destructor.
262 See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
263
264 \wxheading{Remarks}
265
266 Although all remaining fonts are deleted when the application exits,
267 the application should try to clean up all fonts itself. This is because
268 wxWidgets cannot know if a pointer to the font object is stored in an
269 application data structure, and there is a risk of double deletion.
270
271
272 \membersection{wxFont::IsFixedWidth}\label{wxfontisfixedwidth}
273
274 \constfunc{bool}{IsFixedWidth}{\void}
275
276 Returns {\tt true} if the font is a fixed width (or monospaced) font,
277 {\tt false} if it is a proportional one or font is invalid.
278
279
280 \membersection{wxFont::GetDefaultEncoding}\label{wxfontgetdefaultencoding}
281
282 \func{static wxFontEncoding}{GetDefaultEncoding}{\void}
283
284 Returns the current application's default encoding.
285
286 \wxheading{See also}
287
288 \helpref{Font encoding overview}{wxfontencodingoverview},
289 \helpref{SetDefaultEncoding}{wxfontsetdefaultencoding}
290
291
292 \membersection{wxFont::GetFaceName}\label{wxfontgetfacename}
293
294 \constfunc{wxString}{GetFaceName}{\void}
295
296 Returns the typeface name associated with the font, or the empty string if there is no
297 typeface information.
298
299 \wxheading{See also}
300
301 \helpref{wxFont::SetFaceName}{wxfontsetfacename}
302
303
304 \membersection{wxFont::GetFamily}\label{wxfontgetfamily}
305
306 \constfunc{wxFontFamily}{GetFamily}{\void}
307
308 Gets the font family. See \helpref{wxFont::SetFamily}{wxfontsetfamily} for a list of valid
309 family identifiers.
310
311 \wxheading{See also}
312
313 \helpref{wxFont::SetFamily}{wxfontsetfamily}
314
315
316 \membersection{wxFont::GetNativeFontInfoDesc}\label{wxfontgetnativefontinfodesc}
317
318 \constfunc{wxString}{GetNativeFontInfoDesc}{\void}
319
320 Returns the platform-dependent string completely describing this font.
321 Returned string is always non-empty.
322 Note that the returned string is not meant to be shown or edited by the user: a typical
323 use of this function is for serializing in string-form a wxFont object.
324
325 \wxheading{See also}
326
327 \helpref{wxFont::SetNativeFontInfo}{wxfontsetnativefontinfo},\helpref{wxFont::GetNativeFontInfoUserDesc}{wxfontgetnativefontinfouserdesc}
328
329
330 \membersection{wxFont::GetNativeFontInfoUserDesc}\label{wxfontgetnativefontinfouserdesc}
331
332 \func{wxString}{GetNativeFontInfoUserDesc}{\void}
333
334 Returns a user-friendly string for this font object. Returned string is always non-empty.
335 Some examples of the formats of returned strings (which are platform-dependent) are in \helpref{SetNativeFontInfoUserDesc}{wxfontsetnativefontinfouserdesc}.
336
337 \wxheading{See also}
338
339 \helpref{wxFont::GetNativeFontInfoDesc}{wxfontgetnativefontinfodesc}
340
341
342 \membersection{wxFont::GetPointSize}\label{wxfontgetpointsize}
343
344 \constfunc{int}{GetPointSize}{\void}
345
346 Gets the point size.
347
348 \wxheading{See also}
349
350 \helpref{wxFont::SetPointSize}{wxfontsetpointsize}
351
352
353 \membersection{wxFont::GetStyle}\label{wxfontgetstyle}
354
355 \constfunc{int}{GetStyle}{\void}
356
357 Gets the font style. See \helpref{wxFont::wxFont}{wxfontctor} for a list of valid
358 styles.
359
360 \wxheading{See also}
361
362 \helpref{wxFont::SetStyle}{wxfontsetstyle}
363
364
365 \membersection{wxFont::GetUnderlined}\label{wxfontgetunderlined}
366
367 \constfunc{bool}{GetUnderlined}{\void}
368
369 Returns true if the font is underlined, false otherwise.
370
371 \wxheading{See also}
372
373 \helpref{wxFont::SetUnderlined}{wxfontsetunderlined}
374
375
376 \membersection{wxFont::GetWeight}\label{wxfontgetweight}
377
378 \constfunc{wxFontWeight}{GetWeight}{\void}
379
380 Gets the font weight. See \helpref{wxFont::wxFont}{wxfontctor} for a list of valid
381 weight identifiers.
382
383 \wxheading{See also}
384
385 \helpref{wxFont::SetWeight}{wxfontsetweight}
386
387
388 \membersection{wxFont::New}\label{wxfontnew}
389
390 \func{static wxFont *}{New}{\param{int}{ pointSize}, \param{wxFontFamily}{ family}, \param{int}{ style}, \param{wxFontWeight}{ weight},
391 \param{const bool}{ underline = false}, \param{const wxString\& }{faceName = ""},
392 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
393
394 \func{static wxFont *}{New}{\param{int}{ pointSize}, \param{wxFontFamily}{ family},
395 \param{int}{ flags = \texttt{wxFONTFLAG\_DEFAULT}}, \param{const wxString\& }{faceName = ""},
396 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
397
398 \func{static wxFont *}{New}{\param{const wxSize\&}{ pixelSize}, \param{wxFontFamily}{ family}, \param{int}{ style}, \param{wxFontWeight}{ weight},
399 \param{const bool}{ underline = false}, \param{const wxString\& }{faceName = ""},
400 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
401
402 \func{static wxFont *}{New}{\param{const wxSize\&}{ pixelSize}, \param{wxFontFamily}{ family},
403 \param{int}{ flags = \texttt{wxFONTFLAG\_DEFAULT}}, \param{const wxString\& }{faceName = ""},
404 \param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
405
406 These functions take the same parameters as \helpref{wxFont
407 constructor}{wxfontctor} and return a new font object allocated on the heap.
408
409 Using \texttt{New()} is currently the only way to directly create a font with
410 the given size in pixels on platforms other than wxMSW.
411
412
413 \membersection{wxFont::IsOk}\label{wxfontisok}
414
415 \constfunc{bool}{IsOk}{\void}
416
417 Returns {\tt true} if this object is a valid font, {\tt false} otherwise.
418
419
420 \membersection{wxFont::SetDefaultEncoding}\label{wxfontsetdefaultencoding}
421
422 \func{static void}{SetDefaultEncoding}{\param{wxFontEncoding }{encoding}}
423
424 Sets the default font encoding.
425
426 \wxheading{See also}
427
428 \helpref{Font encoding overview}{wxfontencodingoverview},
429 \helpref{GetDefaultEncoding}{wxfontgetdefaultencoding}
430
431
432 \membersection{wxFont::SetFaceName}\label{wxfontsetfacename}
433
434 \func{bool}{SetFaceName}{\param{const wxString\& }{faceName}}
435
436 Sets the facename for the font.
437 Returns \true if the given face name exists; \false otherwise.
438
439 \wxheading{Parameters}
440
441 \docparam{faceName}{A valid facename, which should be on the end-user's system.}
442
443 \wxheading{Remarks}
444
445 To avoid portability problems, don't rely on a specific face, but specify the font family
446 instead or as well. A suitable font will be found on the end-user's system. If both the
447 family and the facename are specified, wxWidgets will first search for the specific face,
448 and then for a font belonging to the same family.
449
450 \wxheading{See also}
451
452 \helpref{wxFont::GetFaceName}{wxfontgetfacename}, \helpref{wxFont::SetFamily}{wxfontsetfamily}
453
454
455 \membersection{wxFont::SetFamily}\label{wxfontsetfamily}
456
457 \func{void}{SetFamily}{\param{wxFontFamily}{ family}}
458
459 Sets the font family.
460
461 \wxheading{Parameters}
462
463 \docparam{family}{One of:
464
465 \twocolwidtha{5cm}
466 \begin{twocollist}\itemsep=0pt
467 \twocolitem{{\bf wxFONTFAMILY\_DEFAULT}}{Chooses a default font.}
468 \twocolitem{{\bf wxFONTFAMILY\_DECORATIVE}}{A decorative font.}
469 \twocolitem{{\bf wxFONTFAMILY\_ROMAN}}{A formal, serif font.}
470 \twocolitem{{\bf wxFONTFAMILY\_SCRIPT}}{A handwriting font.}
471 \twocolitem{{\bf wxFONTFAMILY\_SWISS}}{A sans-serif font.}
472 \twocolitem{{\bf wxFONTFAMILY\_MODERN}}{A fixed pitch font.}
473 \twocolitem{{\bf wxFONTFAMILY\_TELETYPE}}{A teletype font.}
474 \end{twocollist}}
475
476 \wxheading{See also}
477
478 \helpref{wxFont::GetFamily}{wxfontgetfamily}, \helpref{wxFont::SetFaceName}{wxfontsetfacename}
479
480
481 \membersection{wxFont::SetNativeFontInfo}\label{wxfontsetnativefontinfo}
482
483 \func{bool}{SetNativeFontInfo}{\param{const wxString\& }{info}}
484
485 Creates the font corresponding to the given native font description string and returns \true if
486 the creation was successful.
487 which must have been previously returned by
488 \helpref{GetNativeFontInfoDesc}{wxfontgetnativefontinfodesc}. If the string is
489 invalid, font is unchanged. This function is typically used for de-serializing a wxFont
490 object previously saved in a string-form.
491
492 \wxheading{See also}
493
494 \helpref{wxFont::SetNativeFontInfoUserDesc}{wxfontsetnativefontinfouserdesc}
495
496
497 \membersection{wxFont::SetNativeFontInfoUserDesc}\label{wxfontsetnativefontinfouserdesc}
498
499 \func{bool}{SetNativeFontInfoUserDesc}{\param{const wxString\& }{info}}
500
501 Creates the font corresponding to the given native font description string and returns \true if
502 the creation was successful.
503 Unlike \helpref{SetNativeFontInfo}{wxfontsetnativefontinfo}, this function accepts
504 strings which are user-friendly.
505 Examples of accepted string formats are:
506
507 \twocolwidtha{15cm}
508 \begin{twocollist}\itemsep=0pt
509 \twocolitem{Generic syntax}{Example}
510 \twocolitem{on {\bf wxGTK2}: {\tt $[FACE-NAME]$ $[bold]$ $[oblique|italic]$ $[POINTSIZE]$}}{Monospace bold 10}
511 \twocolitem{on {\bf wxMSW}: {\tt $[light|bold]$ $[italic]$ $[FACE-NAME]$ $[POINTSIZE]$ $[ENCODING]$}}{Tahoma 10 WINDOWS-1252}
512 \twocolitem{on {\bf wxMac}: FIXME}{FIXME}
513 \end{twocollist}
514
515 For more detailed information about the allowed syntaxes you can look at the documentation of the native API used for font-rendering (e.g. \urlref{pango\_font\_description\_from\_string}{http://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html\#pango-font-description-from-string}).
516
517 \wxheading{See also}
518
519 \helpref{wxFont::SetNativeFontInfo}{wxfontsetnativefontinfo}
520
521
522
523 \membersection{wxFont::SetPointSize}\label{wxfontsetpointsize}
524
525 \func{void}{SetPointSize}{\param{int}{ pointSize}}
526
527 Sets the point size.
528
529 \wxheading{Parameters}
530
531 \docparam{pointSize}{Size in points.}
532
533 \wxheading{See also}
534
535 \helpref{wxFont::GetPointSize}{wxfontgetpointsize}
536
537
538 \membersection{wxFont::SetStyle}\label{wxfontsetstyle}
539
540 \func{void}{SetStyle}{\param{int}{ style}}
541
542 Sets the font style.
543
544 \wxheading{Parameters}
545
546 \docparam{style}{One of {\bf wxFONTSTYLE\_NORMAL}, {\bf wxFONTSTYLE\_SLANT} and {\bf wxFONTSTYLE\_ITALIC}.}
547
548 \wxheading{See also}
549
550 \helpref{wxFont::GetStyle}{wxfontgetstyle}
551
552
553 \membersection{wxFont::SetUnderlined}\label{wxfontsetunderlined}
554
555 \func{void}{SetUnderlined}{\param{const bool}{ underlined}}
556
557 Sets underlining.
558
559 \wxheading{Parameters}
560
561 \docparam{underlining}{true to underline, false otherwise.}
562
563 \wxheading{See also}
564
565 \helpref{wxFont::GetUnderlined}{wxfontgetunderlined}
566
567
568 \membersection{wxFont::SetWeight}\label{wxfontsetweight}
569
570 \func{void}{SetWeight}{\param{wxFontWeight}{ weight}}
571
572 Sets the font weight.
573
574 \wxheading{Parameters}
575
576 \docparam{weight}{One of:
577
578 \twocolwidtha{5cm}
579 \begin{twocollist}\itemsep=0pt
580 \twocolitem{{\bf wxFONTWEIGHT\_NORMAL}}{Normal font.}
581 \twocolitem{{\bf wxFONTWEIGHT\_LIGHT}}{Light font.}
582 \twocolitem{{\bf wxFONTWEIGHT\_BOLD}}{Bold font.}
583 \end{twocollist}}
584
585 \wxheading{See also}
586
587 \helpref{wxFont::GetWeight}{wxfontgetweight}
588
589
590 \membersection{wxFont::operator $=$}\label{wxfontassignment}
591
592 \func{wxFont\&}{operator $=$}{\param{const wxFont\& }{font}}
593
594 Assignment operator, using \helpref{reference counting}{trefcount}.
595
596
597 \membersection{wxFont::operator $==$}\label{wxfontequals}
598
599 \func{bool}{operator $==$}{\param{const wxFont\& }{font}}
600
601 Equality operator.
602 See \helpref{reference-counted object comparison}{refcountequality} for more info.
603
604
605 \membersection{wxFont::operator $!=$}\label{wxfontnotequals}
606
607 \func{bool}{operator $!=$}{\param{const wxFont\& }{font}}
608
609 Inequality operator.
610 See \helpref{reference-counted object comparison}{refcountequality} for more info.
611