File: qfontinfo.html

package info (click to toggle)
qt-embedded 2.3.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 68,608 kB
  • ctags: 45,998
  • sloc: cpp: 276,654; ansic: 71,987; makefile: 29,074; sh: 12,305; yacc: 2,465; python: 1,863; perl: 481; lex: 480; xml: 68; lisp: 15
file content (145 lines) | stat: -rw-r--r-- 8,828 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QFontInfo Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">

<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>

<h1 align=center>QFontInfo Class Reference</h1><br clear="all">
<p>
The QFontInfo class provides general information about fonts.
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qfontinfo-h.html">qfontinfo.h</a>&gt;</code>
<p><a href="qfontinfo-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><a href="#86a9c9"><b>QFontInfo</b></a>(constQFont&amp;)</div>
<li><div class="fn"><a href="#06ae58"><b>QFontInfo</b></a>(constQFontInfo&amp;)</div>
<li><div class="fn"><a href="#143e45"><b>~QFontInfo</b></a>()</div>
<li><div class="fn">QFontInfo&amp;<a href="#b52b98"><b>operator=</b></a>(constQFontInfo&amp;)</div>
<li><div class="fn">QString<a href="#643714"><b>family</b></a>()const</div>
<li><div class="fn">int<a href="#391046"><b>pointSize</b></a>()const</div>
<li><div class="fn">bool<a href="#1d0fa7"><b>italic</b></a>()const</div>
<li><div class="fn">int<a href="#f6d443"><b>weight</b></a>()const</div>
<li><div class="fn">bool<a href="#85b956"><b>bold</b></a>()const</div>
<li><div class="fn">bool<a href="#38ad03"><b>underline</b></a>()const</div>
<li><div class="fn">bool<a href="#48aaca"><b>strikeOut</b></a>()const</div>
<li><div class="fn">bool<a href="#b0ce63"><b>fixedPitch</b></a>()const</div>
<li><div class="fn">QFont::StyleHint<a href="#8ae0b9"><b>styleHint</b></a>()const</div>
<li><div class="fn">QFont::CharSet<a href="#0638f2"><b>charSet</b></a>()const</div>
<li><div class="fn">bool<a href="#5829d5"><b>rawMode</b></a>()const</div>
<li><div class="fn">bool<a href="#9e539b"><b>exactMatch</b></a>()const</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QFontInfo class provides general information about fonts.
<p>
The QFontInfo class mirrors <a href="qfont.html">QFont</a> exactly, but where QFont access
functions return set values, QFontInfo returns the values that
apply to the font in use.
<p>For example, when the program asks for a 25pt Courier font on a
machine that has a 24pt Courier font but not a scalable one, QFont
will (normally) use the 24pt Courier for rendering.  In this case,
<a href="qfont.html#46f238">QFont::pointSize</a>() returns 25 and <a href="#391046">QFontInfo::pointSize</a>() 24.
<p>The access functions in QFontInfo mirror QFont exactly, except for
this difference.
<p>There are three ways to create a QFontInfo object.
<p>The QFontInfo constructor with a QFont creates a font info object
for a screen-compatible font, i.e. the font can not be a printer
font.
<p><a href="qwidget.html#205244">QWidget::fontInfo</a>() returns the font info for a widget's font.  This
is equivalent to QFontInfo(widget->font()).  Setting a new font for
the widget later does not affect the font info object.
<p><a href="qpainter.html#5bdc93">QPainter::fontInfo</a>() returns the font info for a painter's current
font. The font info object is automatically updated if somebody sets
a new painter font, unlike the two above cases, which take a
"snapshot" of a font.
<p>See also  <a href="qfont.html">QFont</a> and <a href="qfontmetrics.html">QFontMetrics</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="86a9c9"></a>QFontInfo::QFontInfo(const<a href="qfont.html">QFont</a>&amp;font)</h3>
<p>Constructs a font info object for <em>font.</em>
<p>The font must be screen-compatible, i.e. a font you use when drawing
text in <a href="qwidget.html">widgets</a> or <a href="qpixmap.html">pixmaps</a>.
If <em>font</em> is a printer font, you'll probably get wrong results.
<p>Use the <a href="qpainter.html#5bdc93">QPainter::fontInfo</a>() to get the font info when painting.
This is a little slower than using this constructor, but it always
gives correct results.
<h3 class="fn"><a name="06ae58"></a>QFontInfo::QFontInfo(constQFontInfo&amp;fi)</h3>
<p>Constructs a copy of <em>fi.</em>
<h3 class="fn"><a name="143e45"></a>QFontInfo::~QFontInfo()</h3>
<p>Destructs the font info object.
<h3 class="fn">bool<a name="85b956"></a>QFontInfo::bold()const</h3>
<p>Returns TRUE if <a href="#f6d443">weight</a>() would return a greater than
<code>QFont::Normal,</code> and FALSE otherwise.
<p>See also  <a href="#f6d443">weight</a>() and <a href="qfont.html#30083e">QFont::bold</a>().
<h3 class="fn">QFont::CharSet<a name="0638f2"></a>QFontInfo::charSet()const</h3>
<p>Returns the character set of the matched window system font.
<p>See also  <a href="qfont.html#dec730">QFont::charSet</a>().
<h3 class="fn">bool<a name="9e539b"></a>QFontInfo::exactMatch()const</h3>
<p>Returns TRUE if the matched window system font is exactly the one specified
by the font.
<p>See also  <a href="qfont.html#5423b2">QFont::exactMatch</a>().
<h3 class="fn"><a href="qstring.html">QString</a><a name="643714"></a>QFontInfo::family()const</h3>
<p>Returns the family name of the matched window system font.
<p>See also  <a href="qfont.html#cb6c0d">QFont::family</a>().
<h3 class="fn">bool<a name="b0ce63"></a>QFontInfo::fixedPitch()const</h3>
<p>Returns the fixed pitch value of the matched window system font.
A fixed pitch font is a font that has constant character pixel width.
<p>See also  <a href="qfont.html#f13eeb">QFont::fixedPitch</a>().
<h3 class="fn">bool<a name="1d0fa7"></a>QFontInfo::italic()const</h3>
<p>Returns the italic value of the matched window system font.
<p>See also  <a href="qfont.html#b38bfa">QFont::italic</a>().
<h3 class="fn">QFontInfo&amp;<a name="b52b98"></a>QFontInfo::operator=(constQFontInfo&amp;fi)</h3>
<p>Font info assignment.
<h3 class="fn">int<a name="391046"></a>QFontInfo::pointSize()const</h3>
<p>Returns the point size of the matched window system font.
<p>See also  <a href="qfont.html#46f238">QFont::pointSize</a>().
<h3 class="fn">bool<a name="5829d5"></a>QFontInfo::rawMode()const</h3>
<p>Returns TRUE if the font is a raw mode font.
<p>If it is a raw mode font, all other functions in QFontInfo will return the
same values set in the <a href="qfont.html">QFont</a>, regardless of the font actually used.
<p>See also  <a href="qfont.html#95a609">QFont::rawMode</a>().
<h3 class="fn">bool<a name="48aaca"></a>QFontInfo::strikeOut()const</h3>
<p>Returns the strike out value of the matched window system font.
<p>See also  <a href="qfont.html#d8d538">QFont::strikeOut</a>().
<h3 class="fn">QFont::StyleHint<a name="8ae0b9"></a>QFontInfo::styleHint()const</h3>
<p>Returns the style of the matched window system font.
<p>Currently only returns the hint set in <a href="qfont.html">QFont</a>.
<p>See also  <a href="qfont.html#634c0c">QFont::styleHint</a>().
<h3 class="fn">bool<a name="38ad03"></a>QFontInfo::underline()const</h3>
<p>Returns the underline value of the matched window system font.
<p>See also  <a href="qfont.html#34e94b">QFont::underline</a>().
<h3 class="fn">int<a name="f6d443"></a>QFontInfo::weight()const</h3>
<p>Returns the weight of the matched window system font.
<p>See also  <a href="qfont.html#41db89">QFont::weight</a>() and <a href="#85b956">bold</a>().
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright &copy; 1995-2001
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>