1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QFontDatabase Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QFontDatabase Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QFontDatabase class provides information about the fonts
available in the underlying window system. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qfontdatabase.html#WritingSystem-enum">WritingSystem</a></b> { Any, Latin, Greek, Cyrillic, ..., Nko }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qfontdatabase.html#QFontDatabase">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qfontdatabase.html#QFontDatabase-2">__init__</a></b> (<i>self</i>, QFontDatabase)</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#bold">bold</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</li><li><div class="fn" />QStringList <b><a href="qfontdatabase.html#families">families</a></b> (<i>self</i>, WritingSystem <i>writingSystem</i> = QFontDatabase.Any)</li><li><div class="fn" />QFont <b><a href="qfontdatabase.html#font">font</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i>, int <i>pointSize</i>)</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#isBitmapScalable">isBitmapScalable</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#isFixedPitch">isFixedPitch</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#isScalable">isScalable</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#isSmoothlyScalable">isSmoothlyScalable</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#italic">italic</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</li><li><div class="fn" />list-of-int <b><a href="qfontdatabase.html#pointSizes">pointSizes</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</li><li><div class="fn" />list-of-int <b><a href="qfontdatabase.html#smoothSizes">smoothSizes</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</li><li><div class="fn" />QStringList <b><a href="qfontdatabase.html#styles">styles</a></b> (<i>self</i>, QString <i>family</i>)</li><li><div class="fn" />QString <b><a href="qfontdatabase.html#styleString">styleString</a></b> (<i>self</i>, QFont <i>font</i>)</li><li><div class="fn" />QString <b><a href="qfontdatabase.html#styleString-2">styleString</a></b> (<i>self</i>, QFontInfo <i>fontInfo</i>)</li><li><div class="fn" />int <b><a href="qfontdatabase.html#weight">weight</a></b> (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</li><li><div class="fn" />list-of-QFontDatabase.WritingSystem <b><a href="qfontdatabase.html#writingSystems">writingSystems</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QFontDatabase.WritingSystem <b><a href="qfontdatabase.html#writingSystems-2">writingSystems</a></b> (<i>self</i>, QString <i>family</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />int <b><a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a></b> (QString <i>fileName</i>)</li><li><div class="fn" />int <b><a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a></b> (QByteArray <i>fontData</i>)</li><li><div class="fn" />QStringList <b><a href="qfontdatabase.html#applicationFontFamilies">applicationFontFamilies</a></b> (int <i>id</i>)</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#removeAllApplicationFonts">removeAllApplicationFonts</a></b> ()</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a></b> (int <i>id</i>)</li><li><div class="fn" />list-of-int <b><a href="qfontdatabase.html#standardSizes">standardSizes</a></b> ()</li><li><div class="fn" />bool <b><a href="qfontdatabase.html#supportsThreadedFontRendering">supportsThreadedFontRendering</a></b> ()</li><li><div class="fn" />QString <b><a href="qfontdatabase.html#writingSystemName">writingSystemName</a></b> (WritingSystem <i>writingSystem</i>)</li><li><div class="fn" />QString <b><a href="qfontdatabase.html#writingSystemSample">writingSystemSample</a></b> (WritingSystem <i>writingSystem</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QFontDatabase class provides information about the fonts
available in the underlying window system.</p>
<p>The most common uses of this class are to query the database for
the list of font <a href="qfontdatabase.html#families">families</a>() and for the <a href="qfontdatabase.html#pointSizes">pointSizes</a>() and <a href="qfontdatabase.html#styles">styles</a>() that are available for
each family. An alternative to <a href="qfontdatabase.html#pointSizes">pointSizes</a>() is <a href="qfontdatabase.html#smoothSizes">smoothSizes</a>() which returns
the sizes at which a given family and style will look
attractive.</p>
<p>If the font family is available from two or more foundries the
foundry name is included in the family name; for example:
"Helvetica [Adobe]" and "Helvetica [Cronyx]". When you specify a
family, you can either use the old hyphenated "foundry-family"
format or the bracketed "family [foundry]" format; for example:
"Cronyx-Helvetica" or "Helvetica [Cronyx]". If the family has a
foundry it is always returned using the bracketed format, as is the
case with the value returned by <a href="qfontdatabase.html#families">families</a>().</p>
<p>The <a href="qfontdatabase.html#font">font</a>() function
returns a <a href="qfont.html">QFont</a> given a family, style and
point size.</p>
<p>A family and style combination can be checked to see if it is
<a href="qfontdatabase.html#italic">italic</a>() or <a href="qfontdatabase.html#bold">bold</a>(), and to retrieve its <a href="qfontdatabase.html#weight">weight</a>(). Similarly we can call
<a href="qfontdatabase.html#isBitmapScalable">isBitmapScalable</a>(),
<a href="qfontdatabase.html#isSmoothlyScalable">isSmoothlyScalable</a>(),
<a href="qfontdatabase.html#isScalable">isScalable</a>() and
<a href="qfontdatabase.html#isFixedPitch">isFixedPitch</a>().</p>
<p>Use the <a href="qfontdatabase.html#styleString">styleString</a>() to obtain a text
version of a style.</p>
<p>The QFontDatabase class also supports some static functions, for
example, <a href="qfontdatabase.html#standardSizes">standardSizes</a>(). You can
retrieve the description of a writing system using <a href="qfontdatabase.html#writingSystemName">writingSystemName</a>(), and
a sample of characters in a writing system with <a href="qfontdatabase.html#writingSystemSample">writingSystemSample</a>().</p>
<p>Example:</p>
<pre class="cpp">
<span class="type">QFontDatabase</span> database;
<span class="type"><a href="qtreewidget.html">QTreeWidget</a></span> fontTree;
fontTree<span class="operator">.</span>setColumnCount(<span class="number">2</span>);
fontTree<span class="operator">.</span>setHeaderLabels(<span class="type"><a href="qstringlist.html">QStringList</a></span>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Font"</span> <span class="operator"><</span><span class="operator"><</span> <span class="string">"Smooth Sizes"</span>);
foreach (<span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&</span>family<span class="operator">,</span> database<span class="operator">.</span>families()) {
<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> <span class="operator">*</span>familyItem <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span>(<span class="operator">&</span>fontTree);
familyItem<span class="operator">-</span><span class="operator">></span>setText(<span class="number">0</span><span class="operator">,</span> family);
foreach (<span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&</span>style<span class="operator">,</span> database<span class="operator">.</span>styles(family)) {
<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> <span class="operator">*</span>styleItem <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span>(familyItem);
styleItem<span class="operator">-</span><span class="operator">></span>setText(<span class="number">0</span><span class="operator">,</span> style);
<span class="type"><a href="qstring.html">QString</a></span> sizes;
foreach (<span class="type">int</span> points<span class="operator">,</span> database<span class="operator">.</span>smoothSizes(family<span class="operator">,</span> style))
sizes <span class="operator">+</span><span class="operator">=</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">.</span>number(points) <span class="operator">+</span> <span class="string">" "</span>;
styleItem<span class="operator">-</span><span class="operator">></span>setText(<span class="number">1</span><span class="operator">,</span> sizes<span class="operator">.</span>trimmed());
}
}
</pre>
<p>This example gets the list of font families, the list of styles
for each family, and the point sizes that are available for each
combination of family and style, displaying this information in a
tree view.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="WritingSystem-enum" />QFontDatabase.WritingSystem</h3><table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Any</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Latin</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Greek</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Cyrillic</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Armenian</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Hebrew</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Arabic</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Syriac</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Thaana</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Devanagari</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Bengali</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Gurmukhi</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Gujarati</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Oriya</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Tamil</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Telugu</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Kannada</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Malayalam</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Sinhala</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Thai</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Lao</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Tibetan</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Myanmar</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Georgian</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Khmer</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.SimplifiedChinese</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign">
<tt>QFontDatabase.TraditionalChinese</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Japanese</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Korean</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Vietnamese</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Symbol</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Other</tt></td>
<td class="topAlign"><tt>Symbol</tt></td>
<td class="topAlign">(the same as Symbol)</td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Ogham</tt></td>
<td class="topAlign">?</td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Runic</tt></td>
<td class="topAlign">?</td>
<td class="topAlign"> </td>
</tr>
<tr>
<td class="topAlign"><tt>QFontDatabase.Nko</tt></td>
<td class="topAlign">?</td>
<td class="topAlign"> </td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QFontDatabase" />QFontDatabase.__init__ (<i>self</i>)</h3><p>Creates a font database object.</p>
<h3 class="fn"><a name="QFontDatabase-2" />QFontDatabase.__init__ (<i>self</i>, <a href="qfontdatabase.html">QFontDatabase</a>)</h3><h3 class="fn"><a name="addApplicationFont" />int QFontDatabase.addApplicationFont (QString <i>fileName</i>)</h3><p>Loads the font from the file specified by <i>fileName</i> and
makes it available to the application. An ID is returned that can
be used to remove the font again with <a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a>()
or to retrieve the list of family names contained in the font.</p>
<p>The function returns -1 if the font could not be loaded.</p>
<p>Currently only TrueType fonts, TrueType font collections, and
OpenType fonts are supported.</p>
<p><b>Note:</b> Adding application fonts on Unix/X11 platforms
without fontconfig is currently not supported.</p>
<p><b>Note:</b> On Symbian, the font family names get truncated to
a length of 20 characters.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a>(),
<a href="qfontdatabase.html#applicationFontFamilies">applicationFontFamilies</a>(),
and <a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a>().</p>
<h3 class="fn"><a name="addApplicationFontFromData" />int QFontDatabase.addApplicationFontFromData (<a href="qbytearray.html">QByteArray</a> <i>fontData</i>)</h3><p>Loads the font from binary data specified by <i>fontData</i> and
makes it available to the application. An ID is returned that can
be used to remove the font again with <a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a>()
or to retrieve the list of family names contained in the font.</p>
<p>The function returns -1 if the font could not be loaded.</p>
<p>Currently only TrueType fonts and TrueType font collections are
supported.</p>
<p><b>Note:</b> Adding application fonts on Unix/X11 platforms
without fontconfig is currently not supported.</p>
<p><b>Note:</b> On Symbian, the font family names get truncated to
a length of 20 characters.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a>(),
<a href="qfontdatabase.html#applicationFontFamilies">applicationFontFamilies</a>(),
and <a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a>().</p>
<h3 class="fn"><a name="applicationFontFamilies" />QStringList QFontDatabase.applicationFontFamilies (int <i>id</i>)</h3><p>Returns a list of font families for the given application font
identified by <i>id</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a>()
and <a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a>().</p>
<h3 class="fn"><a name="bold" />bool QFontDatabase.bold (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is bold; otherwise returns false.</p>
<p><b>See also</b> <a href="qfontdatabase.html#italic">italic</a>()
and <a href="qfontdatabase.html#weight">weight</a>().</p>
<h3 class="fn"><a name="families" />QStringList QFontDatabase.families (<i>self</i>, <a href="qfontdatabase.html#WritingSystem-enum">WritingSystem</a> <i>writingSystem</i> = QFontDatabase.Any)</h3><p>Returns a sorted list of the available font families which
support the <i>writingSystem</i>.</p>
<p>If a family exists in several foundries, the returned name for
that font is in the form "family [foundry]". Examples: "Times
[Adobe]", "Times [Cronyx]", "Palatino".</p>
<p><b>See also</b> <a href="qfontdatabase.html#writingSystems">writingSystems</a>().</p>
<h3 class="fn"><a name="font" /><a href="qfont.html">QFont</a> QFontDatabase.font (<i>self</i>, QString <i>family</i>, QString <i>style</i>, int <i>pointSize</i>)</h3><p>Returns a <a href="qfont.html">QFont</a> object that has family
<i>family</i>, style <i>style</i> and point size <i>pointSize</i>.
If no matching font could be created, a <a href="qfont.html">QFont</a> object that uses the application's default
font is returned.</p>
<h3 class="fn"><a name="isBitmapScalable" />bool QFontDatabase.isBitmapScalable (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is a scalable bitmap font; otherwise returns false.
Scaling a bitmap font usually produces an unattractive hardly
readable result, because the pixels of the font are scaled. If you
need to scale a bitmap font it is better to scale it to one of the
fixed sizes returned by <a href="qfontdatabase.html#smoothSizes">smoothSizes</a>().</p>
<p><b>See also</b> <a href="qfontdatabase.html#isScalable">isScalable</a>() and <a href="qfontdatabase.html#isSmoothlyScalable">isSmoothlyScalable</a>().</p>
<h3 class="fn"><a name="isFixedPitch" />bool QFontDatabase.isFixedPitch (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is fixed pitch; otherwise returns false.</p>
<h3 class="fn"><a name="isScalable" />bool QFontDatabase.isScalable (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is scalable; otherwise returns false.</p>
<p><b>See also</b> <a href="qfontdatabase.html#isBitmapScalable">isBitmapScalable</a>() and
<a href="qfontdatabase.html#isSmoothlyScalable">isSmoothlyScalable</a>().</p>
<h3 class="fn"><a name="isSmoothlyScalable" />bool QFontDatabase.isSmoothlyScalable (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is smoothly scalable; otherwise returns false. If this
function returns true, it's safe to scale this font to any size,
and the result will always look attractive.</p>
<p><b>See also</b> <a href="qfontdatabase.html#isScalable">isScalable</a>() and <a href="qfontdatabase.html#isBitmapScalable">isBitmapScalable</a>().</p>
<h3 class="fn"><a name="italic" />bool QFontDatabase.italic (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</h3><p>Returns true if the font that has family <i>family</i> and style
<i>style</i> is italic; otherwise returns false.</p>
<p><b>See also</b> <a href="qfontdatabase.html#weight">weight</a>()
and <a href="qfontdatabase.html#bold">bold</a>().</p>
<h3 class="fn"><a name="pointSizes" />list-of-int QFontDatabase.pointSizes (<i>self</i>, QString <i>family</i>, QString <i>style</i> = QString())</h3><p>Returns a list of the point sizes available for the font with
the given <i>family</i> and <i>style</i>. The list may be
empty.</p>
<p><b>See also</b> <a href="qfontdatabase.html#smoothSizes">smoothSizes</a>() and <a href="qfontdatabase.html#standardSizes">standardSizes</a>().</p>
<h3 class="fn"><a name="removeAllApplicationFonts" />bool QFontDatabase.removeAllApplicationFonts ()</h3><p>Removes all application-local fonts previously added using
<a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a>()
and <a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a>().</p>
<p>Returns true if unloading of the fonts succeeded; otherwise
returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qfontdatabase.html#removeApplicationFont">removeApplicationFont</a>(),
<a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a>(),
and <a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a>().</p>
<h3 class="fn"><a name="removeApplicationFont" />bool QFontDatabase.removeApplicationFont (int <i>id</i>)</h3><p>Removes the previously loaded application font identified by
<i>id</i>. Returns true if unloading of the font succeeded;
otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qfontdatabase.html#removeAllApplicationFonts">removeAllApplicationFonts</a>(),
<a href="qfontdatabase.html#addApplicationFont">addApplicationFont</a>(),
and <a href="qfontdatabase.html#addApplicationFontFromData">addApplicationFontFromData</a>().</p>
<h3 class="fn"><a name="smoothSizes" />list-of-int QFontDatabase.smoothSizes (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</h3><p>Returns the point sizes of a font with the given <i>family</i>
and <i>style</i> that will look attractive. The list may be empty.
For non-scalable fonts and bitmap scalable fonts, this function is
equivalent to <a href="qfontdatabase.html#pointSizes">pointSizes</a>().</p>
<p><b>See also</b> <a href="qfontdatabase.html#pointSizes">pointSizes</a>() and <a href="qfontdatabase.html#standardSizes">standardSizes</a>().</p>
<h3 class="fn"><a name="standardSizes" />list-of-int QFontDatabase.standardSizes ()</h3><p>Returns a list of standard font sizes.</p>
<p><b>See also</b> <a href="qfontdatabase.html#smoothSizes">smoothSizes</a>() and <a href="qfontdatabase.html#pointSizes">pointSizes</a>().</p>
<h3 class="fn"><a name="styles" />QStringList QFontDatabase.styles (<i>self</i>, QString <i>family</i>)</h3><p>Returns a list of the styles available for the font family
<i>family</i>. Some example styles: "Light", "Light Italic",
"Bold", "Oblique", "Demi". The list may be empty.</p>
<p><b>See also</b> <a href="qfontdatabase.html#families">families</a>().</p>
<h3 class="fn"><a name="styleString" />QString QFontDatabase.styleString (<i>self</i>, <a href="qfont.html">QFont</a> <i>font</i>)</h3><p>Returns a string that describes the style of the <i>font</i>.
For example, "Bold Italic", "Bold", "Italic" or "Normal". An empty
string may be returned.</p>
<h3 class="fn"><a name="styleString-2" />QString QFontDatabase.styleString (<i>self</i>, <a href="qfontinfo.html">QFontInfo</a> <i>fontInfo</i>)</h3><p>Returns a string that describes the style of the
<i>fontInfo</i>. For example, "Bold Italic", "Bold", "Italic" or
"Normal". An empty string may be returned.</p>
<h3 class="fn"><a name="supportsThreadedFontRendering" />bool QFontDatabase.supportsThreadedFontRendering ()</h3><p>Returns true if font rendering is supported outside the GUI
thread, false otherwise. In other words, a return value of false
means that all <a href="qpainter.html#drawText">QPainter.drawText</a>() calls outside the
GUI thread will not produce readable output.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="threads-modules.html#painting-in-threads">Painting In
Threads</a>.</p>
<h3 class="fn"><a name="weight" />int QFontDatabase.weight (<i>self</i>, QString <i>family</i>, QString <i>style</i>)</h3><p>Returns the weight of the font that has family <i>family</i> and
style <i>style</i>. If there is no such family and style
combination, returns -1.</p>
<p><b>See also</b> <a href="qfontdatabase.html#italic">italic</a>()
and <a href="qfontdatabase.html#bold">bold</a>().</p>
<h3 class="fn"><a name="writingSystemName" />QString QFontDatabase.writingSystemName (<a href="qfontdatabase.html#WritingSystem-enum">WritingSystem</a> <i>writingSystem</i>)</h3><p>Returns the names the <i>writingSystem</i> (e.g. for displaying
to the user in a dialog).</p>
<h3 class="fn"><a name="writingSystems" />list-of-QFontDatabase.WritingSystem QFontDatabase.writingSystems (<i>self</i>)</h3><p>Returns a sorted list of the available writing systems. This is
list generated from information about all installed fonts on the
system.</p>
<p><b>See also</b> <a href="qfontdatabase.html#families">families</a>().</p>
<h3 class="fn"><a name="writingSystems-2" />list-of-QFontDatabase.WritingSystem QFontDatabase.writingSystems (<i>self</i>, QString <i>family</i>)</h3><p>Returns a sorted list of the writing systems supported by a
given font <i>family</i>.</p>
<p><b>See also</b> <a href="qfontdatabase.html#families">families</a>().</p>
<h3 class="fn"><a name="writingSystemSample" />QString QFontDatabase.writingSystemSample (<a href="qfontdatabase.html#WritingSystem-enum">WritingSystem</a> <i>writingSystem</i>)</h3><p>Returns a string with sample characters from
<i>writingSystem</i>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.11.2 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://qt.digia.com">Digia</a> 2014</td><td align="right" width="25%">Qt 4.8.6</td></tr></table></div></address></body></html>
|