Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1294

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/kernel/qfont.cpp:58 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QFont 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: #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&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;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>QFont Class Reference</h1>

<p>The QFont class specifies a font used for drawing text.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qfont-h.html">qfont.h</a>&gt;</tt>
<p><a href="qfont-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn>enum <a href="#StyleHint-enum"><b>StyleHint</b></a> { Helvetica, SansSerif = Helvetica, Times, Serif = Times, Courier, TypeWriter = Courier, OldEnglish, Decorative = OldEnglish, System, AnyStyle }</div></li>
<li><div class=fn>enum <a href="#StyleStrategy-enum"><b>StyleStrategy</b></a> { PreferDefault = 0x0001, PreferBitmap = 0x0002, PreferDevice = 0x0004, PreferOutline = 0x0008, ForceOutline = 0x0010, PreferMatch = 0x0020, PreferQuality = 0x0040, PreferAntialias = 0x0080, NoAntialias = 0x0100 }</div></li>
<li><div class=fn>enum <a href="#Weight-enum"><b>Weight</b></a> { Light = 25, Normal = 50, DemiBold = 63, Bold = 75, Black = 87 }</div></li>
<li><div class=fn><a href="#QFont"><b>QFont</b></a> ()</div></li>
<li><div class=fn><a href="#QFont-2"><b>QFont</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;family, int&nbsp;pointSize = 12, int&nbsp;weight = Normal, bool&nbsp;italic = FALSE )</div></li>
<li><div class=fn><a href="#QFont-3"><b>QFont</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;font )</div></li>
<li><div class=fn><a href="#~QFont"><b>~QFont</b></a> ()</div></li>
<li><div class=fn>QString <a href="#family"><b>family</b></a> () const</div></li>
<li><div class=fn>void <a href="#setFamily"><b>setFamily</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;family )</div></li>
<li><div class=fn>int <a href="#pointSize"><b>pointSize</b></a> () const</div></li>
<li><div class=fn>float <a href="#pointSizeFloat"><b>pointSizeFloat</b></a> () const</div></li>
<li><div class=fn>void <a href="#setPointSize"><b>setPointSize</b></a> ( int&nbsp;pointSize )</div></li>
<li><div class=fn>void <a href="#setPointSizeFloat"><b>setPointSizeFloat</b></a> ( float&nbsp;pointSize )</div></li>
<li><div class=fn>int <a href="#pixelSize"><b>pixelSize</b></a> () const</div></li>
<li><div class=fn>void <a href="#setPixelSize"><b>setPixelSize</b></a> ( int&nbsp;pixelSize )</div></li>
<li><div class=fn>void setPixelSizeFloat ( float&nbsp;pixelSize ) &nbsp;<em>(obsolete)</em></div></li>
<li><div class=fn>int <a href="#weight"><b>weight</b></a> () const</div></li>
<li><div class=fn>void <a href="#setWeight"><b>setWeight</b></a> ( int&nbsp;weight )</div></li>
<li><div class=fn>bool <a href="#bold"><b>bold</b></a> () const</div></li>
<li><div class=fn>void <a href="#setBold"><b>setBold</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>bool <a href="#italic"><b>italic</b></a> () const</div></li>
<li><div class=fn>void <a href="#setItalic"><b>setItalic</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>bool <a href="#underline"><b>underline</b></a> () const</div></li>
<li><div class=fn>void <a href="#setUnderline"><b>setUnderline</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>bool <a href="#strikeOut"><b>strikeOut</b></a> () const</div></li>
<li><div class=fn>void <a href="#setStrikeOut"><b>setStrikeOut</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>bool <a href="#fixedPitch"><b>fixedPitch</b></a> () const</div></li>
<li><div class=fn>void <a href="#setFixedPitch"><b>setFixedPitch</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>StyleHint <a href="#styleHint"><b>styleHint</b></a> () const</div></li>
<li><div class=fn>StyleStrategy <a href="#styleStrategy"><b>styleStrategy</b></a> () const</div></li>
<li><div class=fn>void <a href="#setStyleHint"><b>setStyleHint</b></a> ( StyleHint&nbsp;hint, StyleStrategy&nbsp;strategy = PreferDefault )</div></li>
<li><div class=fn>void <a href="#setStyleStrategy"><b>setStyleStrategy</b></a> ( StyleStrategy&nbsp;s )</div></li>
<li><div class=fn>bool <a href="#rawMode"><b>rawMode</b></a> () const</div></li>
<li><div class=fn>void <a href="#setRawMode"><b>setRawMode</b></a> ( bool&nbsp;enable )</div></li>
<li><div class=fn>bool <a href="#exactMatch"><b>exactMatch</b></a> () const</div></li>
<li><div class=fn>QFont &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;font )</div></li>
<li><div class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;f ) const</div></li>
<li><div class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;f ) const</div></li>
<li><div class=fn>bool <a href="#isCopyOf"><b>isCopyOf</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;f ) const</div></li>
<li><div class=fn>HFONT <a href="#handle"><b>handle</b></a> () const</div></li>
<li><div class=fn>void <a href="#setRawName"><b>setRawName</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name )</div></li>
<li><div class=fn>QString <a href="#rawName"><b>rawName</b></a> () const</div></li>
<li><div class=fn>QString <a href="#key"><b>key</b></a> () const</div></li>
<li><div class=fn>QString <a href="#toString"><b>toString</b></a> () const</div></li>
<li><div class=fn>bool <a href="#fromString"><b>fromString</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;descrip )</div></li>
<li><div class=fn>void <a href="#qwsRenderToDisk"><b>qwsRenderToDisk</b></a> ( bool&nbsp;all = TRUE )</div></li>
<li><div class=fn>enum <a href="#Script-enum"><b>Script</b></a> { Latin, Greek, Cyrillic, Armenian, Georgian, Runic, Ogham, SpacingModifiers, CombiningMarks, Hebrew, Arabic, Syriac, Thaana, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Khmer, Han, Hiragana, Katakana, Hangul, Bopomofo, Yi, Ethiopic, Cherokee, CanadianAboriginal, Mongolian, CurrencySymbols, LetterlikeSymbols, NumberForms, MathematicalOperators, TechnicalSymbols, GeometricSymbols, MiscellaneousSymbols, EnclosedAndSquare, Braille, Unicode, NScripts, UnknownScript = NScripts, NoScript, HanX11, LatinBasic = Latin, LatinExtendedA_2 = HanX11 + 1, LatinExtendedA_3, LatinExtendedA_4, LatinExtendedA_14, LatinExtendedA_15, LastPrivateScript }</div></li>
<li><div class=fn>QString <a href="#defaultFamily"><b>defaultFamily</b></a> () const</div></li>
<li><div class=fn>QString <a href="#lastResortFamily"><b>lastResortFamily</b></a> () const</div></li>
<li><div class=fn>QString <a href="#lastResortFont"><b>lastResortFont</b></a> () const</div></li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li><div class=fn>QString <a href="#substitute"><b>substitute</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;familyName )</div></li>
<li><div class=fn>QStringList <a href="#substitutes"><b>substitutes</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;familyName )</div></li>
<li><div class=fn>QStringList <a href="#substitutions"><b>substitutions</b></a> ()</div></li>
<li><div class=fn>void <a href="#insertSubstitution"><b>insertSubstitution</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;familyName, const&nbsp;QString&nbsp;&amp;&nbsp;substituteName )</div></li>
<li><div class=fn>void <a href="#insertSubstitutions"><b>insertSubstitutions</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;familyName, const&nbsp;QStringList&nbsp;&amp;&nbsp;substituteNames )</div></li>
<li><div class=fn>void <a href="#removeSubstitution"><b>removeSubstitution</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;familyName )</div></li>
<li><div class=fn>void <b>cacheStatistics</b> ()</div></li>
<li><div class=fn>QFont defaultFont () &nbsp;<em>(obsolete)</em></div></li>
<li><div class=fn>void setDefaultFont ( const&nbsp;QFont&nbsp;&amp;&nbsp;f ) &nbsp;<em>(obsolete)</em></div></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class=fn>bool <a href="#dirty"><b>dirty</b></a> () const</div></li>
<li><div class=fn>int <a href="#deciPointSize"><b>deciPointSize</b></a> () const</div></li>
</ul>
<h2>Related Functions</h2>
<ul>
<li><div class=fn>QDataStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( QDataStream&nbsp;&amp;&nbsp;s, const&nbsp;QFont&nbsp;&amp;&nbsp;font )</div></li>
<li><div class=fn>QDataStream &amp; <a href="#operator-gt-gt"><b>operator&gt;&gt;</b></a> ( QDataStream&nbsp;&amp;&nbsp;s, QFont&nbsp;&amp;&nbsp;font )</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
 
