Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5294

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qfont.cpp -->
  <title>Qt 4.8: QFont Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QFont</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QFont Class Reference</h1>
<!-- $$$QFont-brief -->
<p>The QFont class specifies a font used for drawing text. <a href="#details">More...</a></p>
<!-- @@@QFont -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QFont&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qfont-members.html">List of all members, including inherited members</a></li>
<li><a href="qfont-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#Capitalization-enum">Capitalization</a></b> { MixedCase, AllUppercase, AllLowercase, SmallCaps, Capitalize }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#HintingPreference-enum">HintingPreference</a></b> { PreferDefaultHinting, PreferNoHinting, PreferVerticalHinting, PreferFullHinting }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#SpacingType-enum">SpacingType</a></b> { PercentageSpacing, AbsoluteSpacing }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#Stretch-enum">Stretch</a></b> { UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, ..., UltraExpanded }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#Style-enum">Style</a></b> { StyleNormal, StyleItalic, StyleOblique }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#StyleHint-enum">StyleHint</a></b> { AnyStyle, SansSerif, Helvetica, Serif, ..., System }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#StyleStrategy-enum">StyleStrategy</a></b> { PreferDefault, PreferBitmap, PreferDevice, PreferOutline, ..., ForceIntegerMetrics }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#Weight-enum">Weight</a></b> { Light, Normal, DemiBold, Bold, Black }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#QFont">QFont</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#QFont-2">QFont</a></b> ( const QString &amp; <i>family</i>, int <i>pointSize</i> = -1, int <i>weight</i> = -1, bool <i>italic</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#QFont-3">QFont</a></b> ( const QFont &amp; <i>font</i>, QPaintDevice * <i>pd</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#QFont-4">QFont</a></b> ( const QFont &amp; <i>font</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#dtor.QFont">~QFont</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#bold">bold</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Capitalization </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#capitalization">capitalization</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#defaultFamily">defaultFamily</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#exactMatch">exactMatch</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#family">family</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#fixedPitch">fixedPitch</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> FT_Face </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#freetypeFace">freetypeFace</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#fromString">fromString</a></b> ( const QString &amp; <i>descrip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> HFONT </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#handle">handle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> HintingPreference </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#hintingPreference">hintingPreference</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#isCopyOf">isCopyOf</a></b> ( const QFont &amp; <i>f</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#italic">italic</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#kerning">kerning</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#key">key</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#lastResortFamily">lastResortFamily</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#lastResortFont">lastResortFont</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#letterSpacing">letterSpacing</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SpacingType </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#letterSpacingType">letterSpacingType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint32 </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#macFontID">macFontID</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#overline">overline</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#pixelSize">pixelSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#pointSize">pointSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#pointSizeF">pointSizeF</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#rawMode">rawMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#rawName">rawName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#resolve">resolve</a></b> ( const QFont &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setBold">setBold</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setCapitalization">setCapitalization</a></b> ( Capitalization <i>caps</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setFamily">setFamily</a></b> ( const QString &amp; <i>family</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setFixedPitch">setFixedPitch</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setHintingPreference">setHintingPreference</a></b> ( HintingPreference <i>hintingPreference</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setItalic">setItalic</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setKerning">setKerning</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setLetterSpacing">setLetterSpacing</a></b> ( SpacingType <i>type</i>, qreal <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setOverline">setOverline</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setPixelSize">setPixelSize</a></b> ( int <i>pixelSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setPointSize">setPointSize</a></b> ( int <i>pointSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setPointSizeF">setPointSizeF</a></b> ( qreal <i>pointSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setRawMode">setRawMode</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setRawName">setRawName</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStretch">setStretch</a></b> ( int <i>factor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStrikeOut">setStrikeOut</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStyle">setStyle</a></b> ( Style <i>style</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStyleHint">setStyleHint</a></b> ( StyleHint <i>hint</i>, StyleStrategy <i>strategy</i> = PreferDefault )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStyleName">setStyleName</a></b> ( const QString &amp; <i>styleName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setStyleStrategy">setStyleStrategy</a></b> ( StyleStrategy <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setUnderline">setUnderline</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setWeight">setWeight</a></b> ( int <i>weight</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#setWordSpacing">setWordSpacing</a></b> ( qreal <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#stretch">stretch</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#strikeOut">strikeOut</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Style </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#style">style</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> StyleHint </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#styleHint">styleHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#styleName">styleName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> StyleStrategy </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#styleStrategy">styleStrategy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#toString">toString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#underline">underline</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#weight">weight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#wordSpacing">wordSpacing</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-QVariant">operator QVariant</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-not-eq">operator!=</a></b> ( const QFont &amp; <i>f</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-lt">operator&lt;</a></b> ( const QFont &amp; <i>f</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont &amp; </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-eq">operator=</a></b> ( const QFont &amp; <i>font</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-eq-eq">operator==</a></b> ( const QFont &amp; <i>f</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#insertSubstitution">insertSubstitution</a></b> ( const QString &amp; <i>familyName</i>, const QString &amp; <i>substituteName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#insertSubstitutions">insertSubstitutions</a></b> ( const QString &amp; <i>familyName</i>, const QStringList &amp; <i>substituteNames</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#removeSubstitution">removeSubstitution</a></b> ( const QString &amp; <i>familyName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#substitute">substitute</a></b> ( const QString &amp; <i>familyName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#substitutes">substitutes</a></b> ( const QString &amp; <i>familyName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#substitutions">substitutions</a></b> ()</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-lt-lt-62">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>s</i>, const QFont &amp; <i>font</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qfont.html#operator-gt-gt-41">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>s</i>, QFont &amp; <i>font</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QFont-description -->
<div class="descr">
<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="qfont.html#exactMatch">exactMatch</a>() returns true. Use <a href="qfontmetrics.html">QFontMetrics</a> to get measurements, e.g&#x2e; the pixel length of a string using <a href="qfontmetrics.html#width">QFontMetrics::width</a>().</p>
<p>Note that a <a href="qapplication.html">QApplication</a> instance must exist before a QFont can be used. You can set the application's default font with <a href="qapplication.html#setFont">QApplication::setFont</a>().</p>
<p>If a chosen 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, <a href="qpainter.html">QPainter</a> will draw an unfilled square.</p>
<p>Create QFonts like this:</p>
<pre class="cpp"> <span class="type">QFont</span> serifFont(<span class="string">&quot;Times&quot;</span><span class="operator">,</span> <span class="number">10</span><span class="operator">,</span> <span class="type">QFont</span><span class="operator">::</span>Bold);
 <span class="type">QFont</span> sansFont(<span class="string">&quot;Helvetica [Cronyx]&quot;</span><span class="operator">,</span> <span class="number">12</span>);</pre>
