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 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Crazy Eddies GUI System: CEGUI::Font Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript">
function hasClass(ele,cls) {
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}
function addClass(ele,cls) {
if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}
function removeClass(ele,cls) {
if (hasClass(ele,cls)) {
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
ele.className=ele.className.replace(reg,' ');
}
}
function toggleVisibility(linkObj) {
var base = linkObj.getAttribute('id');
var summary = document.getElementById(base + '-summary');
var content = document.getElementById(base + '-content');
var trigger = document.getElementById(base + '-trigger');
if ( hasClass(linkObj,'closed') ) {
summary.style.display = 'none';
content.style.display = 'block';
trigger.src = 'open.png';
removeClass(linkObj,'closed');
addClass(linkObj,'opened');
} else if ( hasClass(linkObj,'opened') ) {
summary.style.display = 'block';
content.style.display = 'none';
trigger.src = 'closed.png';
removeClass(linkObj,'opened');
addClass(linkObj,'closed');
}
return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Crazy Eddies GUI System <span id="projectnumber">0.7.6</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceCEGUI.html">CEGUI</a> </li>
<li class="navelem"><a class="el" href="classCEGUI_1_1Font.html">Font</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> |
<a href="#pro-types">Protected Types</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="#pro-static-attribs">Static Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">CEGUI::Font Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="CEGUI::Font" --><!-- doxytag: inherits="CEGUI::PropertySet" -->
<p>Class that encapsulates a typeface.
<a href="classCEGUI_1_1Font.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png"/> Inheritance diagram for CEGUI::Font:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classCEGUI_1_1Font__inherit__graph.gif" border="0" usemap="#CEGUI_1_1Font_inherit__map" alt="Inheritance graph"/></div>
<map name="CEGUI_1_1Font_inherit__map" id="CEGUI_1_1Font_inherit__map">
<area shape="rect" id="node5" href="classCEGUI_1_1FreeTypeFont.html" title="Implementation of the Font class interface using the FreeType library." alt="" coords="5,160,160,189"/><area shape="rect" id="node2" href="classCEGUI_1_1PropertySet.html" title="Class that contains a collection of Property objects." alt="" coords="12,5,153,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-1-trigger" src="closed.png"/> Collaboration diagram for CEGUI::Font:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classCEGUI_1_1Font__coll__graph.gif" border="0" usemap="#CEGUI_1_1Font_coll__map" alt="Collaboration graph"/></div>
<map name="CEGUI_1_1Font_coll__map" id="CEGUI_1_1Font_coll__map">
<area shape="rect" id="node2" href="classCEGUI_1_1PropertySet.html" title="Class that contains a collection of Property objects." alt="" coords="21,85,163,115"/><area shape="rect" id="node4" href="classCEGUI_1_1PropertyReceiver.html" title="Dummy base class to ensure correct casting of receivers." alt="" coords="5,5,179,35"/><area shape="rect" id="node6" href="classCEGUI_1_1String.html" title="String class used within the GUI system." alt="" coords="187,85,293,115"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classCEGUI_1_1Font-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69b11ab30b252465ee7e9677f8055522"></a><!-- doxytag: member="CEGUI::Font::~Font" ref="a69b11ab30b252465ee7e9677f8055522" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a69b11ab30b252465ee7e9677f8055522">~Font</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa7428729c70e41efcb2e8fcabb80b2e2"></a><!-- doxytag: member="CEGUI::Font::getName" ref="aa7428729c70e41efcb2e8fcabb80b2e2" args="() const " -->
const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#aa7428729c70e41efcb2e8fcabb80b2e2">getName</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the string holding the font name. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33b5d5c9394170365acbd0b52f0054d4"></a><!-- doxytag: member="CEGUI::Font::getTypeName" ref="a33b5d5c9394170365acbd0b52f0054d4" args="() const " -->
const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a33b5d5c9394170365acbd0b52f0054d4">getTypeName</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the type of the font. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a28c1e8a5f868df284545633649e48d2a">isCodepointAvailable</a> (utf32 cp) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return whether this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> can draw the specified code-point. <a href="#a28c1e8a5f868df284545633649e48d2a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#acde2ac2eae1e6bf3a0310c34b18e8ed0">drawText</a> (<a class="el" href="classCEGUI_1_1GeometryBuffer.html">GeometryBuffer</a> &buffer, const <a class="el" href="classCEGUI_1_1String.html">String</a> &text, const <a class="el" href="classCEGUI_1_1Vector2.html">Vector2</a> &position, const <a class="el" href="classCEGUI_1_1Rect.html">Rect</a> *clip_rect, const <a class="el" href="classCEGUI_1_1ColourRect.html">ColourRect</a> &colours, const float space_extra=0.0f, const float x_scale=1.0f, const float y_scale=1.0f)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw text into a specified area of the display. <a href="#acde2ac2eae1e6bf3a0310c34b18e8ed0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a7a62732f19fae408954c2fcb6d8523b3">setNativeResolution</a> (const <a class="el" href="classCEGUI_1_1Size.html">Size</a> &size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the native resolution for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. <a href="#a7a62732f19fae408954c2fcb6d8523b3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCEGUI_1_1Size.html">Size</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a749aff93e901b76c5feba38a09bfba70">getNativeResolution</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the native display size for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. This is only relevant if the <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is being auto-scaled. <a href="#a749aff93e901b76c5feba38a09bfba70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ae7903c08e259ca0b0300671a1e43c537">setAutoScaled</a> (const bool auto_scaled)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enable or disable auto-scaling for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. <a href="#ae7903c08e259ca0b0300671a1e43c537"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a1e8aa019405add5f1830768ab8845ac2">isAutoScaled</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return whether this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is auto-scaled. <a href="#a1e8aa019405add5f1830768ab8845ac2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#adfad99cb009b4a4caf68e15a7a6592f6">notifyDisplaySizeChanged</a> (const <a class="el" href="classCEGUI_1_1Size.html">Size</a> &size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Notify the <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> that the display size may have changed. <a href="#adfad99cb009b4a4caf68e15a7a6592f6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a7eed3fc2a74643cffe7e3e8ab33c814d">getLineSpacing</a> (float y_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the pixel line spacing value for. <a href="#a7eed3fc2a74643cffe7e3e8ab33c814d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ae01a49e2d37aa6e5792af9a5cadc835d">getFontHeight</a> (float y_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">return the exact pixel height of the font. <a href="#ae01a49e2d37aa6e5792af9a5cadc835d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a62e64ecf6e22073ac7730dcd0bc6a747">getBaseline</a> (float y_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of pixels from the top of the highest glyph to the baseline. <a href="#a62e64ecf6e22073ac7730dcd0bc6a747"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a29398c3590af17fb58b3870939cdc2d7">getTextExtent</a> (const <a class="el" href="classCEGUI_1_1String.html">String</a> &text, float x_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the pixel width of the specified text if rendered with this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. <a href="#a29398c3590af17fb58b3870939cdc2d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a8242dd1e3e74c578831379405e227a31">getCharAtPixel</a> (const <a class="el" href="classCEGUI_1_1String.html">String</a> &text, float pixel, float x_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the index of the closest text character in <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em> that corresponds to pixel location <em>pixel</em> if the text were rendered. <a href="#a8242dd1e3e74c578831379405e227a31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a6e8c339633318929f569b2c95b0fbb46">getCharAtPixel</a> (const <a class="el" href="classCEGUI_1_1String.html">String</a> &text, size_t start_char, float pixel, float x_scale=1.0f) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the index of the closest text character in <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em>, starting at character index <em>start_char</em>, that corresponds to pixel location <em>pixel</em> if the text were to be rendered. <a href="#a6e8c339633318929f569b2c95b0fbb46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a832498f9137c31a8d444e54071712ff0">writeXMLToStream</a> (<a class="el" href="classCEGUI_1_1XMLSerializer.html">XMLSerializer</a> &xml_stream) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Writes an xml representation of this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> to <em>out_stream</em>. <a href="#a832498f9137c31a8d444e54071712ff0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classCEGUI_1_1FontGlyph.html">FontGlyph</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#afec0f187948eacefc71a05c6cc7d93fd">getGlyphData</a> (utf32 codepoint) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a pointer to the glyphDat struct for the given codepoint, or 0 if the codepoint does not have a glyph defined. <a href="#afec0f187948eacefc71a05c6cc7d93fd"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#aeacd6cb9b090f66544a17817207adb7f">setDefaultResourceGroup</a> (const <a class="el" href="classCEGUI_1_1String.html">String</a> &resourceGroup)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the default resource group to be used when loading font data. <a href="#aeacd6cb9b090f66544a17817207adb7f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ab247e8cdab4b74caf606d989786f4a2d">getDefaultResourceGroup</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the default resource group currently set for Fonts. <a href="#ab247e8cdab4b74caf606d989786f4a2d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a207da35fb7ddb61eb796d0170b703bfe"></a><!-- doxytag: member="CEGUI::Font::DefaultColour" ref="a207da35fb7ddb61eb796d0170b703bfe" args="" -->
static const <a class="el" href="namespaceCEGUI.html#a67e3e55e2e397221393cda1efd0d7c7e">argb_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a207da35fb7ddb61eb796d0170b703bfe">DefaultColour</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Colour value used whenever a colour is not specified. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c6681d4d9434fbc7f5934d8d1d3fbe9"></a><!-- doxytag: member="CEGUI::Font::CodepointMap" ref="a8c6681d4d9434fbc7f5934d8d1d3fbe9" args="" -->
typedef std::map< utf32, <br class="typebreak"/>
<a class="el" href="classCEGUI_1_1FontGlyph.html">FontGlyph</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a8c6681d4d9434fbc7f5934d8d1d3fbe9">CodepointMap</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Definition of CodepointMap type. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31e813705a99384afd5a25d0d71f5dae"></a><!-- doxytag: member="CEGUI::Font::Font" ref="a31e813705a99384afd5a25d0d71f5dae" args="(const String &name, const String &type_name, const String &filename, const String &resource_group, const bool auto_scaled, const float native_horz_res, const float native_vert_res)" -->
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a31e813705a99384afd5a25d0d71f5dae">Font</a> (const <a class="el" href="classCEGUI_1_1String.html">String</a> &name, const <a class="el" href="classCEGUI_1_1String.html">String</a> &type_name, const <a class="el" href="classCEGUI_1_1String.html">String</a> &filename, const <a class="el" href="classCEGUI_1_1String.html">String</a> &resource_group, const bool auto_scaled, const float native_horz_res, const float native_vert_res)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ab5c070e4e19850578c3fb557c732764e">rasterise</a> (utf32 start_codepoint, utf32 end_codepoint) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This function prepares a certain range of glyphs to be ready for displaying. This means that after returning from this function glyphs from d_cp_map[start_codepoint] to d_cp_map[end_codepoint] should have their d_image member set. If there is an error during rasterisation of some glyph, it's okay to leave the d_image field set to NULL, in which case such glyphs will be skipped from display. <a href="#ab5c070e4e19850578c3fb557c732764e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad63c52e08f1c7d1fa698c687be44fbef"></a><!-- doxytag: member="CEGUI::Font::updateFont" ref="ad63c52e08f1c7d1fa698c687be44fbef" args="()=0" -->
virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ad63c52e08f1c7d1fa698c687be44fbef">updateFont</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Update the font as needed, according to the current parameters. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89fc81bcebbf33390ebbf6a6cb55d78f"></a><!-- doxytag: member="CEGUI::Font::writeXMLToStream_impl" ref="a89fc81bcebbf33390ebbf6a6cb55d78f" args="(XMLSerializer &xml_stream) const =0" -->
virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a89fc81bcebbf33390ebbf6a6cb55d78f">writeXMLToStream_impl</a> (<a class="el" href="classCEGUI_1_1XMLSerializer.html">XMLSerializer</a> &xml_stream) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">implementaion version of writeXMLToStream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af68218eaf4ef4d10ebe181bfe39a77e1"></a><!-- doxytag: member="CEGUI::Font::addFontProperties" ref="af68218eaf4ef4d10ebe181bfe39a77e1" args="()" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#af68218eaf4ef4d10ebe181bfe39a77e1">addFontProperties</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register all properties of this class. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31b3df1bd2cc917a77d0cacde4a46ab5"></a><!-- doxytag: member="CEGUI::Font::setMaxCodepoint" ref="a31b3df1bd2cc917a77d0cacde4a46ab5" args="(utf32 codepoint)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a31b3df1bd2cc917a77d0cacde4a46ab5">setMaxCodepoint</a> (utf32 codepoint)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the maximal glyph index. This reserves the respective number of bits in the d_glyphPageLoaded array. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abee06c506208837d14d91f9dc9b91828"></a><!-- doxytag: member="CEGUI::Font::d_name" ref="abee06c506208837d14d91f9dc9b91828" args="" -->
<a class="el" href="classCEGUI_1_1String.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#abee06c506208837d14d91f9dc9b91828">d_name</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of this font. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4fe01b7187f886df9bac7c77b69bc2a3"></a><!-- doxytag: member="CEGUI::Font::d_type" ref="a4fe01b7187f886df9bac7c77b69bc2a3" args="" -->
<a class="el" href="classCEGUI_1_1String.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a4fe01b7187f886df9bac7c77b69bc2a3">d_type</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Type name string for this font (not used internally) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7024cf020257ee2371501d0cdeba401"></a><!-- doxytag: member="CEGUI::Font::d_filename" ref="ae7024cf020257ee2371501d0cdeba401" args="" -->
<a class="el" href="classCEGUI_1_1String.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ae7024cf020257ee2371501d0cdeba401">d_filename</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the file used to create this font (font file or imagset) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94864b32c027e6f23f52528067ac405d"></a><!-- doxytag: member="CEGUI::Font::d_resourceGroup" ref="a94864b32c027e6f23f52528067ac405d" args="" -->
<a class="el" href="classCEGUI_1_1String.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a94864b32c027e6f23f52528067ac405d">d_resourceGroup</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the font file's resource group. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeaee0329e945407b392e11de31f53222"></a><!-- doxytag: member="CEGUI::Font::d_ascender" ref="aeaee0329e945407b392e11de31f53222" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#aeaee0329e945407b392e11de31f53222">d_ascender</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">maximal font ascender (pixels above the baseline) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb8ea4a4d3554df2ee3adaccaf5a31e9"></a><!-- doxytag: member="CEGUI::Font::d_descender" ref="abb8ea4a4d3554df2ee3adaccaf5a31e9" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#abb8ea4a4d3554df2ee3adaccaf5a31e9">d_descender</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">maximal font descender (negative pixels below the baseline) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaec00ac7a272e1992bb73b04ca192a0"></a><!-- doxytag: member="CEGUI::Font::d_height" ref="acaec00ac7a272e1992bb73b04ca192a0" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#acaec00ac7a272e1992bb73b04ca192a0">d_height</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">(ascender - descender) + linegap <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aafe473ab610de164fccb6d3d5d06bc9a"></a><!-- doxytag: member="CEGUI::Font::d_autoScale" ref="aafe473ab610de164fccb6d3d5d06bc9a" args="" -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#aafe473ab610de164fccb6d3d5d06bc9a">d_autoScale</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">true when auto-scaling is enabled. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09814307a04e9831be1b89ab0f09a643"></a><!-- doxytag: member="CEGUI::Font::d_nativeHorzRes" ref="a09814307a04e9831be1b89ab0f09a643" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a09814307a04e9831be1b89ab0f09a643">d_nativeHorzRes</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">native horizontal resolution for this <a class="el" href="classCEGUI_1_1Imageset.html" title="Offers functions to define, access, and draw, a set of image components on a single graphical surface...">Imageset</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45d4df5db4a38200e6f909253a80969b"></a><!-- doxytag: member="CEGUI::Font::d_nativeVertRes" ref="a45d4df5db4a38200e6f909253a80969b" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a45d4df5db4a38200e6f909253a80969b">d_nativeVertRes</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">native vertical resolution for this <a class="el" href="classCEGUI_1_1Imageset.html" title="Offers functions to define, access, and draw, a set of image components on a single graphical surface...">Imageset</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a517fb5e7722be43840149ddfdca3a637"></a><!-- doxytag: member="CEGUI::Font::d_horzScaling" ref="a517fb5e7722be43840149ddfdca3a637" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a517fb5e7722be43840149ddfdca3a637">d_horzScaling</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">current horizontal scaling factor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e5ab18bb223bda50f8061f1520f9c52"></a><!-- doxytag: member="CEGUI::Font::d_vertScaling" ref="a1e5ab18bb223bda50f8061f1520f9c52" args="" -->
float </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a1e5ab18bb223bda50f8061f1520f9c52">d_vertScaling</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">current vertical scaling factor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af14f911ad6ddaba67ede2a6c20935053"></a><!-- doxytag: member="CEGUI::Font::d_maxCodepoint" ref="af14f911ad6ddaba67ede2a6c20935053" args="" -->
utf32 </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#af14f911ad6ddaba67ede2a6c20935053">d_maxCodepoint</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximal codepoint for font glyphs. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#ad252c8c32e94f99dc7cca8f4049d4464">d_glyphPageLoaded</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This bitmap holds information about loaded 'pages' of glyphs. A glyph page is a set of 256 codepoints, starting at 256-multiples. For example, the 1st glyph page is 0-255, fourth is 1024-1279 etc. When a specific glyph is required for painting, the corresponding bit is checked to see if the respective page has been rasterised. If not, the <a class="el" href="classCEGUI_1_1Font.html#ab5c070e4e19850578c3fb557c732764e" title="This function prepares a certain range of glyphs to be ready for displaying. This means that after re...">rasterise()</a> method is invoked, which prepares the glyphs from the respective glyph page for being painted. <a href="#ad252c8c32e94f99dc7cca8f4049d4464"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54d083c97f276a15a3c2c70afc589614"></a><!-- doxytag: member="CEGUI::Font::d_cp_map" ref="a54d083c97f276a15a3c2c70afc589614" args="" -->
<a class="el" href="classCEGUI_1_1Font.html#a8c6681d4d9434fbc7f5934d8d1d3fbe9">CodepointMap</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#a54d083c97f276a15a3c2c70afc589614">d_cp_map</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Contains mappings from code points to <a class="el" href="classCEGUI_1_1Image.html" title="Class that represents a single Image of an Imageset.">Image</a> objects. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa219ac7ac81369c8acc112dbbf1bc5eb"></a><!-- doxytag: member="CEGUI::Font::d_defaultResourceGroup" ref="aa219ac7ac81369c8acc112dbbf1bc5eb" args="" -->
static <a class="el" href="classCEGUI_1_1String.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCEGUI_1_1Font.html#aa219ac7ac81369c8acc112dbbf1bc5eb">d_defaultResourceGroup</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Holds default resource group for font loading. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class that encapsulates a typeface. </p>
<p>A <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> object is created for each unique typeface required. The <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> class provides methods for loading typefaces from various sources, and then for outputting text via the <a class="el" href="classCEGUI_1_1Renderer.html" title="Abstract class defining the basic required interface for Renderer objects.">Renderer</a> object.</p>
<p>This class is not specific to any font renderer, it just provides the basic interfaces needed to manage fonts. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acde2ac2eae1e6bf3a0310c34b18e8ed0"></a><!-- doxytag: member="CEGUI::Font::drawText" ref="acde2ac2eae1e6bf3a0310c34b18e8ed0" args="(GeometryBuffer &buffer, const String &text, const Vector2 &position, const Rect *clip_rect, const ColourRect &colours, const float space_extra=0.0f, const float x_scale=1.0f, const float y_scale=1.0f)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CEGUI::Font::drawText </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classCEGUI_1_1GeometryBuffer.html">GeometryBuffer</a> & </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1Vector2.html">Vector2</a> & </td>
<td class="paramname"><em>position</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1Rect.html">Rect</a> * </td>
<td class="paramname"><em>clip_rect</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1ColourRect.html">ColourRect</a> & </td>
<td class="paramname"><em>colours</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"><em>space_extra</em> = <code>0.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"><em>x_scale</em> = <code>1.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"><em>y_scale</em> = <code>1.0f</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Draw text into a specified area of the display. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td><a class="el" href="classCEGUI_1_1GeometryBuffer.html" title="Abstract class defining the interface for objects that buffer geometry for later rendering.">GeometryBuffer</a> object where the geometry for the text be queued.</td></tr>
<tr><td class="paramname">text</td><td><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> object containing the text to be drawn.</td></tr>
<tr><td class="paramname">position</td><td>Reference to a <a class="el" href="classCEGUI_1_1Vector2.html" title="Class used as a two dimensional vector (aka a Point)">Vector2</a> object describing the location at which the text is to be drawn.</td></tr>
<tr><td class="paramname">clip_rect</td><td><a class="el" href="classCEGUI_1_1Rect.html" title="Class encapsulating operations on a Rectangle.">Rect</a> object describing the clipping area for the drawing. No drawing will occur outside this <a class="el" href="classCEGUI_1_1Rect.html" title="Class encapsulating operations on a Rectangle.">Rect</a>.</td></tr>
<tr><td class="paramname">colours</td><td><a class="el" href="classCEGUI_1_1ColourRect.html" title="Class that holds details of colours for the four corners of a rectangle.">ColourRect</a> object describing the colours to be applied when drawing the text. NB: The colours specified in here are applied to each glyph, rather than the text as a whole.</td></tr>
<tr><td class="paramname">space_extra</td><td>Number of additional pixels of spacing to be added to space characters.</td></tr>
<tr><td class="paramname">x_scale</td><td>Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'.</td></tr>
<tr><td class="paramname">y_scale</td><td>Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing. </dd></dl>
</div>
</div>
<a class="anchor" id="a62e64ecf6e22073ac7730dcd0bc6a747"></a><!-- doxytag: member="CEGUI::Font::getBaseline" ref="a62e64ecf6e22073ac7730dcd0bc6a747" args="(float y_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float CEGUI::Font::getBaseline </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_scale</em> = <code>1.0f</code></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the number of pixels from the top of the highest glyph to the baseline. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">y_scale</td><td>Scaling factor to be applied to the baseline distance, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pixel spacing from top of front glyphs to baseline </dd></dl>
</div>
</div>
<a class="anchor" id="a8242dd1e3e74c578831379405e227a31"></a><!-- doxytag: member="CEGUI::Font::getCharAtPixel" ref="a8242dd1e3e74c578831379405e227a31" args="(const String &text, float pixel, float x_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t CEGUI::Font::getCharAtPixel </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>pixel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>x_scale</em> = <code>1.0f</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the index of the closest text character in <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em> that corresponds to pixel location <em>pixel</em> if the text were rendered. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> object containing the text.</td></tr>
<tr><td class="paramname">pixel</td><td>Specifies the (horizontal) pixel offset to return the character index for.</td></tr>
<tr><td class="paramname">x_scale</td><td>Scaling factor to be applied to each glyph's x axis when measuring the text extent, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a character index into <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em> for the character that would be rendered closest to horizontal pixel offset <em>pixel</em> if the text were to be rendered via this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. Range of the return is from 0 to text.length(), so may actually return an index past the end of the string, which indicates <em>pixel</em> was beyond the last character. </dd></dl>
<p>References <a class="el" href="classCEGUI_1_1Font.html#a8242dd1e3e74c578831379405e227a31">getCharAtPixel()</a>.</p>
<p>Referenced by <a class="el" href="classCEGUI_1_1Font.html#a8242dd1e3e74c578831379405e227a31">getCharAtPixel()</a>.</p>
</div>
</div>
<a class="anchor" id="a6e8c339633318929f569b2c95b0fbb46"></a><!-- doxytag: member="CEGUI::Font::getCharAtPixel" ref="a6e8c339633318929f569b2c95b0fbb46" args="(const String &text, size_t start_char, float pixel, float x_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t CEGUI::Font::getCharAtPixel </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>start_char</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>pixel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>x_scale</em> = <code>1.0f</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the index of the closest text character in <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em>, starting at character index <em>start_char</em>, that corresponds to pixel location <em>pixel</em> if the text were to be rendered. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> object containing the text.</td></tr>
<tr><td class="paramname">start_char</td><td>index of the first character to consider. This is the lowest value that will be returned from the call.</td></tr>
<tr><td class="paramname">pixel</td><td>Specifies the (horizontal) pixel offset to return the character index for.</td></tr>
<tr><td class="paramname">x_scale</td><td>Scaling factor to be applied to each glyph's x axis when measuring the text extent, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a character index into <a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> <em>text</em> for the character that would be rendered closest to horizontal pixel offset <em>pixel</em> if the text were to be rendered via this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. Range of the return is from 0 to text.length(), so may actually return an index past the end of the string, which indicates <em>pixel</em> was beyond the last character. </dd></dl>
</div>
</div>
<a class="anchor" id="ab247e8cdab4b74caf606d989786f4a2d"></a><!-- doxytag: member="CEGUI::Font::getDefaultResourceGroup" ref="ab247e8cdab4b74caf606d989786f4a2d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static const <a class="el" href="classCEGUI_1_1String.html">String</a>& CEGUI::Font::getDefaultResourceGroup </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the default resource group currently set for Fonts. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> describing the default resource group identifier that will be used when loading font data. </dd></dl>
</div>
</div>
<a class="anchor" id="ae01a49e2d37aa6e5792af9a5cadc835d"></a><!-- doxytag: member="CEGUI::Font::getFontHeight" ref="ae01a49e2d37aa6e5792af9a5cadc835d" args="(float y_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float CEGUI::Font::getFontHeight </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_scale</em> = <code>1.0f</code></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>return the exact pixel height of the font. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">y_scale</td><td>Scaling factor to be applied to the height, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>float value describing the pixel height of the font without any additional padding. </dd></dl>
</div>
</div>
<a class="anchor" id="afec0f187948eacefc71a05c6cc7d93fd"></a><!-- doxytag: member="CEGUI::Font::getGlyphData" ref="afec0f187948eacefc71a05c6cc7d93fd" args="(utf32 codepoint) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classCEGUI_1_1FontGlyph.html">FontGlyph</a>* CEGUI::Font::getGlyphData </td>
<td>(</td>
<td class="paramtype">utf32 </td>
<td class="paramname"><em>codepoint</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return a pointer to the glyphDat struct for the given codepoint, or 0 if the codepoint does not have a glyph defined. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">codepoint</td><td>utf32 codepoint to return the glyphDat structure for.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the glyphDat struct for <em>codepoint</em>, or 0 if no glyph is defined for <em>codepoint</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="a7eed3fc2a74643cffe7e3e8ab33c814d"></a><!-- doxytag: member="CEGUI::Font::getLineSpacing" ref="a7eed3fc2a74643cffe7e3e8ab33c814d" args="(float y_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float CEGUI::Font::getLineSpacing </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>y_scale</em> = <code>1.0f</code></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the pixel line spacing value for. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">y_scale</td><td>Scaling factor to be applied to the line spacing, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of pixels between vertical base lines, i.e. The minimum pixel space between two lines of text. </dd></dl>
</div>
</div>
<a class="anchor" id="a749aff93e901b76c5feba38a09bfba70"></a><!-- doxytag: member="CEGUI::Font::getNativeResolution" ref="a749aff93e901b76c5feba38a09bfba70" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classCEGUI_1_1Size.html">Size</a> CEGUI::Font::getNativeResolution </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the native display size for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. This is only relevant if the <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is being auto-scaled. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classCEGUI_1_1Size.html" title="Class that holds the size (width & height) of something.">Size</a> object describing the native display size for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a29398c3590af17fb58b3870939cdc2d7"></a><!-- doxytag: member="CEGUI::Font::getTextExtent" ref="a29398c3590af17fb58b3870939cdc2d7" args="(const String &text, float x_scale=1.0f) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float CEGUI::Font::getTextExtent </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>x_scale</em> = <code>1.0f</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the pixel width of the specified text if rendered with this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> object containing the text to return the rendered pixel width for.</td></tr>
<tr><td class="paramname">x_scale</td><td>Scaling factor to be applied to each glyph's x axis when measuring the extent, where 1.0f is considered to be 'normal'.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of pixels that <em>text</em> will occupy when rendered with this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a1e8aa019405add5f1830768ab8845ac2"></a><!-- doxytag: member="CEGUI::Font::isAutoScaled" ref="a1e8aa019405add5f1830768ab8845ac2" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool CEGUI::Font::isAutoScaled </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return whether this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is auto-scaled. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
<li>true if <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is auto-scaled.</li>
<li>false if <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> is not auto-scaled. </li>
</ul>
</dd></dl>
</div>
</div>
<a class="anchor" id="a28c1e8a5f868df284545633649e48d2a"></a><!-- doxytag: member="CEGUI::Font::isCodepointAvailable" ref="a28c1e8a5f868df284545633649e48d2a" args="(utf32 cp) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool CEGUI::Font::isCodepointAvailable </td>
<td>(</td>
<td class="paramtype">utf32 </td>
<td class="paramname"><em>cp</em></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return whether this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> can draw the specified code-point. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">cp</td><td>utf32 code point that is the subject of the query.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the font contains a mapping for code point <em>cp</em>, false if it does not contain a mapping for <em>cp</em>. </dd></dl>
</div>
</div>
<a class="anchor" id="adfad99cb009b4a4caf68e15a7a6592f6"></a><!-- doxytag: member="CEGUI::Font::notifyDisplaySizeChanged" ref="adfad99cb009b4a4caf68e15a7a6592f6" args="(const Size &size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void CEGUI::Font::notifyDisplaySizeChanged </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1Size.html">Size</a> & </td>
<td class="paramname"><em>size</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Notify the <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> that the display size may have changed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td><a class="el" href="classCEGUI_1_1Size.html" title="Class that holds the size (width & height) of something.">Size</a> object describing the display resolution </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab5c070e4e19850578c3fb557c732764e"></a><!-- doxytag: member="CEGUI::Font::rasterise" ref="ab5c070e4e19850578c3fb557c732764e" args="(utf32 start_codepoint, utf32 end_codepoint) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void CEGUI::Font::rasterise </td>
<td>(</td>
<td class="paramtype">utf32 </td>
<td class="paramname"><em>start_codepoint</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">utf32 </td>
<td class="paramname"><em>end_codepoint</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const<code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This function prepares a certain range of glyphs to be ready for displaying. This means that after returning from this function glyphs from d_cp_map[start_codepoint] to d_cp_map[end_codepoint] should have their d_image member set. If there is an error during rasterisation of some glyph, it's okay to leave the d_image field set to NULL, in which case such glyphs will be skipped from display. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">start_codepoint</td><td>The lowest codepoint that should be rasterised </td></tr>
<tr><td class="paramname">end_codepoint</td><td>The highest codepoint that should be rasterised </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="classCEGUI_1_1FreeTypeFont.html#a4f7169bf962ba04b906afe02d74dae5c">CEGUI::FreeTypeFont</a>.</p>
</div>
</div>
<a class="anchor" id="ae7903c08e259ca0b0300671a1e43c537"></a><!-- doxytag: member="CEGUI::Font::setAutoScaled" ref="ae7903c08e259ca0b0300671a1e43c537" args="(const bool auto_scaled)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CEGUI::Font::setAutoScaled </td>
<td>(</td>
<td class="paramtype">const bool </td>
<td class="paramname"><em>auto_scaled</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable or disable auto-scaling for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">auto_scaled</td><td><ul>
<li>true to enable auto-scaling.</li>
<li>false to disable auto-scaling. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aeacd6cb9b090f66544a17817207adb7f"></a><!-- doxytag: member="CEGUI::Font::setDefaultResourceGroup" ref="aeacd6cb9b090f66544a17817207adb7f" args="(const String &resourceGroup)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void CEGUI::Font::setDefaultResourceGroup </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1String.html">String</a> & </td>
<td class="paramname"><em>resourceGroup</em></td><td>)</td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the default resource group to be used when loading font data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">resourceGroup</td><td><a class="el" href="classCEGUI_1_1String.html" title="String class used within the GUI system.">String</a> describing the default resource group identifier to be used.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing. </dd></dl>
</div>
</div>
<a class="anchor" id="a7a62732f19fae408954c2fcb6d8523b3"></a><!-- doxytag: member="CEGUI::Font::setNativeResolution" ref="a7a62732f19fae408954c2fcb6d8523b3" args="(const Size &size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CEGUI::Font::setNativeResolution </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classCEGUI_1_1Size.html">Size</a> & </td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the native resolution for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td><a class="el" href="classCEGUI_1_1Size.html" title="Class that holds the size (width & height) of something.">Size</a> object describing the new native screen resolution for this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a832498f9137c31a8d444e54071712ff0"></a><!-- doxytag: member="CEGUI::Font::writeXMLToStream" ref="a832498f9137c31a8d444e54071712ff0" args="(XMLSerializer &xml_stream) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CEGUI::Font::writeXMLToStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classCEGUI_1_1XMLSerializer.html">XMLSerializer</a> & </td>
<td class="paramname"><em>xml_stream</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes an xml representation of this <a class="el" href="classCEGUI_1_1Font.html" title="Class that encapsulates a typeface.">Font</a> to <em>out_stream</em>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">xml_stream</td><td>Stream where xml data should be output.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing. </dd></dl>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ad252c8c32e94f99dc7cca8f4049d4464"></a><!-- doxytag: member="CEGUI::Font::d_glyphPageLoaded" ref="ad252c8c32e94f99dc7cca8f4049d4464" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint* <a class="el" href="classCEGUI_1_1Font.html#ad252c8c32e94f99dc7cca8f4049d4464">CEGUI::Font::d_glyphPageLoaded</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This bitmap holds information about loaded 'pages' of glyphs. A glyph page is a set of 256 codepoints, starting at 256-multiples. For example, the 1st glyph page is 0-255, fourth is 1024-1279 etc. When a specific glyph is required for painting, the corresponding bit is checked to see if the respective page has been rasterised. If not, the <a class="el" href="classCEGUI_1_1Font.html#ab5c070e4e19850578c3fb557c732764e" title="This function prepares a certain range of glyphs to be ready for displaying. This means that after re...">rasterise()</a> method is invoked, which prepares the glyphs from the respective glyph page for being painted. </p>
<p>This array is big enough to hold at least max_codepoint bits. If this member is NULL, all glyphs are considered pre-rasterised. </p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Jan 22 2012 16:07:40 for Crazy Eddies GUI System by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|