<p> The QFont class specifies a font used for drawing text.
<p> 



<p> When you create a QFont object you specify various attributes that
you want the font to have. Qt will use the font with the specified
attributes, or if no matching font exists, Qt will use the closest
matching installed font. The attributes of the font that is actually
used are retrievable from a <a href="qfontinfo.html">QFontInfo</a> object. If the window system
provides an exact match <a href="#exactMatch">exactMatch</a>() returns TRUE. Use <a href="qfontmetrics.html">QFontMetrics</a>
to get measurements, e.g. the pixel length of a string using
<a href="qfontmetrics.html#width">QFontMetrics::width</a>().
<p> Use <a href="qapplication.html#setFont">QApplication::setFont</a>() to set the application's default font.
<p> If a choosen X11 font does not include all the characters that need
to be displayed, QFont will try to find the characters in the
nearest equivalent fonts. When a <a href="qpainter.html">QPainter</a> draws a character from a
font the QFont will report whether or not it has the character; if
it does not, QPainter will draw an unfilled square.
<p> Create QFonts like this:
<pre>
    QFont serifFont( "Times", 10, Bold );
    QFont sansFont( "Helvetica [Cronyx]", 12 );
    </pre>
 
<p> The attributes set in the constructor can also be set later, e.g.
<a href="#setFamily">setFamily</a>(), <a href="#setPointSize">setPointSize</a>(), <a href="#setPointSizeFloat">setPointSizeFloat</a>(), <a href="#setWeight">setWeight</a>() and
<a href="#setItalic">setItalic</a>(). The remaining attributes must be set after
contstruction, e.g. <a href="#setBold">setBold</a>(), <a href="#setUnderline">setUnderline</a>(), <a href="#setStrikeOut">setStrikeOut</a>() and
<a href="#setFixedPitch">setFixedPitch</a>(). <a href="qfontinfo.html">QFontInfo</a> objects should be created <em>after</em> the
font's attributes have been set. A QFontInfo object will not change,
even if you change the font's attributes. The corresponding "get"
functions, e.g. <a href="#family">family</a>(), <a href="#pointSize">pointSize</a>(), etc., return the values that
were set, even though the values used may differ. The actual values
are available from a QFontInfo object.
<p> If the requested font family is unavailable you can influence the
<a href="#fontmatching">font matching algorithm</a> by choosing a
particular <a href="#StyleHint-enum">QFont::StyleHint</a> and <a href="#StyleStrategy-enum">QFont::StyleStrategy</a> with
<a href="#setStyleHint">setStyleHint</a>(). The default family (corresponding to the current
style hint) is returned by <a href="#defaultFamily">defaultFamily</a>().
<p> The font-matching algorithm has a <a href="#lastResortFamily">lastResortFamily</a>() and
<a href="#lastResortFont">lastResortFont</a>() in cases where a suitable match cannot be found.
You can provide substitutions for font family names using
<a href="#insertSubstitution">insertSubstitution</a>() and <a href="#insertSubstitutions">insertSubstitutions</a>(). Substitutions can be
removed with <a href="#removeSubstitution">removeSubstitution</a>(). Use <a href="#substitute">substitute</a>() to retrieve a
family's first substitute, or the family name itself if it has no
substitutes. Use <a href="#substitutes">substitutes</a>() to retrieve a list of a family's
substitutes (which may be empty).
<p> Every QFont has a <a href="#key">key</a>() which you can use, for example, as the key
in a cache or dictionary. If you want to store a user's font
preferences you could use <a href="qsettings.html">QSettings</a>, writing the font information
with <a href="#toString">toString</a>() and reading it back with <a href="#fromString">fromString</a>(). The
<a href="#operator-lt-lt">operator&lt;&lt;</a>() and <a href="#operator-gt-gt">operator&gt;&gt;</a>() functions are also available, but they
work on a data stream.
<p> It is possible to set the height of characters shown on the screen
to a specified number of pixels with <a href="#setPixelSize">setPixelSize</a>(); however using
<a href="#setPointSize">setPointSize</a>() has a similar effect and provides device
independence.
<p> Under the X Window System you can set a font using its system
specific name with <a href="#setRawName">setRawName</a>().
<p> Loading fonts can be expensive, especially on X11. QFont contains
extensive optimizations to make the copying of QFont objects fast,
and to cache the results of the slow window system functions it
depends upon.
<p> <a name="fontmatching"></a>
The font matching algorithm works as follows:
<ol type=1>
<li> The specified font family is searched for.
<li> If not found, the <a href="#styleHint">styleHint</a>() is used to select a replacement
family.
<li>  Each replacement font family is searched for.
<li> If none of these are found or there was no styleHint(), "helvetica"
will be searched for.
<li> If "helvetica" isn't found Qt will try the <a href="#lastResortFamily">lastResortFamily</a>().
<li> If the lastResortFamily() isn't found Qt will try the
<a href="#lastResortFont">lastResortFont</a>() which will always return a name of some kind.
</ol>
<p> Once a font is found, the remaining attributes are matched in order of
priority:
<ol type=1>
<li> <a href="#fixedPitch">fixedPitch</a>()
<li> <a href="#pointSize">pointSize</a>() (see below)
<li> <a href="#weight">weight</a>()
<li> <a href="#italic">italic</a>()
</ol>
<p> If you have a font which matches on family, even if none of the
other attributes match, this font will be chosen in preference to a
font which doesn't match on family but which does match on the other
attributes. This is because font family is the dominant search
criteria.
<p> The point size is defined to match if it is within 20% of the
requested point size. When several fonts match and are only
distinguished by point size, the font with the closest point size to
the one requested will be chosen.
<p> The actual family, font size, weight and other font attributes used
for drawing text will depend on what's available for the chosen
family under the window system. A <a href="qfontinfo.html">QFontInfo</a> object can be used to
determine the actual values used for drawing the text.
<p> Examples:
<p> <pre>
    QFont f("Helvetica");
    </pre>
 
