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
|
<!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: Font XML files.</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 class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Font XML files. </div> </div>
</div>
<div class="contents">
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Paul D Turner</dd></dl>
<p>Font files can define one of two types of font:</p>
<ul>
<li>A FreeType font, which is based upon standard font files - such as .ttf files - where glyphs get dynamically rendered to an internal cache as needed.</li>
<li>A Pixmap font, which is based on an Imageset that contains the predrawn bitmap representations of the character glyphs the font will render.</li>
</ul>
<p><br/>
</p>
<h2><a class="anchor" id="xml_font_overview"></a>
Overview</h2>
<p>The reference for each element is arranged into sections, as described below:</p>
<ul>
<li>Purpose:<ul>
<li>This section describes what the elements general purpose is within the specifications.</li>
</ul>
</li>
</ul>
<ul>
<li>Attributes:<ul>
<li>This section describes available attributes for the elements, and whether they are required or optional.</li>
</ul>
</li>
</ul>
<ul>
<li>Usage:<ul>
<li>Describes where the element may appear, whether the element may have sub-elements, and other important usage information.</li>
</ul>
</li>
</ul>
<ul>
<li>Examples:<ul>
<li>For many elements, this section will contain brief examples showing the element used in context.</li>
</ul>
</li>
</ul>
<p><br/>
</p>
<h2><a class="anchor" id="xml_font_font"></a>
<Font> Element</h2>
<ul>
<li>Purpose:<ul>
<li>The <Font> element is the root element in XML font definition files.</li>
</ul>
</li>
</ul>
<ul>
<li>Attributes:<ul>
<li><code>Type:</code> Specifies the type of font being defined. This should be one of the following values:<ul>
<li><code>FreeType:</code> Indicates a font based upon a standard font file (such as a true-type '.ttf' font).</li>
<li><code>Pixmap:</code> Indicates a font based upon an Imageset which defines Images for the font glyphs.</li>
</ul>
</li>
<li><code>Name:</code> Specifies the name that will be used to identify the Font within the <a class="el" href="namespaceCEGUI.html" title="Main namespace for Crazy Eddie's GUI Library.">CEGUI</a> system. Required attribute.</li>
<li><code>Filename:</code> Specifies the path to the associated resource for the font. Required attribute.<ul>
<li>For FreeType type fonts this should reference a standard font file loadable by the freetype2 library (such as a .ttf file, or similar).</li>
<li>For Pixmap type fonts this should reference an an Imageset.</li>
</ul>
</li>
<li><code>ResourceGroup:</code> Specifies the resource group identifier to pass to the ResourceProvider when loading the file given in the <code>Filename</code> attribute. For Pixmap type fonts, this may be the special value <code>"*"</code> to indicate the Imagseset specified in <code>Filename</code> is actually the name of an already loaded Imagesest rather than the name of an Imageset XMl file to be loaded. Optional attribute.</li>
<li><code>Size:</code> Specifies the point size for a FreeType type font. This is ignored for Pixmap type fonts. Optional attribute, default is 12.</li>
<li><code>AntiAlias:</code> Boolean attribute that states whether the font should be rendered anti-aliased. This setting only affects FreeType type fonts. Optional attribute, default is true.</li>
<li><code>AutoScaled:</code> Boolean attribute that states whether to scale imagery so it appears the same <em>physical</em> size at any resolution. The specified native resolution values indicate the resolution that will result in a one-to-one (i.e. unscaled) mapping from source to destination. At resolutions higher than the native, the imagery will be scaled <em>up</em> to take up more space, and at resolutions lower than the native, the imagery will be scaled <em>down</em> to take up less space. Optional attribute, default is false.</li>
<li><code>NativeHorzRes:</code> When AutoScaled is enabled, specifies the horizontal screen resolution that will result in an unscaled, one-to-one mapping of pixels from the source image to the destination surface. Optional attribute, default is 640.</li>
<li><code>NativeVertRes:</code> When AutoScaled is enabled, specifies the vertical screen resolution that will result in an unscaled, one-to-one mapping of pixels from the source image to the destination surface. Optional attribute, default is 480.</li>
<li><code>LineSpacing:</code> Specifies a line spacing value to be used in preference to what is extracted from the underlying font file (useful if the font file is made with a bad line spacing value). If set to zero, the value from the underlying font file is used instead. This setting only affects FreeType type fonts. Optional attribute, default is 0.</li>
</ul>
</li>
</ul>
<ul>
<li>Usage:<ul>
<li>The <Font> element is the root element for font files.</li>
<li>The <Font> element may contain any number of <Mapping> elements.</li>
<li>No element may contain a <Font> element as a sub-element.</li>
</ul>
</li>
</ul>
<ul>
<li>Examples:</li>
</ul>
<p><br/>
</p>
<h2><a class="anchor" id="xml_font_mapping"></a>
<Mapping> Element</h2>
<ul>
<li>Purpose:<ul>
<li>The <Mapping> element is used only with Pixmap type fonts and defines a mapping between a UTF32 codepoint value and an Image defined on the associated Imageset. A Mapping must be supplied for each codepoint that the font is to have available for rendering.</li>
</ul>
</li>
</ul>
<ul>
<li>Attributes:<ul>
<li><code>Codepoint:</code> Specifies the Unicode codepoint to produce a mapping for. Required attribute.</li>
<li><code>Image:</code> Specifies the name of the image to map to the codepoint specified in <code>Codepoint</code>. This named image must be defined for the Imageset identified in the <code>Filename</code> attribute of the containing <Font> element.</li>
<li><code>HorzAdvance:</code> Specifies a number of pixels to advance the 'pen' position after rendering the image specified in this mapping. A value of -1 will cause an appropriate value to be auto-calculated. Optional attribute, default is -1.</li>
</ul>
</li>
</ul>
<ul>
<li>Usage:<ul>
<li>The <Mapping> element may only appear as a sub-element of the <Font> element.</li>
<li>The <Mapping> element may not contain any sub-elements.</li>
</ul>
</li>
</ul>
<ul>
<li>Examples: </li>
</ul>
</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>
|