You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
10 KiB
192 lines
10 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qfont.cpp:2590 -->
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQFontInfo Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQFontInfo Class Reference</h1>
|
||
|
|
||
|
<p>The TQFontInfo class provides general information about fonts.
|
||
|
<a href="#details">More...</a>
|
||
13 years ago
|
<p><tt>#include <<a href="qfontinfo-h.html">ntqfontinfo.h</a>></tt>
|
||
13 years ago
|
<p><a href="qfontinfo-members.html">List of all member functions.</a>
|
||
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQFontInfo"><b>TQFontInfo</b></a> ( const TQFont & font )</li>
|
||
|
<li class=fn><a href="#TQFontInfo-2"><b>TQFontInfo</b></a> ( const TQFont & font, TQFont::Script script )</li>
|
||
|
<li class=fn><a href="#TQFontInfo-3"><b>TQFontInfo</b></a> ( const TQFontInfo & fi )</li>
|
||
|
<li class=fn><a href="#~TQFontInfo"><b>~TQFontInfo</b></a> ()</li>
|
||
|
<li class=fn>TQFontInfo & <a href="#operator-eq"><b>operator=</b></a> ( const TQFontInfo & fi )</li>
|
||
|
<li class=fn>TQString <a href="#family"><b>family</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#pixelSize"><b>pixelSize</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#pointSize"><b>pointSize</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#italic"><b>italic</b></a> () const</li>
|
||
|
<li class=fn>int <a href="#weight"><b>weight</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#bold"><b>bold</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#fixedPitch"><b>fixedPitch</b></a> () const</li>
|
||
|
<li class=fn>TQFont::StyleHint <a href="#styleHint"><b>styleHint</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#rawMode"><b>rawMode</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#exactMatch"><b>exactMatch</b></a> () const</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
<p> The TQFontInfo class provides general information about fonts.
|
||
|
<p>
|
||
|
|
||
13 years ago
|
<p> The TQFontInfo class provides the same access functions as <a href="ntqfont.html">TQFont</a>,
|
||
13 years ago
|
e.g. <a href="#family">family</a>(), <a href="#pointSize">pointSize</a>(), <a href="#italic">italic</a>(), <a href="#weight">weight</a>(), <a href="#fixedPitch">fixedPitch</a>(),
|
||
|
<a href="#styleHint">styleHint</a>() etc. But whilst the TQFont access functions return the
|
||
|
values that were set, a TQFontInfo object returns the values that
|
||
|
apply to the font that will actually be used to draw the text.
|
||
|
<p> For example, when the program asks for a 25pt Courier font on a
|
||
|
machine that has a non-scalable 24pt Courier font, TQFont will
|
||
|
(normally) use the 24pt Courier for rendering. In this case,
|
||
13 years ago
|
<a href="ntqfont.html#pointSize">TQFont::pointSize</a>() returns 25 and <a href="#pointSize">TQFontInfo::pointSize</a>() returns
|
||
13 years ago
|
24.
|
||
|
<p> There are three ways to create a TQFontInfo object.
|
||
|
<ol type=1>
|
||
|
<li> Calling the TQFontInfo constructor with a TQFont creates a font
|
||
|
info object for a screen-compatible font, i.e. the font cannot be
|
||
|
a printer font<sup>*</sup>. If the font is changed later, the font
|
||
|
info object is <em>not</em> updated.
|
||
13 years ago
|
<p> <li> <a href="ntqwidget.html#fontInfo">TQWidget::fontInfo</a>() returns the font info for a widget's font.
|
||
13 years ago
|
This is equivalent to calling TQFontInfo(widget->font()). If the
|
||
|
widget's font is changed later, the font info object is <em>not</em>
|
||
|
updated.
|
||
13 years ago
|
<p> <li> <a href="ntqpainter.html#fontInfo">TQPainter::fontInfo</a>() returns the font info for a painter's
|
||
13 years ago
|
current font. If the painter's font is changed later, the font
|
||
|
info object is <em>not</em> updated.
|
||
|
</ol>
|
||
|
<p> <sup>*</sup> If you use a printer font the values returned may be
|
||
|
inaccurate. Printer fonts are not always accessible so the nearest
|
||
|
screen font is used if a printer font is supplied.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html">TQFont</a>, <a href="ntqfontmetrics.html">TQFontMetrics</a>, <a href="ntqfontdatabase.html">TQFontDatabase</a>, <a href="graphics.html">Graphics Classes</a>, and <a href="shared.html">Implicitly and Explicitly Shared Classes</a>.
|
||
13 years ago
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
13 years ago
|
<h3 class=fn><a name="TQFontInfo"></a>TQFontInfo::TQFontInfo ( const <a href="ntqfont.html">TQFont</a> & font )
|
||
13 years ago
|
</h3>
|
||
|
Constructs a font info object for <em>font</em>.
|
||
|
<p> The font must be screen-compatible, i.e. a font you use when
|
||
13 years ago
|
drawing text in <a href="ntqwidget.html">widgets</a> or <a href="ntqpixmap.html">pixmaps</a>, not <a href="ntqpicture.html">TQPicture</a> or <a href="ntqprinter.html">TQPrinter</a>.
|
||
13 years ago
|
<p> The font info object holds the information for the font that is
|
||
|
passed in the constructor at the time it is created, and is not
|
||
|
updated if the font's attributes are changed later.
|
||
13 years ago
|
<p> Use <a href="ntqpainter.html#fontInfo">TQPainter::fontInfo</a>() to get the font info when painting.
|
||
13 years ago
|
This will give correct results also when painting on paint device
|
||
|
that is not screen-compatible.
|
||
|
|
||
13 years ago
|
<h3 class=fn><a name="TQFontInfo-2"></a>TQFontInfo::TQFontInfo ( const <a href="ntqfont.html">TQFont</a> & font, <a href="ntqfont.html#Script-enum">TQFont::Script</a> script )
|
||
13 years ago
|
</h3>
|
||
|
Constructs a font info object for <em>font</em> using the specified <em>script</em>.
|
||
|
|
||
13 years ago
|
<h3 class=fn><a name="TQFontInfo-3"></a>TQFontInfo::TQFontInfo ( const <a href="ntqfontinfo.html">TQFontInfo</a> & fi )
|
||
13 years ago
|
</h3>
|
||
|
Constructs a copy of <em>fi</em>.
|
||
|
|
||
|
<h3 class=fn><a name="~TQFontInfo"></a>TQFontInfo::~TQFontInfo ()
|
||
|
</h3>
|
||
|
Destroys the font info object.
|
||
|
|
||
|
<h3 class=fn>bool <a name="bold"></a>TQFontInfo::bold () const
|
||
|
</h3>
|
||
|
|
||
13 years ago
|
<p> Returns TRUE if <a href="#weight">weight</a>() would return a value greater than <a href="ntqfont.html#Weight-enum">TQFont::Normal</a>; otherwise returns FALSE.
|
||
|
<p> <p>See also <a href="#weight">weight</a>() and <a href="ntqfont.html#bold">TQFont::bold</a>().
|
||
13 years ago
|
|
||
|
<p>Example: <a href="qfd-example.html#x1982">qfd/fontdisplayer.cpp</a>.
|
||
|
<h3 class=fn>bool <a name="exactMatch"></a>TQFontInfo::exactMatch () const
|
||
|
</h3>
|
||
|
Returns TRUE if the matched window system font is exactly the same
|
||
|
as the one specified by the font; otherwise returns FALSE.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#exactMatch">TQFont::exactMatch</a>().
|
||
13 years ago
|
|
||
13 years ago
|
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="family"></a>TQFontInfo::family () const
|
||
13 years ago
|
</h3>
|
||
|
Returns the family name of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#family">TQFont::family</a>().
|
||
13 years ago
|
|
||
|
<p>Examples: <a href="simple-font-demo-example.html#x2848">fonts/simple-qfont-demo/viewer.cpp</a> and <a href="qfd-example.html#x1983">qfd/fontdisplayer.cpp</a>.
|
||
|
<h3 class=fn>bool <a name="fixedPitch"></a>TQFontInfo::fixedPitch () const
|
||
|
</h3>
|
||
|
Returns the fixed pitch value of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#fixedPitch">TQFont::fixedPitch</a>().
|
||
13 years ago
|
|
||
|
<h3 class=fn>bool <a name="italic"></a>TQFontInfo::italic () const
|
||
|
</h3>
|
||
|
Returns the italic value of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#italic">TQFont::italic</a>().
|
||
13 years ago
|
|
||
|
<p>Example: <a href="qfd-example.html#x1984">qfd/fontdisplayer.cpp</a>.
|
||
13 years ago
|
<h3 class=fn><a href="ntqfontinfo.html">TQFontInfo</a> & <a name="operator-eq"></a>TQFontInfo::operator= ( const <a href="ntqfontinfo.html">TQFontInfo</a> & fi )
|
||
13 years ago
|
</h3>
|
||
|
Assigns the font info in <em>fi</em>.
|
||
|
|
||
|
<h3 class=fn>int <a name="pixelSize"></a>TQFontInfo::pixelSize () const
|
||
|
</h3>
|
||
|
Returns the pixel size of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#pointSize">TQFont::pointSize</a>().
|
||
13 years ago
|
|
||
|
<h3 class=fn>int <a name="pointSize"></a>TQFontInfo::pointSize () const
|
||
|
</h3>
|
||
|
Returns the point size of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#pointSize">TQFont::pointSize</a>().
|
||
13 years ago
|
|
||
|
<p>Examples: <a href="simple-font-demo-example.html#x2849">fonts/simple-qfont-demo/viewer.cpp</a> and <a href="qfd-example.html#x1985">qfd/fontdisplayer.cpp</a>.
|
||
|
<h3 class=fn>bool <a name="rawMode"></a>TQFontInfo::rawMode () const
|
||
|
</h3>
|
||
|
Returns TRUE if the font is a raw mode font; otherwise returns
|
||
|
FALSE.
|
||
|
<p> If it is a raw mode font, all other functions in TQFontInfo will
|
||
13 years ago
|
return the same values set in the <a href="ntqfont.html">TQFont</a>, regardless of the font
|
||
13 years ago
|
actually used.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#rawMode">TQFont::rawMode</a>().
|
||
13 years ago
|
|
||
13 years ago
|
<h3 class=fn><a href="ntqfont.html#StyleHint-enum">TQFont::StyleHint</a> <a name="styleHint"></a>TQFontInfo::styleHint () const
|
||
13 years ago
|
</h3>
|
||
|
Returns the style of the matched window system font.
|
||
13 years ago
|
<p> Currently only returns the style hint set in <a href="ntqfont.html">TQFont</a>.
|
||
|
<p> <p>See also <a href="ntqfont.html#styleHint">TQFont::styleHint</a>() and <a href="ntqfont.html#StyleHint-enum">TQFont::StyleHint</a>.
|
||
13 years ago
|
|
||
|
<h3 class=fn>int <a name="weight"></a>TQFontInfo::weight () const
|
||
|
</h3>
|
||
|
Returns the weight of the matched window system font.
|
||
13 years ago
|
<p> <p>See also <a href="ntqfont.html#weight">TQFont::weight</a>() and <a href="#bold">bold</a>().
|
||
13 years ago
|
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<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 © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|