If you had both an Adobe and a Cronyx Helvetica, you might get
either.
<p> <pre>
    QFont f1( "Helvetica [Cronyx]" );  // Qt 3.x
    QFont f2( "Cronyx-Helvetica" );    // Qt 2.x compatibility
    </pre>
 
You can specify the foundry you want in the family name. Both fonts,
f1 and f2, in the above example will be set to  "Helvetica
[Cronyx]".
<p> To determine the attributes of the font actually used in the window
system, use a QFontInfo object, e.g.
<pre>
    <a href="qfontinfo.html">QFontInfo</a> info( f1 );
    <a href="qstring.html">QString</a> family = info.<a href="qfontinfo.html#family">family</a>();
    </pre>
 
<p> To find out font metrics use a <a href="qfontmetrics.html">QFontMetrics</a> object, e.g.
<pre>
    <a href="qfontmetrics.html">QFontMetrics</a> fm( f1 );
    int pixelWidth = fm.<a href="qfontmetrics.html#width">width</a>( "How many pixels wide is this text?" );
    int pixelHeight = fm.<a href="qfontmetrics.html#height">height</a>();
    </pre>
 
<p> For more general information on fonts, see the
<a href="http://www.nwalsh.com/comp.fonts/FAQ/">comp.fonts FAQ.</a>
Information on encodings can be found from
<a href="http://czyborra.com/">Roman Czyborra's</a> page.
<p> <p>See also <a href="qfontmetrics.html">QFontMetrics</a>, <a href="qfontinfo.html">QFontInfo</a>, <a href="qfontdatabase.html">QFontDatabase</a>, <a href="qapplication.html#setFont">QApplication::setFont</a>(), <a href="qwidget.html#font-prop">QWidget::font</a>, <a href="qpainter.html#setFont">QPainter::setFont</a>(), <a href="#StyleHint-enum">QFont::StyleHint</a>, <a href="#Weight-enum">QFont::Weight</a>, <a href="appearance.html">Widget Appearance and Style</a>, <a href="graphics.html">Graphics Classes</a> and <a href="shared.html">Implicitly and Explicitly Shared Classes</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="Script-enum"></a>QFont::Script</h3> 
<p> This enum represents <a href="unicode.html">Unicode</a>
allocated scripts. For exhaustive
coverage see <a href="http://www.amazon.com/exec/obidos/ASIN/0201616335/trolltech/t">The Unicode Standard Version 3.0</a>.
The following scripts are supported:
<p> Modern European alphabetic scripts (left to right):
<ul>
<li><tt>QFont::Latin</tt> - consists of most alphabets based on the original Latin alphabet.
<li><tt>QFont::Greek</tt> - covers ancient and modern Greek and Coptic.
<li><tt>QFont::Cyrillic</tt> - covers the Slavic and non-Slavic languages using
cyrillic alphabets.
<li><tt>QFont::Armenian</tt> - contains the Armenian alphabet used with the Armenian language.
<li><tt>QFont::Georgian</tt> - covers at least the language Georgian.
<li><tt>QFont::Runic</tt> - covers the known constituents of the Runic alphabets used
by the early and medieval societies in the Germanic,
Scandinavian, and Anglo-Saxon areas.
<li><tt>QFont::Ogham</tt> - is an alphabetical script used to write a very early form of Irish.
<li><tt>QFont::SpacingModifiers</tt> - are small signs indicating modifications to the preceeding letter.
<li><tt>QFont::CombiningMarks</tt> - consist of diacritical marks not specific to a particular alphabet,
diacritical marks used in combination with mathematical and technical symbols,
and glyph encodings applied to multiple letterforms.
</ul><p> Middle Eastern scripts (right to left):
<ul>
<li><tt>QFont::Hebrew</tt> - is used for writing Hebrew, Yiddish, and some other languages.
<li><tt>QFont::Arabic</tt> - covers the Arabic language as well as Persian, Urdu, Kurdish and some
others.
<li><tt>QFont::Syriac</tt> - is used to write the active liturgical languages and dialects of several
Middle Eastern and Southeast Indian communities.
<li><tt>QFont::Thaana</tt> - is used to write the Maledivian Dhivehi language.
</ul><p> South and Southeast Asian scripts (left to right with few historical exceptions):
<ul>
<li><tt>QFont::Devanagari</tt> - covers classical Sanskrit and modern Hindi as well as several other
languages.
<li><tt>QFont::Bengali</tt> - is a relative to Devanagari employed to write the Bengali language
used in West Bengal/India and Bangladesh as well as several minority languages.
<li><tt>QFont::Gurmukhi</tt> - is another Devanagari relative used to write Punjabi.
<li><tt>QFont::Gujarati</tt> - is closely related to Devanagari and used to write the Gujarati
language of the Gujarat state in India.
<li><tt>QFont::Oriya</tt> - is used to write the Oriya language of Orissa state/India.
<li><tt>QFont::Tamil</tt> - is used to write the Tamil language of Tamil Nadu state/India,
Sri Lanka, Singapore and parts of Malaysia as well as some minority languages.
<li><tt>QFont::Telugu</tt> - is used to write the Telugu language of Andhra Pradesh state/India
and some minority languages.
<li><tt>QFont::Kannada</tt> - is another South Indian script used to write the Kannada language of
Karnataka state/India and some minority languages.
<li><tt>QFont::Malayalam</tt> - is used to write the Malayalam language of Kerala state/India.
<li><tt>QFont::Sinhala</tt> - is used for Sri Lanka's majority language Sinhala and is also employed
to write Pali, Sanskrit, and Tamil.
<li><tt>QFont::Thai</tt> - is used to write Thai and other Southeast Asian languages.
<li><tt>QFont::Lao</tt> - is a language and script quite similar to Thai.
<li><tt>QFont::Tibetan</tt> - is the script used to write Tibetan in several countries like Tibet,
the bordering Indian regions and Nepal. It is also used in the Buddist
philosophy and liturgy of the Mongolian cultural area.
<li><tt>QFont::Myanmar</tt> - is mainly used to write the Burmese language of Myanmar (former Burma).
<li><tt>QFont::Khmer</tt> - is the official language of Kampuchea.
</ul><p> East Asian scripts (traditionally top-down, right to left, modern often horizontal
left to right):
<ul>
<li><tt>QFont::Han</tt> - consists of the CJK (Chinese, Japanese, Korean) idiographic characters.
<li><tt>QFont::Hiragana</tt> - is a cursive syllabary used to indicate phonetics and pronounciation
of Japanese words.
<li><tt>QFont::Katakana</tt> - is a non-cursive syllabic script used to write Japanese words with
visual emphasis and non-Japanese words in a phonetical manner.
<li><tt>QFont::Hangul</tt> - is a Korean script consisting of alphabetic components.
<li><tt>QFont::Bopomofo</tt> - is a phonetic alphabet for Chinese
(mainly Mandarin).
<li><tt>QFont::Yi</tt> - (also called Cuan or Wei) is a syllabary used to write the Yi language
of Southwestern China, Myanmar, Laos, and Vietnam.
</ul><p> Additional scripts that do not fit well into the script categories above:
<ul>
<li><tt>QFont::Ethiopic</tt> - is a syllabary used by several Central East African languages.
<li><tt>QFont::Cherokee</tt> - is a left-to-right syllabic script used to write the Cherokee language.
<li><tt>QFont::CanadianAboriginal</tt> - consists of the syllabics used by some Canadian aboriginal societies.
<li><tt>QFont::Mongolian</tt> - is the traditional (and recently reintroduced) script used to write Mongolian.
</ul><p> Symbols:
<ul>
<li><tt>QFont::CurrencySymbols</tt> - contains currency symbols not encoded in other scripts.
<li><tt>QFont::LetterlikeSymbols</tt> - consists of symbols derived  from ordinary letters of an
alphabetical script.
<li><tt>QFont::NumberForms</tt> - are provided for compatibility with other existing character sets.
<li><tt>QFont::MathematicalOperators</tt> - consists of encodings for operators,
relations and other symbols like arrows used in a mathematical context.
<li><tt>QFont::TechnicalSymbols</tt> - contains representations for control codes, the space symbol,
APL symbols and other symbols mainly used in the context of electronic data
processing.
<li><tt>QFont::GeometricSymbols</tt> - covers block elements and geometric shapes.
<li><tt>QFont::MiscellaneousSymbols</tt> - consists of a heterogeneous collection of symbols that
do not fit any other Unicode character block, e.g. Dingbats.
<li><tt>QFont::EnclosedAndSquare</tt> - is provided for compatibility with some East Asian standards.
<li><tt>QFont::Braille</tt> - is an international writing system used by blind people. This script encodes
the 256 eight-dot patterns with the 64 six-dot patterns as a subset.
</ul><p> <ul>
<li><tt>QFont::Unicode</tt> - includes all the above scripts.
</ul><p> The values below are provided for completeness and must not be used in user programs.
<ul>
<li><tt>QFont::HanX11</tt> - For internal use only.
<li><tt>QFont::LatinBasic</tt> - For internal use only.
<li><tt>QFont::LatinExtendedA_2</tt> - For internal use only.
<li><tt>QFont::LatinExtendedA_3</tt> - For internal use only.
<li><tt>QFont::LatinExtendedA_4</tt> - For internal use only.
<li><tt>QFont::LatinExtendedA_14</tt> - For internal use only.
<li><tt>QFont::LatinExtendedA_15</tt> - For internal use only.
<li><tt>QFont::LastPrivateScript</tt> - For internal use only.
<li><tt>QFont::NScripts</tt> - For internal use only.
<li><tt>QFont::NoScript</tt> - For internal use only.
<li><tt>QFont::UnknownScript</tt> - For internal use only.
</ul>
<h3 class=fn><a name="StyleHint-enum"></a>QFont::StyleHint</h3> 
<p> Style hints are used by the <a href="#fontmatching">font matching</a>
algorithm to find an appropriate default family if a selected font
family is not available.
<ul>
<li><tt>QFont::AnyStyle</tt> - leaves the font matching algorithm to choose the
family. This is the default.
<li><tt>QFont::SansSerif</tt> - the font matcher prefer sans serif fonts.
<li><tt>QFont::Helvetica</tt> - is a synonym for <a href="#StyleHint-enum">SansSerif</a>.
<li><tt>QFont::Serif</tt> - the font matcher prefers serif fonts.
<li><tt>QFont::Times</tt> - is a synonym for <a href="#StyleHint-enum">Serif</a>.
<li><tt>QFont::TypeWriter</tt> - the font matcher prefers fixed pitch fonts.
<li><tt>QFont::Courier</tt> - a synonym for <a href="#StyleHint-enum">TypeWriter</a>.
<li><tt>QFont::OldEnglish</tt> - the font matcher prefers decorative fonts.
<li><tt>QFont::Decorative</tt> - is a synonym for <a href="#StyleHint-enum">OldEnglish</a>.
<li><tt>QFont::System</tt> - the font matcher prefers system fonts.
</ul>
<h3 class=fn><a name="StyleStrategy-enum"></a>QFont::StyleStrategy</h3> 
<p> The style strategy tells the <a href="#fontmatching">font matching</a>
algorithm what type of fonts should be used to find an appropriate
default family.
<p> The following strategies are available:
<ul>
<li><tt>QFont::PreferDefault</tt> - the default style strategy. It does not prefer
any type of font.
<li><tt>QFont::PreferBitmap</tt> - prefers bitmap fonts (as opposed to outline fonts). On X11, this will cause
Qt to disregard fonts from the Xft font extension.
<li><tt>QFont::PreferDevice</tt> - prefers device fonts.
<li><tt>QFont::PreferOutline</tt> - prefers outline fonts (as opposed to bitmap fonts).
<li><tt>QFont::ForceOutline</tt> - forces the use of outline fonts.
<li><tt>QFont::NoAntialias</tt> - don't antialias the fonts.
<li><tt>QFont::PreferAntialias</tt> - antialias if possible.
</ul><p> Any of these may be OR-ed with one of these flags:
<ul>
<li><tt>QFont::PreferMatch</tt> - prefer an exact match. The font matcher will try to
use the exact font size that has been specified.
<li><tt>QFont::PreferQuality</tt> - prefer the best quality font. The font matcher
will use the nearest standard point size that the font supports.
</ul>
<h3 class=fn><a name="Weight-enum"></a>QFont::Weight</h3> 
<p> Qt uses a weighting scale from 0 to 99 similar to, but not
the same as, the scales used in Windows or CSS. A weight of
0 is ultralight, whilst 99 will be an extremely black.
<p> This enum contains the predefined font weights:
<ul>
<li><tt>QFont::Light</tt> - 25
<li><tt>QFont::Normal</tt> - 50
<li><tt>QFont::DemiBold</tt> - 63
<li><tt>QFont::Bold</tt> - 75
<li><tt>QFont::Black</tt> - 87
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QFont"></a>QFont::QFont ()
</h3> Constructs a font object that uses the application's default font.
<p> <p>See also <a href="qapplication.html#setFont">QApplication::setFont</a>() and <a href="qapplication.html#font">QApplication::font</a>().