<p>The attributes set in the constructor can also be set later, e.g&#x2e; <a href="qfont.html#setFamily">setFamily</a>(), <a href="qfont.html#setPointSize">setPointSize</a>(), <a href="qfont-qt3.html#setPointSizeFloat" class="compat">setPointSizeFloat</a>(), <a href="qfont.html#setWeight">setWeight</a>() and <a href="qfont.html#setItalic">setItalic</a>(). The remaining attributes must be set after contstruction, e.g&#x2e; <a href="qfont.html#setBold">setBold</a>(), <a href="qfont.html#setUnderline">setUnderline</a>(), <a href="qfont.html#setOverline">setOverline</a>(), <a href="qfont.html#setStrikeOut">setStrikeOut</a>() and <a href="qfont.html#setFixedPitch">setFixedPitch</a>(). <a href="qfontinfo.html">QFontInfo</a> objects should be created <i>after</i> the font's attributes have been set. A <a href="qfontinfo.html">QFontInfo</a> object will not change, even if you change the font's attributes. The corresponding &quot;get&quot; functions, e.g&#x2e; <a href="qfont.html#family">family</a>(), <a href="qfont.html#pointSize">pointSize</a>(), etc., return the values that were set, even though the values used may differ. The actual values are available from a <a href="qfontinfo.html">QFontInfo</a> object.</p>
<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="qfont.html#StyleHint-enum">QFont::StyleHint</a> and <a href="qfont.html#StyleStrategy-enum">QFont::StyleStrategy</a> with <a href="qfont.html#setStyleHint">setStyleHint</a>(). The default family (corresponding to the current style hint) is returned by <a href="qfont.html#defaultFamily">defaultFamily</a>().</p>
<p>The font-matching algorithm has a <a href="qfont.html#lastResortFamily">lastResortFamily</a>() and <a href="qfont.html#lastResortFont">lastResortFont</a>() in cases where a suitable match cannot be found. You can provide substitutions for font family names using <a href="qfont.html#insertSubstitution">insertSubstitution</a>() and <a href="qfont.html#insertSubstitutions">insertSubstitutions</a>(). Substitutions can be removed with <a href="qfont.html#removeSubstitution">removeSubstitution</a>(). Use <a href="qfont.html#substitute">substitute</a>() to retrieve a family's first substitute, or the family name itself if it has no substitutes. Use <a href="qfont.html#substitutes">substitutes</a>() to retrieve a list of a family's substitutes (which may be empty).</p>
<p>Every QFont has a <a href="qfont.html#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="qfont.html#toString">toString</a>() and reading it back with <a href="qfont.html#fromString">fromString</a>(). The operator&lt;&lt;() and operator&gt;&gt;() functions are also available, but they work on a data stream.</p>
<p>It is possible to set the height of characters shown on the screen to a specified number of pixels with <a href="qfont.html#setPixelSize">setPixelSize</a>(); however using <a href="qfont.html#setPointSize">setPointSize</a>() has a similar effect and provides device independence.</p>
<p>In X11 you can set a font using its system specific name with <a href="qfont.html#setRawName">setRawName</a>().</p>
<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><p>The font matching algorithm works as follows:</p>
<ol class="1">
<li>The specified font family is searched for.</li>
<li>If not found, the <a href="qfont.html#styleHint">styleHint</a>() is used to select a replacement family.</li>
<li>Each replacement font family is searched for.</li>
<li>If none of these are found or there was no <a href="qfont.html#styleHint">styleHint</a>(), &quot;helvetica&quot; will be searched for.</li>
<li>If &quot;helvetica&quot; isn't found Qt will try the <a href="qfont.html#lastResortFamily">lastResortFamily</a>().</li>
<li>If the <a href="qfont.html#lastResortFamily">lastResortFamily</a>() isn't found Qt will try the <a href="qfont.html#lastResortFont">lastResortFont</a>() which will always return a name of some kind.</li>
</ol>
<p>Note that the actual font matching algorithm varies from platform to platform.</p>
<p>In Windows a request for the &quot;Courier&quot; font is automatically changed to &quot;Courier New&quot;, an improved version of Courier that allows for smooth scaling. The older &quot;Courier&quot; bitmap font can be selected by setting the <a href="qfont.html#StyleStrategy-enum">PreferBitmap</a> style strategy (see <a href="qfont.html#setStyleStrategy">setStyleStrategy</a>()).</p>
<p>Once a font is found, the remaining attributes are matched in order of priority:</p>
<ol class="1">
<li><a href="qfont.html#fixedPitch">fixedPitch</a>()</li>
<li><a href="qfont.html#pointSize">pointSize</a>() (see below)</li>
<li><a href="qfont.html#weight">weight</a>()</li>
<li><a href="qfont.html#style">style</a>()</li>
</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>
<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>
<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>
<p>Examples:</p>
<pre class="cpp"> <span class="type">QFont</span> f(<span class="string">&quot;Helvetica&quot;</span>);</pre>
<p>If you had both an Adobe and a Cronyx Helvetica, you might get either.</p>
<pre class="cpp"> <span class="type">QFont</span> f(<span class="string">&quot;Helvetica [Cronyx]&quot;</span>);</pre>
<p>You can specify the foundry you want in the family name. The font f in the above example will be set to &quot;Helvetica [Cronyx]&quot;.</p>
<p>To determine the attributes of the font actually used in the window system, use a <a href="qfontinfo.html">QFontInfo</a> object, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qfontinfo.html">QFontInfo</a></span> info(f1);
 <span class="type"><a href="qstring.html">QString</a></span> family <span class="operator">=</span> info<span class="operator">.</span><a href="qfont.html#family">family</a>();</pre>
<p>To find out font metrics use a <a href="qfontmetrics.html">QFontMetrics</a> object, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qfontmetrics.html">QFontMetrics</a></span> fm(f1);
 <span class="type">int</span> textWidthInPixels <span class="operator">=</span> fm<span class="operator">.</span>width(<span class="string">&quot;How many pixels wide is this text?&quot;</span>);
 <span class="type">int</span> textHeightInPixels <span class="operator">=</span> fm<span class="operator">.</span>height();</pre>