<h3 class=fn><a name="QFont-2"></a>QFont::QFont ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;family, int&nbsp;pointSize = 12, int&nbsp;weight = Normal, bool&nbsp;italic = FALSE )
</h3> Constructs a font object with the specified <em>family</em>, <em>pointSize</em>,
<em>weight</em> and <em>italic</em> settings.
<p> If <em>pointSize</em> is <= 0 it is set to 1.
<p> The <em>family</em> name may optionally also include a foundry name, e.g.
"Helvetica [Cronyx]". (The Qt 2.x syntax, i.e. "Cronyx-Helvetica",
is also supported.) If the <em>family</em> is available from more than one
foundry and the foundry isn't specified, an arbitrary foundry is
chosen. If the family isn't available a family will be set using the
<a href="#fontmatching">font matching</a> algorithm.
<p> <p>See also <a href="#Weight-enum">Weight</a>, <a href="#setFamily">setFamily</a>(), <a href="#setPointSize">setPointSize</a>(), <a href="#setWeight">setWeight</a>(), <a href="#setItalic">setItalic</a>(), <a href="#setStyleHint">setStyleHint</a>() and <a href="qapplication.html#font">QApplication::font</a>().

<h3 class=fn><a name="QFont-3"></a>QFont::QFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )
</h3> Constructs a font that is a copy of <em>font</em>.

<h3 class=fn><a name="~QFont"></a>QFont::~QFont ()
</h3> Destroys the font object and frees all allocated resources.

<h3 class=fn>bool <a name="bold"></a>QFont::bold () const
</h3> 
<p> Returns TRUE if <a href="#weight">weight</a>() is a value greater than <a href="#Weight-enum">QFont::Normal</a>; otherwise returns FALSE.
<p> <p>See also <a href="#weight">weight</a>(), <a href="#setBold">setBold</a>() and <a href="qfontinfo.html#bold">QFontInfo::bold</a>().

<h3 class=fn>int <a name="deciPointSize"></a>QFont::deciPointSize () const<tt> [protected]</tt>
</h3> Returns the point size in 1/10ths of a point.
<p> The returned value will be -1 if the font size has been specified in
pixels.
<p> <p>See also <a href="#pointSize">pointSize</a>() and <a href="#pointSizeFloat">pointSizeFloat</a>().

<h3 class=fn><a href="qstring.html">QString</a> <a name="defaultFamily"></a>QFont::defaultFamily () const
</h3> Returns the family name that corresponds to the current style hint.
<p> <p>See also <a href="#StyleHint-enum">StyleHint</a>, <a href="#styleHint">styleHint</a>() and <a href="#setStyleHint">setStyleHint</a>().

<h3 class=fn><a href="qfont.html">QFont</a> <a name="defaultFont"></a>QFont::defaultFont ()<tt> [static]</tt>
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Please use <a href="qapplication.html#font">QApplication::font</a>() instead.

<h3 class=fn>bool <a name="dirty"></a>QFont::dirty () const<tt> [protected]</tt>
</h3>
Returns TRUE if the font attributes have been changed and the font has to
be (re)loaded; otherwise returns FALSE.

<h3 class=fn>bool <a name="exactMatch"></a>QFont::exactMatch () const
</h3>
Returns TRUE if a window system font exactly matching the settings
of this font is available.
<p> <p>See also <a href="qfontinfo.html">QFontInfo</a>.

<h3 class=fn><a href="qstring.html">QString</a> <a name="family"></a>QFont::family () const
</h3> Returns the requested font family name, i.e. the name set in the
constructor or the last setFont() call.
<p> <p>See also <a href="#setFamily">setFamily</a>(), <a href="#substitutes">substitutes</a>() and <a href="#substitute">substitute</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2388">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>bool <a name="fixedPitch"></a>QFont::fixedPitch () const
</h3>
Returns TRUE if fixed pitch has been set; otherwise returns FALSE.
<p> <p>See also <a href="#setFixedPitch">setFixedPitch</a>() and <a href="qfontinfo.html#fixedPitch">QFontInfo::fixedPitch</a>().

<h3 class=fn>bool <a name="fromString"></a>QFont::fromString ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;descrip )
</h3>
Sets this font to match the description <em>descrip</em>.  The description
is a comma-separated list of the font attributes, as returned by
<a href="#toString">toString</a>().
<p> <p>See also <a href="#toString">toString</a>() and <a href="#operator-gt-gt">operator&gt;&gt;</a>().

<h3 class=fn>HFONT <a name="handle"></a>QFont::handle () const
</h3>
Returns the window system handle to the font, for low-level
access.  Using this function is <em>not</em> portable.

<h3 class=fn>void <a name="insertSubstitution"></a>QFont::insertSubstitution ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;familyName, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;substituteName )<tt> [static]</tt>
</h3>
Inserts the family name <em>substituteName</em> into the substitution
table for <em>familyName</em>.
<p> <p>See also <a href="#insertSubstitutions">insertSubstitutions</a>(), <a href="#removeSubstitution">removeSubstitution</a>(), <a href="#substitutions">substitutions</a>(), <a href="#substitute">substitute</a>() and <a href="#substitutes">substitutes</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2389">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>void <a name="insertSubstitutions"></a>QFont::insertSubstitutions ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;familyName, const&nbsp;<a href="qstringlist.html">QStringList</a>&nbsp;&amp;&nbsp;substituteNames )<tt> [static]</tt>
</h3> Inserts the list of families <em>substituteNames</em> into the substitution
list for <em>familyName</em>.
<p> <p>See also <a href="#insertSubstitution">insertSubstitution</a>(), <a href="#removeSubstitution">removeSubstitution</a>(), <a href="#substitutions">substitutions</a>() and <a href="#substitute">substitute</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2390">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>bool <a name="isCopyOf"></a>QFont::isCopyOf ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;f ) const
</h3>
<p> Returns TRUE if this font and <em>f</em> are copies of each other, i.e.
one of them was created as a copy of the other and neither has been
modified since.  This is much stricter than equality.
<p> <p>See also <a href="#operator-eq">operator=</a>() and <a href="#operator-eq-eq">operator==</a>().