<p>For more general information on fonts, see the <a href="http://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>
</div>
<p><b>See also </b><a href="qfontcombobox.html">QFontComboBox</a>, <a href="qfontmetrics.html">QFontMetrics</a>, <a href="qfontinfo.html">QFontInfo</a>, <a href="qfontdatabase.html">QFontDatabase</a>, and <a href="widgets-charactermap.html">Character Map Example</a>.</p>
<!-- @@@QFont -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Capitalization$$$MixedCase$$$AllUppercase$$$AllLowercase$$$SmallCaps$$$Capitalize -->
<h3 class="fn"><a name="Capitalization-enum"></a>enum QFont::<span class="name">Capitalization</span></h3>
<p>Rendering option for text this font applies to.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::MixedCase</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This is the normal text rendering option where no capitalization change is applied.</td></tr>
<tr><td class="topAlign"><tt>QFont::AllUppercase</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">This alters the text to be rendered in all uppercase type.</td></tr>
<tr><td class="topAlign"><tt>QFont::AllLowercase</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">This alters the text to be rendered in all lowercase type.</td></tr>
<tr><td class="topAlign"><tt>QFont::SmallCaps</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">This alters the text to be rendered in small-caps type.</td></tr>
<tr><td class="topAlign"><tt>QFont::Capitalize</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">This alters the text to be rendered with the first character of each word as an uppercase character.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@Capitalization -->
<!-- $$$HintingPreference$$$PreferDefaultHinting$$$PreferNoHinting$$$PreferVerticalHinting$$$PreferFullHinting -->
<h3 class="fn"><a name="HintingPreference-enum"></a>enum QFont::<span class="name">HintingPreference</span></h3>
<p>This enum describes the different levels of hinting that can be applied to glyphs to improve legibility on displays where it might be warranted by the density of pixels.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::PreferDefaultHinting</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Use the default hinting level for the target platform.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferNoHinting</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">If possible, render text without hinting the outlines of the glyphs. The text layout will be typographically accurate and scalable, using the same metrics as are used e.g&#x2e; when printing.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferVerticalHinting</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">If possible, render text with no horizontal hinting, but align glyphs to the pixel grid in the vertical direction. The text will appear crisper on displays where the density is too low to give an accurate rendering of the glyphs. But since the horizontal metrics of the glyphs are unhinted, the text's layout will be scalable to higher density devices (such as printers) without impacting details such as line breaks.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferFullHinting</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">If possible, render text with hinting in both horizontal and vertical directions. The text will be altered to optimize legibility on the target device, but since the metrics will depend on the target size of the text, the positions of glyphs, line breaks, and other typographical detail will not scale, meaning that a text layout may look different on devices with different pixel densities.</td></tr>
</table>
<p>Please note that this enum only describes a preference, as the full range of hinting levels are not supported on all of Qt's supported platforms. The following table details the effect of a given hinting preference on a selected set of target platforms.</p>
<table class="generic">
<thead><tr class="qt-style"><th ></th><th >PreferDefaultHinting</th><th >PreferNoHinting</th><th >PreferVerticalHinting</th><th >PreferFullHinting</th></tr></thead>
<tr valign="top" class="odd"><td >Windows Vista (w/o Platform Update) and earlier</td><td >Full hinting</td><td >Full hinting</td><td >Full hinting</td><td >Full hinting</td></tr>
<tr valign="top" class="even"><td >Windows 7 and Windows Vista (w/Platform Update) and DirectWrite enabled in Qt</td><td >Full hinting</td><td >Vertical hinting</td><td >Vertical hinting</td><td >Full hinting</td></tr>
<tr valign="top" class="odd"><td ><a href="qt-embedded-fonts.html#freetype">FreeType</a></td><td >Operating System setting</td><td >No hinting</td><td >Vertical hinting (light)</td><td >Full hinting</td></tr>
<tr valign="top" class="even"><td >Cocoa on Mac OS X</td><td >No hinting</td><td >No hinting</td><td >No hinting</td><td >No hinting</td></tr>
</table>
<p><b>Note:</b> Please be aware that altering the hinting preference on Windows is available through the DirectWrite font engine. This is available on Windows Vista after installing the platform update, and on Windows 7. In order to use this extension, configure Qt using -directwrite. The target application will then depend on the availability of DirectWrite on the target system.</p>
<p>This enum was introduced or modified in Qt 4.8.</p>
<!-- @@@HintingPreference -->
<!-- $$$SpacingType$$$PercentageSpacing$$$AbsoluteSpacing -->
<h3 class="fn"><a name="SpacingType-enum"></a>enum QFont::<span class="name">SpacingType</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::PercentageSpacing</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by the width of the character itself.</td></tr>
<tr><td class="topAlign"><tt>QFont::AbsoluteSpacing</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@SpacingType -->
<!-- $$$Stretch$$$UltraCondensed$$$ExtraCondensed$$$Condensed$$$SemiCondensed$$$Unstretched$$$SemiExpanded$$$Expanded$$$ExtraExpanded$$$UltraExpanded -->
<h3 class="fn"><a name="Stretch-enum"></a>enum QFont::<span class="name">Stretch</span></h3>
<p>Predefined stretch values that follow the CSS naming convention. The higher the value, the more stretched the text is.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::UltraCondensed</tt></td><td class="topAlign"><tt>50</tt></td><td class="topAlign">50</td></tr>
<tr><td class="topAlign"><tt>QFont::ExtraCondensed</tt></td><td class="topAlign"><tt>62</tt></td><td class="topAlign">62</td></tr>
<tr><td class="topAlign"><tt>QFont::Condensed</tt></td><td class="topAlign"><tt>75</tt></td><td class="topAlign">75</td></tr>
<tr><td class="topAlign"><tt>QFont::SemiCondensed</tt></td><td class="topAlign"><tt>87</tt></td><td class="topAlign">87</td></tr>
<tr><td class="topAlign"><tt>QFont::Unstretched</tt></td><td class="topAlign"><tt>100</tt></td><td class="topAlign">100</td></tr>
<tr><td class="topAlign"><tt>QFont::SemiExpanded</tt></td><td class="topAlign"><tt>112</tt></td><td class="topAlign">112</td></tr>
<tr><td class="topAlign"><tt>QFont::Expanded</tt></td><td class="topAlign"><tt>125</tt></td><td class="topAlign">125</td></tr>
<tr><td class="topAlign"><tt>QFont::ExtraExpanded</tt></td><td class="topAlign"><tt>150</tt></td><td class="topAlign">150</td></tr>
<tr><td class="topAlign"><tt>QFont::UltraExpanded</tt></td><td class="topAlign"><tt>200</tt></td><td class="topAlign">200</td></tr>
</table>
<p><b>See also </b><a href="qfont.html#setStretch">setStretch</a>() and <a href="qfont.html#stretch">stretch</a>().</p>
<!-- @@@Stretch -->
<!-- $$$Style$$$StyleNormal$$$StyleItalic$$$StyleOblique -->
<h3 class="fn"><a name="Style-enum"></a>enum QFont::<span class="name">Style</span></h3>
<p>This enum describes the different styles of glyphs that are used to display text.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::StyleNormal</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Normal glyphs used in unstyled text.</td></tr>
<tr><td class="topAlign"><tt>QFont::StyleItalic</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Italic glyphs that are specifically designed for the purpose of representing italicized text.</td></tr>
<tr><td class="topAlign"><tt>QFont::StyleOblique</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Glyphs with an italic appearance that are typically based on the unstyled glyphs, but are not fine-tuned for the purpose of representing italicized text.</td></tr>
</table>
<p><b>See also </b><a href="qfont.html#Weight-enum">Weight</a>.</p>
<!-- @@@Style -->
<!-- $$$StyleHint$$$Helvetica$$$SansSerif$$$Times$$$Serif$$$Courier$$$TypeWriter$$$OldEnglish$$$Decorative$$$System$$$AnyStyle$$$Cursive$$$Monospace$$$Fantasy -->
<h3 class="fn"><a name="StyleHint-enum"></a>enum QFont::<span class="name">StyleHint</span></h3>
<p>Style hints are used by the <a href="qfont.html">font matching</a> algorithm to find an appropriate default family if a selected font family is not available.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::AnyStyle</tt></td><td class="topAlign">?</td><td class="topAlign">leaves the font matching algorithm to choose the family. This is the default.</td></tr>
<tr><td class="topAlign"><tt>QFont::SansSerif</tt></td><td class="topAlign"><tt>Helvetica</tt></td><td class="topAlign">the font matcher prefer sans serif fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::Helvetica</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">is a synonym for <tt>SansSerif</tt>.</td></tr>
<tr><td class="topAlign"><tt>QFont::Serif</tt></td><td class="topAlign"><tt>Times</tt></td><td class="topAlign">the font matcher prefers serif fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::Times</tt></td><td class="topAlign">?</td><td class="topAlign">is a synonym for <tt>Serif</tt>.</td></tr>
<tr><td class="topAlign"><tt>QFont::TypeWriter</tt></td><td class="topAlign"><tt>Courier</tt></td><td class="topAlign">the font matcher prefers fixed pitch fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::Courier</tt></td><td class="topAlign">?</td><td class="topAlign">a synonym for <tt>TypeWriter</tt>.</td></tr>
<tr><td class="topAlign"><tt>QFont::OldEnglish</tt></td><td class="topAlign">?</td><td class="topAlign">the font matcher prefers decorative fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::Decorative</tt></td><td class="topAlign"><tt>OldEnglish</tt></td><td class="topAlign">is a synonym for <tt>OldEnglish</tt>.</td></tr>
<tr><td class="topAlign"><tt>QFont::Monospace</tt></td><td class="topAlign">?</td><td class="topAlign">the font matcher prefers fonts that map to the CSS generic font-family 'monospace'.</td></tr>
<tr><td class="topAlign"><tt>QFont::Fantasy</tt></td><td class="topAlign">?</td><td class="topAlign">the font matcher prefers fonts that map to the CSS generic font-family 'fantasy'.</td></tr>
<tr><td class="topAlign"><tt>QFont::Cursive</tt></td><td class="topAlign">?</td><td class="topAlign">the font matcher prefers fonts that map to the CSS generic font-family 'cursive'.</td></tr>
<tr><td class="topAlign"><tt>QFont::System</tt></td><td class="topAlign">?</td><td class="topAlign">the font matcher prefers system fonts.</td></tr>
</table>
<!-- @@@StyleHint -->
<!-- $$$StyleStrategy$$$PreferDefault$$$PreferBitmap$$$PreferDevice$$$PreferOutline$$$ForceOutline$$$PreferMatch$$$PreferQuality$$$PreferAntialias$$$NoAntialias$$$OpenGLCompatible$$$ForceIntegerMetrics$$$NoFontMerging -->
<h3 class="fn"><a name="StyleStrategy-enum"></a>enum QFont::<span class="name">StyleStrategy</span></h3>
<p>The style strategy tells the <a href="qfont.html">font matching</a> algorithm what type of fonts should be used to find an appropriate default family.</p>
<p>The following strategies are available:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::PreferDefault</tt></td><td class="topAlign"><tt>0x0001</tt></td><td class="topAlign">the default style strategy. It does not prefer any type of font.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferBitmap</tt></td><td class="topAlign"><tt>0x0002</tt></td><td class="topAlign">prefers bitmap fonts (as opposed to outline fonts).</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferDevice</tt></td><td class="topAlign"><tt>0x0004</tt></td><td class="topAlign">prefers device fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferOutline</tt></td><td class="topAlign"><tt>0x0008</tt></td><td class="topAlign">prefers outline fonts (as opposed to bitmap fonts).</td></tr>
<tr><td class="topAlign"><tt>QFont::ForceOutline</tt></td><td class="topAlign"><tt>0x0010</tt></td><td class="topAlign">forces the use of outline fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::NoAntialias</tt></td><td class="topAlign"><tt>0x0100</tt></td><td class="topAlign">don't antialias the fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferAntialias</tt></td><td class="topAlign"><tt>0x0080</tt></td><td class="topAlign">antialias if possible.</td></tr>
<tr><td class="topAlign"><tt>QFont::OpenGLCompatible</tt></td><td class="topAlign"><tt>0x0200</tt></td><td class="topAlign">forces the use of OpenGL compatible fonts.</td></tr>
<tr><td class="topAlign"><tt>QFont::NoFontMerging</tt></td><td class="topAlign"><tt>0x8000</tt></td><td class="topAlign">If the font selected for a certain writing system does not contain a character requested to draw, then Qt automatically chooses a similar looking font that contains the character. The NoFontMerging flag disables this feature. Please note that enabling this flag will not prevent Qt from automatically picking a suitable font when the selected font does not support the writing system of the text.</td></tr>
</table>
<p>Any of these may be OR-ed with one of these flags:</p>
<table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::PreferMatch</tt></td><td class="topAlign"><tt>0x0020</tt></td><td class="topAlign">prefer an exact match. The font matcher will try to use the exact font size that has been specified.</td></tr>
<tr><td class="topAlign"><tt>QFont::PreferQuality</tt></td><td class="topAlign"><tt>0x0040</tt></td><td class="topAlign">prefer the best quality font. The font matcher will use the nearest standard point size that the font supports.</td></tr>
<tr><td class="topAlign"><tt>QFont::ForceIntegerMetrics</tt></td><td class="topAlign"><tt>0x0400</tt></td><td class="topAlign">forces the use of integer values in font engines that support fractional font metrics.</td></tr>
</table>
<!-- @@@StyleStrategy -->
<!-- $$$Weight$$$Light$$$Normal$$$DemiBold$$$Bold$$$Black -->
<h3 class="fn"><a name="Weight-enum"></a>enum QFont::<span class="name">Weight</span></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>
<p>This enum contains the predefined font weights:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QFont::Light</tt></td><td class="topAlign"><tt>25</tt></td><td class="topAlign">25</td></tr>
<tr><td class="topAlign"><tt>QFont::Normal</tt></td><td class="topAlign"><tt>50</tt></td><td class="topAlign">50</td></tr>
<tr><td class="topAlign"><tt>QFont::DemiBold</tt></td><td class="topAlign"><tt>63</tt></td><td class="topAlign">63</td></tr>
<tr><td class="topAlign"><tt>QFont::Bold</tt></td><td class="topAlign"><tt>75</tt></td><td class="topAlign">75</td></tr>
<tr><td class="topAlign"><tt>QFont::Black</tt></td><td class="topAlign"><tt>87</tt></td><td class="topAlign">87</td></tr>
</table>
<!-- @@@Weight -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QFont[overload1]$$$QFont -->
<h3 class="fn"><a name="QFont"></a>QFont::<span class="name">QFont</span> ()</h3>
<p>Constructs a font object that uses the application's default font.</p>
<p><b>See also </b><a href="qapplication.html#setFont">QApplication::setFont</a>() and <a href="qapplication.html#font">QApplication::font</a>().</p>
<!-- @@@QFont -->
<!-- $$$QFont$$$QFontconstQString&intintbool -->
<h3 class="fn"><a name="QFont-2"></a>QFont::<span class="name">QFont</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>family</i>, <span class="type">int</span> <i>pointSize</i> = -1, <span class="type">int</span> <i>weight</i> = -1, <span class="type">bool</span> <i>italic</i> = false )</h3>
<p>Constructs a font object with the specified <i>family</i>, <i>pointSize</i>, <i>weight</i> and <i>italic</i> settings.</p>
<p>If <i>pointSize</i> is zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points, except on Symbian where it is 7 points.</p>
<p>The <i>family</i> name may optionally also include a foundry name, e.g&#x2e; &quot;Helvetica [Cronyx]&quot;. If the <i>family</i> 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="qfont.html">font matching</a> algorithm.</p>
<p><b>See also </b><a href="qfont.html#Weight-enum">Weight</a>, <a href="qfont.html#setFamily">setFamily</a>(), <a href="qfont.html#setPointSize">setPointSize</a>(), <a href="qfont.html#setWeight">setWeight</a>(), <a href="qfont.html#setItalic">setItalic</a>(), <a href="qfont.html#setStyleHint">setStyleHint</a>(), and <a href="qapplication.html#font">QApplication::font</a>().</p>
<!-- @@@QFont -->
<!-- $$$QFont$$$QFontconstQFont&QPaintDevice* -->
<h3 class="fn"><a name="QFont-3"></a>QFont::<span class="name">QFont</span> ( const <span class="type">QFont</span> &amp; <i>font</i>, <span class="type"><a href="qpaintdevice.html">QPaintDevice</a></span> * <i>pd</i> )</h3>
<p>Constructs a font from <i>font</i> for use on the paint device <i>pd</i>.</p>
<!-- @@@QFont -->
<!-- $$$QFont$$$QFontconstQFont& -->
<h3 class="fn"><a name="QFont-4"></a>QFont::<span class="name">QFont</span> ( const <span class="type">QFont</span> &amp; <i>font</i> )</h3>
<p>Constructs a font that is a copy of <i>font</i>.</p>
<!-- @@@QFont -->
<!-- $$$~QFont[overload1]$$$~QFont -->
<h3 class="fn"><a name="dtor.QFont"></a>QFont::<span class="name">~QFont</span> ()</h3>
<p>Destroys the font object and frees all allocated resources.</p>
<!-- @@@~QFont -->
<!-- $$$bold[overload1]$$$bold -->
<h3 class="fn"><a name="bold"></a><span class="type">bool</span> QFont::<span class="name">bold</span> () const</h3>
<p>Returns true if <a href="qfont.html#weight">weight</a>() is a value greater than <a href="qfont.html#Weight-enum">QFont::Normal</a>; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#weight">weight</a>(), <a href="qfont.html#setBold">setBold</a>(), and <a href="qfontinfo.html#bold">QFontInfo::bold</a>().</p>
<!-- @@@bold -->
<!-- $$$capitalization[overload1]$$$capitalization -->
<h3 class="fn"><a name="capitalization"></a><span class="type"><a href="qfont.html#Capitalization-enum">Capitalization</a></span> QFont::<span class="name">capitalization</span> () const</h3>
<p>Returns the current capitalization type of the font.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#setCapitalization">setCapitalization</a>().</p>
<!-- @@@capitalization -->
<!-- $$$defaultFamily[overload1]$$$defaultFamily -->
<h3 class="fn"><a name="defaultFamily"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">defaultFamily</span> () const</h3>
<p>Returns the family name that corresponds to the current style hint.</p>
<p><b>See also </b><a href="qfont.html#StyleHint-enum">StyleHint</a>, <a href="qfont.html#styleHint">styleHint</a>(), and <a href="qfont.html#setStyleHint">setStyleHint</a>().</p>
<!-- @@@defaultFamily -->
<!-- $$$exactMatch[overload1]$$$exactMatch -->
<h3 class="fn"><a name="exactMatch"></a><span class="type">bool</span> QFont::<span class="name">exactMatch</span> () const</h3>
<p>Returns true if a window system font exactly matching the settings of this font is available.</p>
<p><b>See also </b><a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@exactMatch -->
<!-- $$$family[overload1]$$$family -->
<h3 class="fn"><a name="family"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">family</span> () const</h3>
<p>Returns the requested font family name, i.e&#x2e; the name set in the constructor or the last setFont() call.</p>
<p><b>See also </b><a href="qfont.html#setFamily">setFamily</a>(), <a href="qfont.html#substitutes">substitutes</a>(), and <a href="qfont.html#substitute">substitute</a>().</p>
<!-- @@@family -->
<!-- $$$fixedPitch[overload1]$$$fixedPitch -->
<h3 class="fn"><a name="fixedPitch"></a><span class="type">bool</span> QFont::<span class="name">fixedPitch</span> () const</h3>
<p>Returns true if fixed pitch has been set; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#setFixedPitch">setFixedPitch</a>() and <a href="qfontinfo.html#fixedPitch">QFontInfo::fixedPitch</a>().</p>
<!-- @@@fixedPitch -->
<!-- $$$freetypeFace[overload1]$$$freetypeFace -->
<h3 class="fn"><a name="freetypeFace"></a><span class="type">FT_Face</span> QFont::<span class="name">freetypeFace</span> () const</h3>
<p>Returns the handle to the primary <a href="qt-embedded-fonts.html#freetype">FreeType</a> face of the font. If font merging is not disabled a <a href="qfont.html">QFont</a> can contain several physical fonts.</p>
<p>Returns 0 if the font does not contain a <a href="qt-embedded-fonts.html#freetype">FreeType</a> face.</p>
<p><b>Note:</b> This function is only available on platforms that provide the <a href="qt-embedded-fonts.html#freetype">FreeType</a> library; i.e&#x2e;, X11 and some Embedded Linux platforms.</p>
<!-- @@@freetypeFace -->
<!-- $$$fromString[overload1]$$$fromStringconstQString& -->
<h3 class="fn"><a name="fromString"></a><span class="type">bool</span> QFont::<span class="name">fromString</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>descrip</i> )</h3>
<p>Sets this font to match the description <i>descrip</i>. The description is a comma-separated list of the font attributes, as returned by <a href="qfont.html#toString">toString</a>().</p>
<p><b>See also </b><a href="qfont.html#toString">toString</a>().</p>
<!-- @@@fromString -->
<!-- $$$handle[overload1]$$$handle -->
<h3 class="fn"><a name="handle"></a><span class="type">HFONT</span> QFont::<span class="name">handle</span> () const</h3>
<p>Returns the window system handle to the font, for low-level access. Using this function is <i>not</i> portable.</p>
<!-- @@@handle -->
<!-- $$$hintingPreference[overload1]$$$hintingPreference -->
<h3 class="fn"><a name="hintingPreference"></a><span class="type"><a href="qfont.html#HintingPreference-enum">HintingPreference</a></span> QFont::<span class="name">hintingPreference</span> () const</h3>
<p>Returns the currently preferred hinting level for glyphs rendered with this font.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qfont.html#setHintingPreference">setHintingPreference</a>().</p>
<!-- @@@hintingPreference -->
<!-- $$$insertSubstitution[overload1]$$$insertSubstitutionconstQString&constQString& -->
<h3 class="fn"><a name="insertSubstitution"></a><span class="type">void</span> QFont::<span class="name">insertSubstitution</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>familyName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>substituteName</i> )<tt> [static]</tt></h3>
<p>Inserts <i>substituteName</i> into the substitution table for the family <i>familyName</i>.</p>
<p><b>See also </b><a href="qfont.html#insertSubstitutions">insertSubstitutions</a>(), <a href="qfont.html#removeSubstitution">removeSubstitution</a>(), <a href="qfont.html#substitutions">substitutions</a>(), <a href="qfont.html#substitute">substitute</a>(), and <a href="qfont.html#substitutes">substitutes</a>().</p>
<!-- @@@insertSubstitution -->
<!-- $$$insertSubstitutions[overload1]$$$insertSubstitutionsconstQString&constQStringList& -->
<h3 class="fn"><a name="insertSubstitutions"></a><span class="type">void</span> QFont::<span class="name">insertSubstitutions</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>familyName</i>, const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>substituteNames</i> )<tt> [static]</tt></h3>
<p>Inserts the list of families <i>substituteNames</i> into the substitution list for <i>familyName</i>.</p>
<p><b>See also </b><a href="qfont.html#insertSubstitution">insertSubstitution</a>(), <a href="qfont.html#removeSubstitution">removeSubstitution</a>(), <a href="qfont.html#substitutions">substitutions</a>(), and <a href="qfont.html#substitute">substitute</a>().</p>
<!-- @@@insertSubstitutions -->
<!-- $$$isCopyOf[overload1]$$$isCopyOfconstQFont& -->
<h3 class="fn"><a name="isCopyOf"></a><span class="type">bool</span> QFont::<span class="name">isCopyOf</span> ( const <span class="type">QFont</span> &amp; <i>f</i> ) const</h3>
<p>Returns true if this font and <i>f</i> are copies of each other, i.e&#x2e; 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><b>See also </b><a href="qfont.html#operator-eq">operator=</a>() and <a href="qfont.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@isCopyOf -->
<!-- $$$italic[overload1]$$$italic -->
<h3 class="fn"><a name="italic"></a><span class="type">bool</span> QFont::<span class="name">italic</span> () const</h3>
<p>Returns true if the <a href="qfont.html#style">style</a>() of the font is not <a href="qfont.html#Style-enum">QFont::StyleNormal</a></p>
<p><b>See also </b><a href="qfont.html#setItalic">setItalic</a>() and <a href="qfont.html#style">style</a>().</p>
<!-- @@@italic -->
<!-- $$$kerning[overload1]$$$kerning -->
<h3 class="fn"><a name="kerning"></a><span class="type">bool</span> QFont::<span class="name">kerning</span> () const</h3>
<p>Returns true if kerning should be used when drawing text with this font.</p>
<p><b>See also </b><a href="qfont.html#setKerning">setKerning</a>().</p>
<!-- @@@kerning -->
<!-- $$$key[overload1]$$$key -->
<h3 class="fn"><a name="key"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">key</span> () const</h3>
<p>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><b>See also </b><a href="qmap.html">QMap</a>.</p>
<!-- @@@key -->
<!-- $$$lastResortFamily[overload1]$$$lastResortFamily -->
<h3 class="fn"><a name="lastResortFamily"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">lastResortFamily</span> () const</h3>
<p>Returns the &quot;last resort&quot; font family name.</p>
<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 an empty string is returned.</p>
<p><b>See also </b><a href="qfont.html#lastResortFont">lastResortFont</a>().</p>
<!-- @@@lastResortFamily -->
<!-- $$$lastResortFont[overload1]$$$lastResortFont -->
<h3 class="fn"><a name="lastResortFont"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">lastResortFont</span> () const</h3>
<p>Returns a &quot;last resort&quot; 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 &quot;fixed&quot; or &quot;system&quot;.</p>
<p>The current implementation tries a wide variety of common fonts, returning the first one it finds. The implementation may change at any time, but this function will always return a string containing something.</p>
<p>It is theoretically possible that there really isn't a lastResortFont() 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><b>See also </b><a href="qfont.html#lastResortFamily">lastResortFamily</a>() and <a href="qfont.html#rawName">rawName</a>().</p>
<!-- @@@lastResortFont -->
<!-- $$$letterSpacing[overload1]$$$letterSpacing -->
<h3 class="fn"><a name="letterSpacing"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QFont::<span class="name">letterSpacing</span> () const</h3>
<p>Returns the letter spacing for the font.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#setLetterSpacing">setLetterSpacing</a>(), <a href="qfont.html#letterSpacingType">letterSpacingType</a>(), and <a href="qfont.html#setWordSpacing">setWordSpacing</a>().</p>
<!-- @@@letterSpacing -->
<!-- $$$letterSpacingType[overload1]$$$letterSpacingType -->
<h3 class="fn"><a name="letterSpacingType"></a><span class="type"><a href="qfont.html#SpacingType-enum">SpacingType</a></span> QFont::<span class="name">letterSpacingType</span> () const</h3>
<p>Returns the spacing type used for letter spacing.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#letterSpacing">letterSpacing</a>(), <a href="qfont.html#setLetterSpacing">setLetterSpacing</a>(), and <a href="qfont.html#setWordSpacing">setWordSpacing</a>().</p>
<!-- @@@letterSpacingType -->
<!-- $$$macFontID[overload1]$$$macFontID -->
<h3 class="fn"><a name="macFontID"></a><span class="type"><a href="qtglobal.html#quint32-typedef">quint32</a></span> QFont::<span class="name">macFontID</span> () const</h3>
<p>Returns an ATSUFontID</p>
<!-- @@@macFontID -->
<!-- $$$overline[overload1]$$$overline -->
<h3 class="fn"><a name="overline"></a><span class="type">bool</span> QFont::<span class="name">overline</span> () const</h3>
<p>Returns true if overline has been set; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#setOverline">setOverline</a>().</p>
<!-- @@@overline -->
<!-- $$$pixelSize[overload1]$$$pixelSize -->
<h3 class="fn"><a name="pixelSize"></a><span class="type">int</span> QFont::<span class="name">pixelSize</span> () const</h3>
<p>Returns the pixel size of the font if it was set with <a href="qfont.html#setPixelSize">setPixelSize</a>(). Returns -1 if the size was set with <a href="qfont.html#setPointSize">setPointSize</a>() or <a href="qfont.html#setPointSizeF">setPointSizeF</a>().</p>
<p><b>See also </b><a href="qfont.html#setPixelSize">setPixelSize</a>(), <a href="qfont.html#pointSize">pointSize</a>(), <a href="qfontinfo.html#pointSize">QFontInfo::pointSize</a>(), and <a href="qfontinfo.html#pixelSize">QFontInfo::pixelSize</a>().</p>
<!-- @@@pixelSize -->
<!-- $$$pointSize[overload1]$$$pointSize -->
<h3 class="fn"><a name="pointSize"></a><span class="type">int</span> QFont::<span class="name">pointSize</span> () const</h3>
<p>Returns the point size of the font. Returns -1 if the font size was specified in pixels.</p>
<p><b>See also </b><a href="qfont.html#setPointSize">setPointSize</a>() and <a href="qfont.html#pointSizeF">pointSizeF</a>().</p>
<!-- @@@pointSize -->
<!-- $$$pointSizeF[overload1]$$$pointSizeF -->
<h3 class="fn"><a name="pointSizeF"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QFont::<span class="name">pointSizeF</span> () const</h3>
<p>Returns the point size of the font. Returns -1 if the font size was specified in pixels.</p>
<p><b>See also </b><a href="qfont.html#pointSize">pointSize</a>(), <a href="qfont.html#setPointSizeF">setPointSizeF</a>(), <a href="qfont.html#pixelSize">pixelSize</a>(), <a href="qfontinfo.html#pointSize">QFontInfo::pointSize</a>(), and <a href="qfontinfo.html#pixelSize">QFontInfo::pixelSize</a>().</p>
<!-- @@@pointSizeF -->
<!-- $$$rawMode[overload1]$$$rawMode -->
<h3 class="fn"><a name="rawMode"></a><span class="type">bool</span> QFont::<span class="name">rawMode</span> () const</h3>
<p>Returns true if raw mode is used for font name matching; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#setRawMode">setRawMode</a>() and <a href="qfont.html#rawName">rawName</a>().</p>
<!-- @@@rawMode -->
<!-- $$$rawName[overload1]$$$rawName -->
<h3 class="fn"><a name="rawName"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">rawName</span> () const</h3>
<p>Returns the name of the font within the underlying window system.</p>
<p>On X11, this function will return an empty string if Qt is built with FontConfig support; otherwise the XLFD (X Logical Font Description) is returned.</p>
<p>Using the return value of this function is usually <i>not</i> <i>portable</i>.</p>
<p><b>See also </b><a href="qfont.html#setRawName">setRawName</a>().</p>
<!-- @@@rawName -->
<!-- $$$removeSubstitution[overload1]$$$removeSubstitutionconstQString& -->
<h3 class="fn"><a name="removeSubstitution"></a><span class="type">void</span> QFont::<span class="name">removeSubstitution</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>familyName</i> )<tt> [static]</tt></h3>
<p>Removes all the substitutions for <i>familyName</i>.</p>
<p><b>See also </b><a href="qfont.html#insertSubstitutions">insertSubstitutions</a>(), <a href="qfont.html#insertSubstitution">insertSubstitution</a>(), <a href="qfont.html#substitutions">substitutions</a>(), and <a href="qfont.html#substitute">substitute</a>().</p>
<!-- @@@removeSubstitution -->
<!-- $$$resolve[overload1]$$$resolveconstQFont& -->
<h3 class="fn"><a name="resolve"></a><span class="type">QFont</span> QFont::<span class="name">resolve</span> ( const <span class="type">QFont</span> &amp; <i>other</i> ) const</h3>
<p>Returns a new <a href="qfont.html">QFont</a> that has attributes copied from <i>other</i> that have not been previously set on this font.</p>
<!-- @@@resolve -->
<!-- $$$setBold[overload1]$$$setBoldbool -->
<h3 class="fn"><a name="setBold"></a><span class="type">void</span> QFont::<span class="name">setBold</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true sets the font's weight to <a href="qfont.html#Weight-enum">QFont::Bold</a>; otherwise sets the weight to <a href="qfont.html#Weight-enum">QFont::Normal</a>.</p>
<p>For finer boldness control use <a href="qfont.html#setWeight">setWeight</a>().</p>
<p><b>See also </b><a href="qfont.html#bold">bold</a>() and <a href="qfont.html#setWeight">setWeight</a>().</p>
<!-- @@@setBold -->
<!-- $$$setCapitalization[overload1]$$$setCapitalizationCapitalization -->
<h3 class="fn"><a name="setCapitalization"></a><span class="type">void</span> QFont::<span class="name">setCapitalization</span> ( <span class="type"><a href="qfont.html#Capitalization-enum">Capitalization</a></span> <i>caps</i> )</h3>
<p>Sets the capitalization of the text in this font to <i>caps</i>.</p>
<p>A font's capitalization makes the text appear in the selected capitalization mode.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#capitalization">capitalization</a>().</p>
<!-- @@@setCapitalization -->
<!-- $$$setFamily[overload1]$$$setFamilyconstQString& -->
<h3 class="fn"><a name="setFamily"></a><span class="type">void</span> QFont::<span class="name">setFamily</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>family</i> )</h3>
<p>Sets the family name of the font. The name is case insensitive and may include a foundry name.</p>
<p>The <i>family</i> name may optionally also include a foundry name, e.g&#x2e; &quot;Helvetica [Cronyx]&quot;. If the <i>family</i> 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="qfont.html">font matching</a> algorithm.</p>
<p><b>See also </b><a href="qfont.html#family">family</a>(), <a href="qfont.html#setStyleHint">setStyleHint</a>(), and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setFamily -->
<!-- $$$setFixedPitch[overload1]$$$setFixedPitchbool -->
<h3 class="fn"><a name="setFixedPitch"></a><span class="type">void</span> QFont::<span class="name">setFixedPitch</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, sets fixed pitch on; otherwise sets fixed pitch off.</p>
<p><b>See also </b><a href="qfont.html#fixedPitch">fixedPitch</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setFixedPitch -->
<!-- $$$setHintingPreference[overload1]$$$setHintingPreferenceHintingPreference -->
<h3 class="fn"><a name="setHintingPreference"></a><span class="type">void</span> QFont::<span class="name">setHintingPreference</span> ( <span class="type"><a href="qfont.html#HintingPreference-enum">HintingPreference</a></span> <i>hintingPreference</i> )</h3>
<p>Set the preference for the hinting level of the glyphs to <i>hintingPreference</i>. This is a hint to the underlying font rendering system to use a certain level of hinting, and has varying support across platforms. See the table in the documentation for <a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a> for more details.</p>
<p>The default hinting preference is <a href="qfont.html#HintingPreference-enum">QFont::PreferDefaultHinting</a>.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qfont.html#hintingPreference">hintingPreference</a>().</p>
<!-- @@@setHintingPreference -->
<!-- $$$setItalic[overload1]$$$setItalicbool -->
<h3 class="fn"><a name="setItalic"></a><span class="type">void</span> QFont::<span class="name">setItalic</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Sets the <a href="qfont.html#style">style</a>() of the font to <a href="qfont.html#Style-enum">QFont::StyleItalic</a> if <i>enable</i> is true; otherwise the style is set to <a href="qfont.html#Style-enum">QFont::StyleNormal</a>.</p>
<p><b>See also </b><a href="qfont.html#italic">italic</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setItalic -->
<!-- $$$setKerning[overload1]$$$setKerningbool -->
<h3 class="fn"><a name="setKerning"></a><span class="type">void</span> QFont::<span class="name">setKerning</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Enables kerning for this font if <i>enable</i> is true; otherwise disables it. By default, kerning is enabled.</p>
<p>When kerning is enabled, glyph metrics do not add up anymore, even for Latin text. In other words, the assumption that width('a') + width('b') is equal to width(&quot;ab&quot;) is not neccesairly true.</p>
<p><b>See also </b><a href="qfont.html#kerning">kerning</a>() and <a href="qfontmetrics.html">QFontMetrics</a>.</p>
<!-- @@@setKerning -->
<!-- $$$setLetterSpacing[overload1]$$$setLetterSpacingSpacingTypeqreal -->
<h3 class="fn"><a name="setLetterSpacing"></a><span class="type">void</span> QFont::<span class="name">setLetterSpacing</span> ( <span class="type"><a href="qfont.html#SpacingType-enum">SpacingType</a></span> <i>type</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i> )</h3>
<p>Sets the letter spacing for the font to <i>spacing</i> and the type of spacing to <i>type</i>.</p>
<p>Letter spacing changes the default spacing between individual letters in the font. The spacing between the letters can be made smaller as well as larger.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#letterSpacing">letterSpacing</a>(), <a href="qfont.html#letterSpacingType">letterSpacingType</a>(), and <a href="qfont.html#setWordSpacing">setWordSpacing</a>().</p>
<!-- @@@setLetterSpacing -->
<!-- $$$setOverline[overload1]$$$setOverlinebool -->
<h3 class="fn"><a name="setOverline"></a><span class="type">void</span> QFont::<span class="name">setOverline</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, sets overline on; otherwise sets overline off.</p>
<p><b>See also </b><a href="qfont.html#overline">overline</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setOverline -->
<!-- $$$setPixelSize[overload1]$$$setPixelSizeint -->
<h3 class="fn"><a name="setPixelSize"></a><span class="type">void</span> QFont::<span class="name">setPixelSize</span> ( <span class="type">int</span> <i>pixelSize</i> )</h3>
<p>Sets the font size to <i>pixelSize</i> pixels.</p>
<p>Using this function makes the font device dependent. Use <a href="qfont.html#setPointSize">setPointSize</a>() or <a href="qfont.html#setPointSizeF">setPointSizeF</a>() to set the size of the font in a device independent manner.</p>
<p><b>See also </b><a href="qfont.html#pixelSize">pixelSize</a>().</p>
<!-- @@@setPixelSize -->
<!-- $$$setPointSize[overload1]$$$setPointSizeint -->
<h3 class="fn"><a name="setPointSize"></a><span class="type">void</span> QFont::<span class="name">setPointSize</span> ( <span class="type">int</span> <i>pointSize</i> )</h3>
<p>Sets the point size to <i>pointSize</i>. The point size must be greater than zero.</p>
<p><b>See also </b><a href="qfont.html#pointSize">pointSize</a>() and <a href="qfont.html#setPointSizeF">setPointSizeF</a>().</p>
<!-- @@@setPointSize -->
<!-- $$$setPointSizeF[overload1]$$$setPointSizeFqreal -->
<h3 class="fn"><a name="setPointSizeF"></a><span class="type">void</span> QFont::<span class="name">setPointSizeF</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>pointSize</i> )</h3>
<p>Sets the point size to <i>pointSize</i>. The point size must be greater than zero. The requested precision may not be achieved on all platforms.</p>
<p><b>See also </b><a href="qfont.html#pointSizeF">pointSizeF</a>(), <a href="qfont.html#setPointSize">setPointSize</a>(), and <a href="qfont.html#setPixelSize">setPixelSize</a>().</p>
<!-- @@@setPointSizeF -->
<!-- $$$setRawMode[overload1]$$$setRawModebool -->
<h3 class="fn"><a name="setRawMode"></a><span class="type">void</span> QFont::<span class="name">setRawMode</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, turns raw mode on; otherwise turns raw mode off. This function only has an effect under X11.</p>
<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 <a href="qfont.html">QFont</a>. If the font name matches several fonts, Qt will use the first font returned by X. <a href="qfontinfo.html">QFontInfo</a> <i>cannot</i> be used to fetch information about a <a href="qfont.html">QFont</a> using raw mode (it will return the values set in the <a href="qfont.html">QFont</a> for all parameters, including the family name).</p>
<p><b>Warning:</b> Do not use raw mode unless you really, really need it! In most (if not all) cases, <a href="qfont.html#setRawName">setRawName</a>() is a much better choice.</p>
<p><b>See also </b><a href="qfont.html#rawMode">rawMode</a>() and <a href="qfont.html#setRawName">setRawName</a>().</p>
<!-- @@@setRawMode -->
<!-- $$$setRawName[overload1]$$$setRawNameconstQString& -->
<h3 class="fn"><a name="setRawName"></a><span class="type">void</span> QFont::<span class="name">setRawName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )</h3>
<p>Sets a font by its system specific name. The function is particularly 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 <i>name</i> to this function.</p>
<p>A font set with setRawName() is still a full-featured <a href="qfont.html">QFont</a>. It can be queried (for example with <a href="qfont.html#italic">italic</a>()) or modified (for example with <a href="qfont.html#setItalic">setItalic</a>()) and is therefore also suitable for rendering rich text.</p>
<p>If Qt's internal font database cannot resolve the raw name, the font becomes a raw font with <i>name</i> as its family.</p>
<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><b>See also </b><a href="qfont.html#rawName">rawName</a>(), <a href="qfont.html#setRawMode">setRawMode</a>(), and <a href="qfont.html#setFamily">setFamily</a>().</p>
<!-- @@@setRawName -->
<!-- $$$setStretch[overload1]$$$setStretchint -->
<h3 class="fn"><a name="setStretch"></a><span class="type">void</span> QFont::<span class="name">setStretch</span> ( <span class="type">int</span> <i>factor</i> )</h3>
<p>Sets the stretch factor for the font.</p>
<p>The stretch factor changes the width of all characters in the font by <i>factor</i> percent. For example, setting <i>factor</i> to 150 results in all characters in the font being 1.5 times (ie. 150%) wider. The default stretch factor is 100. The minimum stretch factor is 1, and the maximum stretch factor is 4000.</p>
<p>The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts.</p>
<p>NOTE: <a href="qfont.html">QFont</a> cannot stretch XLFD fonts. When loading XLFD fonts on X11, the stretch factor is matched against a predefined set of values for the SETWIDTH_NAME field of the XLFD.</p>
<p><b>See also </b><a href="qfont.html#stretch">stretch</a>() and <a href="qfont.html#Stretch-enum">QFont::Stretch</a>.</p>
<!-- @@@setStretch -->
<!-- $$$setStrikeOut[overload1]$$$setStrikeOutbool -->
<h3 class="fn"><a name="setStrikeOut"></a><span class="type">void</span> QFont::<span class="name">setStrikeOut</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, sets strikeout on; otherwise sets strikeout off.</p>
<p><b>See also </b><a href="qfont.html#strikeOut">strikeOut</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setStrikeOut -->
<!-- $$$setStyle[overload1]$$$setStyleStyle -->
<h3 class="fn"><a name="setStyle"></a><span class="type">void</span> QFont::<span class="name">setStyle</span> ( <span class="type"><a href="qfont.html#Style-enum">Style</a></span> <i>style</i> )</h3>
<p>Sets the style of the font to <i>style</i>.</p>
<p><b>See also </b><a href="qfont.html#style">style</a>(), <a href="qfont.html#italic">italic</a>(), and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setStyle -->
<!-- $$$setStyleHint[overload1]$$$setStyleHintStyleHintStyleStrategy -->
<h3 class="fn"><a name="setStyleHint"></a><span class="type">void</span> QFont::<span class="name">setStyleHint</span> ( <span class="type"><a href="qfont.html#StyleHint-enum">StyleHint</a></span> <i>hint</i>, <span class="type"><a href="qfont.html#StyleStrategy-enum">StyleStrategy</a></span> <i>strategy</i> = PreferDefault )</h3>
<p>Sets the style hint and strategy to <i>hint</i> and <i>strategy</i>, respectively.</p>
<p>If these aren't set explicitly the style hint will default to <tt>AnyStyle</tt> and the style strategy to <tt>PreferDefault</tt>.</p>
<p>Qt does not support style hints on X11 since this information is not provided by the window system.</p>
<p><b>See also </b><a href="qfont.html#StyleHint-enum">StyleHint</a>, <a href="qfont.html#styleHint">styleHint</a>(), <a href="qfont.html#StyleStrategy-enum">StyleStrategy</a>, <a href="qfont.html#styleStrategy">styleStrategy</a>(), and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setStyleHint -->
<!-- $$$setStyleName[overload1]$$$setStyleNameconstQString& -->
<h3 class="fn"><a name="setStyleName"></a><span class="type">void</span> QFont::<span class="name">setStyleName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>styleName</i> )</h3>
<p>Sets the style name of the font to the given <i>styleName</i>. When set, other style properties like <a href="qfont.html#style">style</a>() and <a href="qfont.html#weight">weight</a>() will be ignored for font matching.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qfont.html#styleName">styleName</a>().</p>
<!-- @@@setStyleName -->
<!-- $$$setStyleStrategy[overload1]$$$setStyleStrategyStyleStrategy -->
<h3 class="fn"><a name="setStyleStrategy"></a><span class="type">void</span> QFont::<span class="name">setStyleStrategy</span> ( <span class="type"><a href="qfont.html#StyleStrategy-enum">StyleStrategy</a></span> <i>s</i> )</h3>
<p>Sets the style strategy for the font to <i>s</i>.</p>
<p><b>See also </b><a href="qfont.html#styleStrategy">styleStrategy</a>() and <a href="qfont.html#StyleStrategy-enum">QFont::StyleStrategy</a>.</p>
<!-- @@@setStyleStrategy -->
<!-- $$$setUnderline[overload1]$$$setUnderlinebool -->
<h3 class="fn"><a name="setUnderline"></a><span class="type">void</span> QFont::<span class="name">setUnderline</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, sets underline on; otherwise sets underline off.</p>
<p><b>See also </b><a href="qfont.html#underline">underline</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setUnderline -->
<!-- $$$setWeight[overload1]$$$setWeightint -->
<h3 class="fn"><a name="setWeight"></a><span class="type">void</span> QFont::<span class="name">setWeight</span> ( <span class="type">int</span> <i>weight</i> )</h3>
<p>Sets the weight the font to <i>weight</i>, which should be a value from the <a href="qfont.html#Weight-enum">QFont::Weight</a> enumeration.</p>
<p><b>See also </b><a href="qfont.html#weight">weight</a>() and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@setWeight -->
<!-- $$$setWordSpacing[overload1]$$$setWordSpacingqreal -->
<h3 class="fn"><a name="setWordSpacing"></a><span class="type">void</span> QFont::<span class="name">setWordSpacing</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i> )</h3>
<p>Sets the word spacing for the font to <i>spacing</i>.</p>
<p>Word spacing changes the default spacing between individual words. A positive value increases the word spacing by a corresponding amount of pixels, while a negative value decreases the inter-word spacing accordingly.</p>
<p>Word spacing will not apply to writing systems, where indiviaul words are not separated by white space.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#wordSpacing">wordSpacing</a>() and <a href="qfont.html#setLetterSpacing">setLetterSpacing</a>().</p>
<!-- @@@setWordSpacing -->
<!-- $$$stretch[overload1]$$$stretch -->
<h3 class="fn"><a name="stretch"></a><span class="type">int</span> QFont::<span class="name">stretch</span> () const</h3>
<p>Returns the stretch factor for the font.</p>
<p><b>See also </b><a href="qfont.html#setStretch">setStretch</a>().</p>
<!-- @@@stretch -->
<!-- $$$strikeOut[overload1]$$$strikeOut -->
<h3 class="fn"><a name="strikeOut"></a><span class="type">bool</span> QFont::<span class="name">strikeOut</span> () const</h3>
<p>Returns true if strikeout has been set; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#setStrikeOut">setStrikeOut</a>().</p>
<!-- @@@strikeOut -->
<!-- $$$style[overload1]$$$style -->
<h3 class="fn"><a name="style"></a><span class="type"><a href="qfont.html#Style-enum">Style</a></span> QFont::<span class="name">style</span> () const</h3>
<p>Returns the style of the font.</p>
<p><b>See also </b><a href="qfont.html#setStyle">setStyle</a>().</p>
<!-- @@@style -->
<!-- $$$styleHint[overload1]$$$styleHint -->
<h3 class="fn"><a name="styleHint"></a><span class="type"><a href="qfont.html#StyleHint-enum">StyleHint</a></span> QFont::<span class="name">styleHint</span> () const</h3>
<p>Returns the <a href="qfont.html#StyleHint-enum">StyleHint</a>.</p>
<p>The style hint affects the <a href="qfont.html">font matching</a> algorithm. See <a href="qfont.html#StyleHint-enum">QFont::StyleHint</a> for the list of available hints.</p>
<p><b>See also </b><a href="qfont.html#setStyleHint">setStyleHint</a>(), <a href="qfont.html#StyleStrategy-enum">QFont::StyleStrategy</a>, and <a href="qfontinfo.html#styleHint">QFontInfo::styleHint</a>().</p>
<!-- @@@styleHint -->
<!-- $$$styleName[overload1]$$$styleName -->
<h3 class="fn"><a name="styleName"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">styleName</span> () const</h3>
<p>Returns the requested font style name, it will be used to match the font with irregular styles (that can't be normalized in other style properties). It depends on system font support, thus only works for Mac OS X and X11 so far. On Windows irregular styles will be added as separate font families so there is no need for this.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qfont.html#setStyleName">setStyleName</a>(), <a href="qfont.html#setFamily">setFamily</a>(), and <a href="qfont.html#setStyle">setStyle</a>().</p>
<!-- @@@styleName -->
<!-- $$$styleStrategy[overload1]$$$styleStrategy -->
<h3 class="fn"><a name="styleStrategy"></a><span class="type"><a href="qfont.html#StyleStrategy-enum">StyleStrategy</a></span> QFont::<span class="name">styleStrategy</span> () const</h3>
<p>Returns the <a href="qfont.html#StyleStrategy-enum">StyleStrategy</a>.</p>
<p>The style strategy affects the <a href="qfont.html">font matching</a> algorithm. See <a href="qfont.html#StyleStrategy-enum">QFont::StyleStrategy</a> for the list of available strategies.</p>
<p><b>See also </b><a href="qfont.html#setStyleStrategy">setStyleStrategy</a>(), <a href="qfont.html#setStyleHint">setStyleHint</a>(), and <a href="qfont.html#StyleHint-enum">QFont::StyleHint</a>.</p>
<!-- @@@styleStrategy -->
<!-- $$$substitute[overload1]$$$substituteconstQString& -->
<h3 class="fn"><a name="substitute"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">substitute</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>familyName</i> )<tt> [static]</tt></h3>
<p>Returns the first family name to be used whenever <i>familyName</i> is specified. The lookup is case insensitive.</p>
<p>If there is no substitution for <i>familyName</i>, <i>familyName</i> is returned.</p>
<p>To obtain a list of substitutions use <a href="qfont.html#substitutes">substitutes</a>().</p>
<p><b>See also </b><a href="qfont.html#setFamily">setFamily</a>(), <a href="qfont.html#insertSubstitutions">insertSubstitutions</a>(), <a href="qfont.html#insertSubstitution">insertSubstitution</a>(), and <a href="qfont.html#removeSubstitution">removeSubstitution</a>().</p>
<!-- @@@substitute -->
<!-- $$$substitutes[overload1]$$$substitutesconstQString& -->
<h3 class="fn"><a name="substitutes"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QFont::<span class="name">substitutes</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>familyName</i> )<tt> [static]</tt></h3>
<p>Returns a list of family names to be used whenever <i>familyName</i> is specified. The lookup is case insensitive.</p>
<p>If there is no substitution for <i>familyName</i>, an empty list is returned.</p>
<p><b>See also </b><a href="qfont.html#substitute">substitute</a>(), <a href="qfont.html#insertSubstitutions">insertSubstitutions</a>(), <a href="qfont.html#insertSubstitution">insertSubstitution</a>(), and <a href="qfont.html#removeSubstitution">removeSubstitution</a>().</p>
<!-- @@@substitutes -->
<!-- $$$substitutions[overload1]$$$substitutions -->
<h3 class="fn"><a name="substitutions"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QFont::<span class="name">substitutions</span> ()<tt> [static]</tt></h3>
<p>Returns a sorted list of substituted family names.</p>
<p><b>See also </b><a href="qfont.html#insertSubstitution">insertSubstitution</a>(), <a href="qfont.html#removeSubstitution">removeSubstitution</a>(), and <a href="qfont.html#substitute">substitute</a>().</p>
<!-- @@@substitutions -->
<!-- $$$toString[overload1]$$$toString -->
<h3 class="fn"><a name="toString"></a><span class="type"><a href="qstring.html">QString</a></span> QFont::<span class="name">toString</span> () const</h3>
<p>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><b>See also </b><a href="qfont.html#fromString">fromString</a>().</p>
<!-- @@@toString -->
<!-- $$$underline[overload1]$$$underline -->
<h3 class="fn"><a name="underline"></a><span class="type">bool</span> QFont::<span class="name">underline</span> () const</h3>
<p>Returns true if underline has been set; otherwise returns false.</p>
<p><b>See also </b><a href="qfont.html#setUnderline">setUnderline</a>().</p>
<!-- @@@underline -->
<!-- $$$weight[overload1]$$$weight -->
<h3 class="fn"><a name="weight"></a><span class="type">int</span> QFont::<span class="name">weight</span> () const</h3>
<p>Returns the weight of the font which is one of the enumerated values from <a href="qfont.html#Weight-enum">QFont::Weight</a>.</p>
<p><b>See also </b><a href="qfont.html#setWeight">setWeight</a>(), <a href="qfont.html#Weight-enum">Weight</a>, and <a href="qfontinfo.html">QFontInfo</a>.</p>
<!-- @@@weight -->
<!-- $$$wordSpacing[overload1]$$$wordSpacing -->
<h3 class="fn"><a name="wordSpacing"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QFont::<span class="name">wordSpacing</span> () const</h3>
<p>Returns the word spacing for the font.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qfont.html#setWordSpacing">setWordSpacing</a>() and <a href="qfont.html#setLetterSpacing">setLetterSpacing</a>().</p>
<!-- @@@wordSpacing -->
<!-- $$$operator QVariant[overload1]$$$operator QVariant -->
<h3 class="fn"><a name="operator-QVariant"></a>QFont::<span class="name">operator QVariant</span> () const</h3>
<p>Returns the font as a <a href="qvariant.html">QVariant</a></p>
<!-- @@@operator QVariant -->
<!-- $$$operator!=[overload1]$$$operator!=constQFont& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QFont::<span class="name">operator!=</span> ( const <span class="type">QFont</span> &amp; <i>f</i> ) const</h3>
<p>Returns true if this font is different from <i>f</i>; otherwise returns false.</p>
<p>Two QFonts are considered to be different if their font attributes are different. If <a href="qfont.html#rawMode">rawMode</a>() is enabled for both fonts, only the family fields are compared.</p>
<p><b>See also </b><a href="qfont.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator<[overload1]$$$operator<constQFont& -->
<h3 class="fn"><a name="operator-lt"></a><span class="type">bool</span> QFont::<span class="name">operator&lt;</span> ( const <span class="type">QFont</span> &amp; <i>f</i> ) const</h3>
<p>Provides an arbitrary comparison of this font and font <i>f</i>. All that is guaranteed is that the operator returns false if both fonts are equal and that (f1 &lt; f2) == !(f2 &lt; f1) if the fonts are not equal.</p>
<p>This function is useful in some circumstances, for example if you want to use <a href="qfont.html">QFont</a> objects as keys in a <a href="qmap.html">QMap</a>.</p>
<p><b>See also </b><a href="qfont.html#operator-eq-eq">operator==</a>(), <a href="qfont.html#operator-not-eq">operator!=</a>(), and <a href="qfont.html#isCopyOf">isCopyOf</a>().</p>
<!-- @@@operator< -->
<!-- $$$operator=[overload1]$$$operator=constQFont& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QFont</span> &amp; QFont::<span class="name">operator=</span> ( const <span class="type">QFont</span> &amp; <i>font</i> )</h3>
<p>Assigns <i>font</i> to this font and returns a reference to it.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQFont& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QFont::<span class="name">operator==</span> ( const <span class="type">QFont</span> &amp; <i>f</i> ) const</h3>
<p>Returns true if this font is equal to <i>f</i>; otherwise returns false.</p>
<p>Two QFonts are considered equal if their font attributes are equal. If <a href="qfont.html#rawMode">rawMode</a>() is enabled for both fonts, only the family fields are compared.</p>
<p><b>See also </b><a href="qfont.html#operator-not-eq">operator!=</a>() and <a href="qfont.html#isCopyOf">isCopyOf</a>().</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQFont& -->
<h3 class="fn"><a name="operator-lt-lt-62"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, const <span class="type">QFont</span> &amp; <i>font</i> )</h3>
<p>Writes the font <i>font</i> to the data stream <i>s</i>. (toString() writes to a text stream.)</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QFont& -->
<h3 class="fn"><a name="operator-gt-gt-41"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, <span class="type">QFont</span> &amp; <i>font</i> )</h3>
<p>Reads the font <i>font</i> from the data stream <i>s</i>. (fromString() reads from a text stream.)</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator>> -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>