<h3 class=fn>bool <a name="italic"></a>QFont::italic () const
</h3>
Returns TRUE if italic has been set; otherwise returns FALSE.
<p> <p>See also <a href="#setItalic">setItalic</a>().

<h3 class=fn><a href="qstring.html">QString</a> <a name="key"></a>QFont::key () const
</h3>
Returns the font's key, a textual representation of a font. It is
typically used as the key for a cache or dictionary of fonts.
<p> <p>See also <a href="qmap.html">QMap</a>.

<h3 class=fn><a href="qstring.html">QString</a> <a name="lastResortFamily"></a>QFont::lastResortFamily () const
</h3>
Returns the "last resort" font family name.
<p> The current implementation tries a wide variety of common fonts,
returning the first one it finds. Is is possible that no family is
found in which case a null string is returned.
<p> <p>See also <a href="#lastResortFont">lastResortFont</a>().

<h3 class=fn><a href="qstring.html">QString</a> <a name="lastResortFont"></a>QFont::lastResortFont () const
</h3>
Returns a "last resort" font name for the font matching algorithm.
This is used if the last resort family is not available. It will
always return a name, if necessary returning something like "fixed"
or "system".
<p> The current implementation tries a wide variety of common fonts,
returning the first one it finds. This implementation may change at
any time, but this function will always return a string containing
something.
<p> It is theoretically possible that there really isn't a
<a href="#lastResortFont">lastResortFont</a>() in which case Qt will abort with an error message. We
have not been able to identify a case where this happens. Please <a
href="bughowto.html">report it as a bug</a> if it does, preferably
with a list of the fonts you have installed.
<p> <p>See also <a href="#lastResortFamily">lastResortFamily</a>() and <a href="#rawName">rawName</a>().

<h3 class=fn>bool <a name="operator!-eq"></a>QFont::operator!= ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;f ) const
</h3>
<p> Returns TRUE if this font is different from <em>f</em>; otherwise returns
FALSE.
<p> Two QFonts are considered to be different if their font attributes are
different.  If <a href="#rawMode">rawMode</a>() is enabled for both fonts, only the family
fields are compared.
<p> <p>See also <a href="#operator-eq-eq">operator==</a>().

<h3 class=fn><a href="qfont.html">QFont</a>&nbsp;&amp; <a name="operator-eq"></a>QFont::operator= ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )
</h3> Assigns <em>font</em> to this font and returns a reference to it.

<h3 class=fn>bool <a name="operator-eq-eq"></a>QFont::operator== ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;f ) const
</h3>
<p> Returns TRUE if this font is equal to <em>f</em>; otherwise returns FALSE.
<p> Two QFonts are considered equal if their font attributes are equal.  If
<a href="#rawMode">rawMode</a>() is enabled for both fonts, only the family fields are
compared.
<p> <p>See also <a href="#operator!-eq">operator!=</a>() and <a href="#isCopyOf">isCopyOf</a>().

<h3 class=fn>int <a name="pixelSize"></a>QFont::pixelSize () const
</h3>
Returns the pixel size of the font if it was set with
<a href="#setPixelSize">setPixelSize</a>(). Returns -1 if the size was set with <a href="#setPointSize">setPointSize</a>()
or <a href="#setPointSizeFloat">setPointSizeFloat</a>().
<p> <p>See also <a href="#setPixelSize">setPixelSize</a>(), <a href="#pointSize">pointSize</a>(), <a href="qfontinfo.html#pointSize">QFontInfo::pointSize</a>() and <a href="qfontinfo.html#pixelSize">QFontInfo::pixelSize</a>().

<h3 class=fn>int <a name="pointSize"></a>QFont::pointSize () const
</h3>
Returns the point size of the font. Returns -1 if the font size was
specified in pixels.
<p> <p>See also <a href="#setPointSize">setPointSize</a>(), <a href="#deciPointSize">deciPointSize</a>() and <a href="#pointSizeFloat">pointSizeFloat</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2391">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>float <a name="pointSizeFloat"></a>QFont::pointSizeFloat () const
</h3>
Returns the point size of the font. Returns -1 if the font size was
specified in pixels.
<p> <p>See also <a href="#pointSize">pointSize</a>(), <a href="#setPointSizeFloat">setPointSizeFloat</a>(), <a href="#pixelSize">pixelSize</a>(), <a href="qfontinfo.html#pointSize">QFontInfo::pointSize</a>() and <a href="qfontinfo.html#pixelSize">QFontInfo::pixelSize</a>().

<h3 class=fn>void <a name="qwsRenderToDisk"></a>QFont::qwsRenderToDisk ( bool&nbsp;all = TRUE )
</h3>
Saves the glyphs in the font that have previously been accessed
as a QPF file. If <em>all</em> is TRUE (the default), then before saving,
all glyphs are marked as used.
<p> If the font is large and you are sure that only a subset of characters
will ever be required on the target device, passing FALSE for the
<em>all</em> parameter can save significant disk space.
<p> Note that this function is only applicable on Qt/Embedded.

<h3 class=fn>bool <a name="rawMode"></a>QFont::rawMode () const
</h3>
Returns TRUE if raw mode is used for font name matching; otherwise
returns FALSE.
<p> <p>See also <a href="#setRawMode">setRawMode</a>() and <a href="#rawName">rawName</a>().

<h3 class=fn><a href="qstring.html">QString</a> <a name="rawName"></a>QFont::rawName () const
</h3>
Returns the name of the font within the underlying window system.
On Windows, this is usually just the family name of a truetype
font. Under X, it is an XLFD (X Logical Font Description). Using the
return value of this function is usually <em>not</em> <em>portable</em>.
<p> <p>See also <a href="#setRawName">setRawName</a>().

<h3 class=fn>void <a name="removeSubstitution"></a>QFont::removeSubstitution ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;familyName )<tt> [static]</tt>
</h3>
Removes all the substitutions for <em>familyName</em>.
<p> <p>See also <a href="#insertSubstitutions">insertSubstitutions</a>(), <a href="#insertSubstitution">insertSubstitution</a>(), <a href="#substitutions">substitutions</a>() and <a href="#substitute">substitute</a>().

<h3 class=fn>void <a name="setBold"></a>QFont::setBold ( bool&nbsp;enable )
</h3> 
<p> If <em>enable</em> is true sets the font's weight to
<a href="#Weight-enum">QFont::Bold</a>; otherwise sets the weight to
<a href="#Weight-enum">QFont::Normal</a>.
<p> For finer boldness control use <a href="#setWeight">setWeight</a>().
<p> <p>See also <a href="#bold">bold</a>() and <a href="#setWeight">setWeight</a>().

<p>Examples: <a href="menu-example.html#x1115">menu/menu.cpp</a> and <a href="themes-example.html#x297">themes/metal.cpp</a>.
<h3 class=fn>void <a name="setDefaultFont"></a>QFont::setDefaultFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;f )<tt> [static]</tt>
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Please use <a href="qapplication.html#setFont">QApplication::setFont</a>() instead.

<h3 class=fn>void <a name="setFamily"></a>QFont::setFamily ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;family )
</h3>
Sets the family name of the font. The name is case insensitive and
may include a foundry name.
<p> The <em>family</em> name may optionally also include a foundry name, e.g.
"Helvetica [Cronyx]". (The Qt 2.x syntax, i.e. "Cronyx-Helvetica",
is also supported.) If the <em>family</em> is available from more than one
foundry and the foundry isn't specified, an arbitrary foundry is
chosen. If the family isn't available a family will be set using the
<a href="#fontmatching">font matching</a> algorithm.
<p> <p>See also <a href="#family">family</a>(), <a href="#setStyleHint">setStyleHint</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<h3 class=fn>void <a name="setFixedPitch"></a>QFont::setFixedPitch ( bool&nbsp;enable )
</h3>
<p> If <em>enable</em> is TRUE, sets fixed pitch on; otherwise sets fixed
pitch off.
<p> <p>See also <a href="#fixedPitch">fixedPitch</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<h3 class=fn>void <a name="setItalic"></a>QFont::setItalic ( bool&nbsp;enable )
</h3>
If <em>enable</em> is TRUE, italic is set on; otherwise italic is set off.
<p> <p>See also <a href="#italic">italic</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<p>Examples: <a href="fileiconview-example.html#x1541">fileiconview/qfileiconview.cpp</a>, <a href="simple-qfont-demo-walkthrough.html#x2392">fonts/simple-qfont-demo/viewer.cpp</a> and <a href="themes-example.html#x298">themes/metal.cpp</a>.
<h3 class=fn>void <a name="setPixelSize"></a>QFont::setPixelSize ( int&nbsp;pixelSize )
</h3> Sets the font size to <em>pixelSize</em> pixels.
<p> Using this function makes the font device dependent. Use
<a href="#setPointSize">setPointSize</a>() or <a href="#setPointSizeFloat">setPointSizeFloat</a>() to set the size of the font in
a device independent manner.
<p> <p>See also <a href="#pixelSize">pixelSize</a>().

<p>Example: <a href="qwerty-example.html#x629">qwerty/qwerty.cpp</a>.
<h3 class=fn>void <a name="setPixelSizeFloat"></a>QFont::setPixelSizeFloat ( float&nbsp;pixelSize )
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Sets the logical pixel height of font characters when shown on
the screen to <em>pixelSize</em>.

<h3 class=fn>void <a name="setPointSize"></a>QFont::setPointSize ( int&nbsp;pointSize )
</h3> Sets the point size to <em>pointSize</em>. The point size must be greater
than zero.
<p> <p>See also <a href="#pointSize">pointSize</a>() and <a href="#setPointSizeFloat">setPointSizeFloat</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2393">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>void <a name="setPointSizeFloat"></a>QFont::setPointSizeFloat ( float&nbsp;pointSize )
</h3> Sets the point size to <em>pointSize</em>. The point size must be greater
than zero. The requested precision may not be achieved on all platforms.
<p> <p>See also <a href="#pointSizeFloat">pointSizeFloat</a>(), <a href="#setPointSize">setPointSize</a>() and <a href="#setPixelSize">setPixelSize</a>().

<h3 class=fn>void <a name="setRawMode"></a>QFont::setRawMode ( bool&nbsp;enable )
</h3>
If <em>enable</em> is TRUE, turns raw mode on; otherwise turns raw mode
off. This function only has an affect under X11.
<p> If raw mode is enabled, Qt will search for an X font with a complete
font name matching the family name, ignoring all other values set for
the QFont.  If the font name matches several fonts, Qt will use the
first font returned by X.  <a href="qfontinfo.html">QFontInfo</a> <em>cannot</em> be used to fetch
information about a QFont using raw mode (it will return the values
set in the QFont for all parameters, including the family name).
<p> <b>Warning:</b> Do not use raw mode unless you really, really need it! In
most (if not all) cases, <a href="#setRawName">setRawName</a>() is a much better choice.
<p> <p>See also <a href="#rawMode">rawMode</a>() and <a href="#setRawName">setRawName</a>().

<h3 class=fn>void <a name="setRawName"></a>QFont::setRawName ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name )
</h3>
Sets a font by its system specific name. The function is in
particular useful under X, where system font settings (for example
X resources) are usually available in XLFD (X Logical Font
Description) form only. You can pass an XLFD as <em>name</em> to this
function.
<p> In Qt 2.0 and later, a font set with <a href="#setRawName">setRawName</a>() is still a
full-featured QFont. It can be queried (for example with <a href="#italic">italic</a>())
or modified (for example with <a href="#setItalic">setItalic</a>() ) and is therefore also
suitable for rendering rich text.
<p> If Qt's internal font database cannot resolve the raw name, the font
becomes a raw font with <em>name</em> as its family.
<p> Note that the present implementation does not handle
wildcards in XLFDs well, and that font aliases (file <tt>fonts.alias</tt>
in the font directory on X11) are not supported.
<p> <p>See also <a href="#rawName">rawName</a>(), <a href="#setRawMode">setRawMode</a>() and <a href="#setFamily">setFamily</a>().

<h3 class=fn>void <a name="setStrikeOut"></a>QFont::setStrikeOut ( bool&nbsp;enable )
</h3>
If <em>enable</em> is TRUE, sets strikeout on; otherwise sets strikeout
off.
<p> <p>See also <a href="#strikeOut">strikeOut</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<h3 class=fn>void <a name="setStyleHint"></a>QFont::setStyleHint ( <a href="qfont.html#StyleHint-enum">StyleHint</a>&nbsp;hint, <a href="qfont.html#StyleStrategy-enum">StyleStrategy</a>&nbsp;strategy = PreferDefault )
</h3> Sets the style hint and strategy to <em>hint</em> and <em>strategy</em>,
respectively.
<p> If these aren't set explicitly the style hint will default to
<a href="#StyleHint-enum">AnyStyle</a> and the style strategy to <a href="#StyleStrategy-enum">PreferDefault</a>.
<p> <p>See also <a href="#StyleHint-enum">StyleHint</a>, <a href="#styleHint">styleHint</a>(), <a href="#StyleStrategy-enum">StyleStrategy</a>, <a href="#styleStrategy">styleStrategy</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<p>Examples: <a href="desktop-example.html#x1723">desktop/desktop.cpp</a> and <a href="simple-qfont-demo-walkthrough.html#x2394">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>void <a name="setStyleStrategy"></a>QFont::setStyleStrategy ( <a href="qfont.html#StyleStrategy-enum">StyleStrategy</a>&nbsp;s )
</h3>
Sets the style strategy for the font to <em>s</em>.
<p> <p>See also <a href="#StyleStrategy-enum">QFont::StyleStrategy</a>.

<h3 class=fn>void <a name="setUnderline"></a>QFont::setUnderline ( bool&nbsp;enable )
</h3>
If <em>enable</em> is TRUE, sets underline on; otherwise sets underline
off.
<p> <p>See also <a href="#underline">underline</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<p>Examples: <a href="simple-qfont-demo-walkthrough.html#x2395">fonts/simple-qfont-demo/viewer.cpp</a> and <a href="menu-example.html#x1116">menu/menu.cpp</a>.
<h3 class=fn>void <a name="setWeight"></a>QFont::setWeight ( int&nbsp;weight )
</h3> Sets the weight the font to <em>weight</em>, which should be a value
from the <a href="#Weight-enum">QFont::Weight</a> enumeration.
<p> <p>See also <a href="#weight">weight</a>() and <a href="qfontinfo.html">QFontInfo</a>.

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2396">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn>bool <a name="strikeOut"></a>QFont::strikeOut () const
</h3>
Returns TRUE if strikeout has been set; otherwise returns FALSE.
<p> <p>See also <a href="#setStrikeOut">setStrikeOut</a>() and QFontInfo::strikeOut().

<h3 class=fn><a href="qfont.html#StyleHint-enum">StyleHint</a> <a name="styleHint"></a>QFont::styleHint () const
</h3> Returns the StyleHint.
<p> The style hint affects the <a href="#fontmatching">font
    matching</a> algorithm. See <a href="#StyleHint-enum">QFont::StyleHint</a> for the list
of strategies.
<p> <p>See also <a href="#setStyleHint">setStyleHint</a>(), <a href="#StyleStrategy-enum">QFont::StyleStrategy</a> and <a href="qfontinfo.html#styleHint">QFontInfo::styleHint</a>().

<h3 class=fn><a href="qfont.html#StyleStrategy-enum">StyleStrategy</a> <a name="styleStrategy"></a>QFont::styleStrategy () const
</h3> Returns the StyleStrategy.
<p> The style strategy affects the <a href="#fontmatching">font
    matching</a> algorithm. See <a href="#StyleStrategy-enum">QFont::StyleStrategy</a> for the list
of strategies.
<p> <p>See also <a href="#setStyleHint">setStyleHint</a>() and <a href="#StyleHint-enum">QFont::StyleHint</a>.

<h3 class=fn><a href="qstring.html">QString</a> <a name="substitute"></a>QFont::substitute ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;familyName )<tt> [static]</tt>
</h3> Returns the first family name to be used whenever <em>familyName</em> is
specified. The lookup is case insensitive.
<p> If there is no substitution for <em>familyName</em>, <em>familyName</em> is
returned.
<p> To obtain a list of substitutions use <a href="#substitutes">substitutes</a>().
<p> <p>See also <a href="#setFamily">setFamily</a>(), <a href="#insertSubstitutions">insertSubstitutions</a>(), <a href="#insertSubstitution">insertSubstitution</a>() and <a href="#removeSubstitution">removeSubstitution</a>().

<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="substitutes"></a>QFont::substitutes ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;familyName )<tt> [static]</tt>
</h3> Returns a list of family names to be used whenever <em>familyName</em> is
specified.  The lookup is case insensitive.
<p> If there is no substitution for <em>familyName</em>, an empty
list is returned.
<p> <p>See also <a href="#substitute">substitute</a>(), <a href="#insertSubstitutions">insertSubstitutions</a>(), <a href="#insertSubstitution">insertSubstitution</a>() and <a href="#removeSubstitution">removeSubstitution</a>().

<p>Example: <a href="simple-qfont-demo-walkthrough.html#x2397">fonts/simple-qfont-demo/viewer.cpp</a>.
<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="substitutions"></a>QFont::substitutions ()<tt> [static]</tt>
</h3> Returns a sorted list of substituted family names.
<p> <p>See also <a href="#insertSubstitution">insertSubstitution</a>(), <a href="#removeSubstitution">removeSubstitution</a>() and <a href="#substitute">substitute</a>().

<h3 class=fn><a href="qstring.html">QString</a> <a name="toString"></a>QFont::toString () const
</h3> Returns a description of the font.  The description is a comma-separated
list of the attributes, perfectly suited for use in <a href="qsettings.html">QSettings</a>.
<p> <p>See also <a href="#fromString">fromString</a>() and <a href="#operator-lt-lt">operator&lt;&lt;</a>().

<h3 class=fn>bool <a name="underline"></a>QFont::underline () const
</h3>
Returns TRUE if underline has been set; otherwise returns FALSE.
<p> <p>See also <a href="#setUnderline">setUnderline</a>() and QFontInfo::underline().

<h3 class=fn>int <a name="weight"></a>QFont::weight () const
</h3>
Returns the weight of the font which is one of the enumerated values
from <a href="#Weight-enum">QFont::Weight</a>.
<p> <p>See also <a href="#setWeight">setWeight</a>(), <a href="#Weight-enum">Weight</a> and <a href="qfontinfo.html">QFontInfo</a>.

<hr><h2>Related Functions</h2>
<h3 class=fn><a href="qdatastream.html">QDataStream</a>&nbsp;&amp; <a name="operator-lt-lt"></a>operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a>&nbsp;&amp;&nbsp;s, const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )
</h3> 
<p> Writes the font <em>font</em> to the data stream <em>s</em>. (<a href="#toString">toString</a>() writes to
a text stream.)
<p> <p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.

<h3 class=fn><a href="qdatastream.html">QDataStream</a>&nbsp;&amp; <a name="operator-gt-gt"></a>operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a>&nbsp;&amp;&nbsp;s, <a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )
</h3> 
Reads the font <em>font</em> from the data stream <em>s</em>. (<a href="#fromString">fromString</a>() reads from
a text stream.)
<p> <p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.

<!-- eof -->
<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 &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>