<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GhostWire Studios &#187; Fonts</title>
	<atom:link href="http://www.ghostwire.com/blog/archives/tag/fonts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghostwire.com/blog</link>
	<description>Flash UI Components</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:51:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Small Caps Fonts</title>
		<link>http://www.ghostwire.com/blog/archives/small-caps-fonts/</link>
		<comments>http://www.ghostwire.com/blog/archives/small-caps-fonts/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 11:29:44 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://www.ghostwire.com/blog/?p=1694</guid>
		<description><![CDATA[In typography, &#8220;small caps&#8221; refer to uppercase (capital) characters used in-lieu of lowercase (small) characters, where these uppercase characters are set at the same height as the lowercase characters. Small caps are typically used for titles, headlines, column headings, etc. They are also good for any text that you would usually use all capitals. This [...]]]></description>
			<content:encoded><![CDATA[<p>In typography, &#8220;small caps&#8221; refer to uppercase (capital) characters used in-lieu of lowercase (small) characters, where these uppercase characters are set at the same height as the lowercase characters.</p>
<p>Small caps are typically used for titles, headlines, column headings, etc.  They are also good for any text that you would usually use all capitals.  This is because the use of small caps makes the run of capital letters seem less jarring, and would also often require less space than all caps.</p>
<p>While many word processors and text formatting systems include an option to format text in small caps (which leaves uppercase letters as they are but converts lowercase letters to small caps), this is a feature that is lacking in most graphics editing software.</p>
<p>Some fonts have inherent small caps, ie they use smaller capital letters in place of the lowercase characters.  These fonts are useful when you wish to use small caps to bring distinction to your designs.</p>
<p>Here are some fonts with inherent small caps:</p>
<p><span id="more-1694"></span>The sample text used is:<br />
&#8220;The Quick Brown Fox Jumps Over The Lazy Fox&#8221;</p>
<ul>
<p><!-- --></p>
<li><strong>Berlin Small Caps</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r16_c6.png" alt="Berlin Small Caps" title="Berlin Small Caps" width="317" height="33" class="alignleft size-full wp-image-1703" /></li>
</li>
<p><!-- --></p>
<li><strong>Copperplate Gothic Bold</strong><br />
<img class="size-full wp-image-1695 alignleft" title="Copperplate Gothic Bold" src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r2_c2.png" alt="Copperplate Gothic Bold" width="439" height="30" />
</li>
<p><!-- --></p>
<li><strong>Copperplate Gothic Light</strong><br />
<img class="alignleft size-full wp-image-1696" title="Copperplate Gothic Light" src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r4_c2.png" alt="Copperplate Gothic Light" width="424" height="29" />
</li>
<p><!-- --></p>
<li><strong>Lithos Pro Regular</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r6_c4.png" alt="Lithos Pro Regular" title="Lithos Pro Regular" width="434" height="29" class="alignleft size-full wp-image-1698" />
</li>
<p><!-- --></p>
<li><strong>Orator Std</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r8_c3.png" alt="Orator Std" title="Orator Std" width="457" height="28" class="alignleft size-full wp-image-1699" />
</li>
<p><!-- --></p>
<li><strong>Trajan Pro</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r10_c5.png" alt="Trajan Pro" title="Trajan Pro" width="456" height="33" class="alignleft size-full wp-image-1700" />
</li>
<p><!-- --></p>
<li><strong>Pericles</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r12_c8.png" alt="Pericles" title="Pericles" width="436" height="32" class="alignleft size-full wp-image-1701" />
</li>
<p><!-- --></p>
<li><strong>Pericles Light</strong><br />
<img src="http://www.ghostwire.com/blog/wp-content/uploads/smallcaps_r14_c7.png" alt="Pericles Light" title="Pericles Light" width="427" height="32" class="alignleft size-full wp-image-1702" /></p>
</ul>
<p><!-- --><br />
Please feel free to leave a comment to mention any other small caps font(s) not listed above.</p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/small-caps-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[AS3] Drawing Outline on Text Glyphs</title>
		<link>http://www.ghostwire.com/blog/archives/as3-drawing-outline-on-text-glyphs/</link>
		<comments>http://www.ghostwire.com/blog/archives/as3-drawing-outline-on-text-glyphs/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 09:20:51 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash AS3]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=429</guid>
		<description><![CDATA[Here is how you can draw an outline on text glyphs during run-time via ActionScript. This method works with embedded as well as non-embedded fonts. First, set up the TextField: // ActionScript 3.0 var txt:TextField = new TextField&#40;&#41;; // new TextFormat(font, size, color) txt.defaultTextFormat = new TextFormat&#40;&#34;DejaVu Sans&#34;, 21, 0xFFFFFF&#41;; txt.antiAliasType = AntiAliasType.ADVANCED; txt.autoSize = [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how you can draw an outline on text glyphs during run-time via ActionScript. This method works with embedded as well as non-embedded fonts.</p>
<p><span id="more-429"></span><br />
First, set up the TextField:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// ActionScript 3.0</span>
<span style="color: #000000; font-weight: bold;">var</span> txt:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// new TextFormat(font, size, color)</span>
txt.<span style="color: #006600;">defaultTextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, <span style="color: #cc66cc;">21</span>, 0xFFFFFF<span style="color: #66cc66;">&#41;</span>;
txt.<span style="color: #006600;">antiAliasType</span> = AntiAliasType.<span style="color: #006600;">ADVANCED</span>;
txt.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
txt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
txt.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">5</span>;
txt.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">5</span>;
addChild<span style="color: #66cc66;">&#40;</span>txt<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><!-- --><br />
<strong>Drawing The Outline</strong><br />
To draw an outline around the text glyphs, use the <code>flash.filters.GlowFilter</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// new GlowFilter(color, alpha, blurX, blurY, strength)</span>
txt.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> GlowFilter<span style="color: #66cc66;">&#40;</span>0x000000, <span style="color: #cc66cc;">1.0</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>;</pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/outlinetext_4.png" alt="outline text weight 4" title="outline text weight 4" width="596" height="96" class="alignleft size-full wp-image-433" /></p>
<p><!-- --><br />
<strong>Adjusting The Outline Thickness</strong><br />
To thicken the outline, increase the values for &#8220;blurX&#8221;, &#8220;blurY&#8221; and &#8220;strength&#8221;.  The value of &#8220;blurX&#8221;/&#8221;blurY&#8221; should be the same.  You can try various values to suit your needs, but the value of &#8220;strength&#8221; should be kept at double that of &#8220;blurX&#8221;/&#8221;blurY&#8221;.  For example, if I were to use value of 4 for &#8220;blurX&#8221;/&#8221;blurY&#8221;, I would set &#8220;strength&#8221; as 8.  Setting &#8220;strength&#8221; too low will cause blurring to be visible; setting it excessively high and the outline may become distorted.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// new GlowFilter(color, alpha, blurX, blurY, strength)</span>
txt.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> GlowFilter<span style="color: #66cc66;">&#40;</span>0x000000, <span style="color: #cc66cc;">1.0</span>, <span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>;</pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/outlinetext_8.png" alt="outline text weight 8" title="outline text weight 8" width="596" height="96" class="alignleft size-full wp-image-432" /></p>
<p><!-- --><br />
<strong>Aspire UI</strong><br />
If you are using the <a href="http://www.ghostwire.com/aspireui/download/">Aspire UI library</a>, this feature is already built-in via the <code>uiTextStyles</code> manager:<br />
<a href="http://ghostwire.com/aspireui/docs/textstyles/outline-and-shadow">http://ghostwire.com/aspireui/docs/textstyles/outline-and-shadow</a><br />
The &#8220;outlineWeight&#8221; text style property (v1.2.2+) determines the thickness of the outline.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/as3-drawing-outline-on-text-glyphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using uiTextStyles: Drawing Outline on Text Glyphs</title>
		<link>http://www.ghostwire.com/blog/archives/using-uitextstyles-drawing-outline-on-text-glyphs/</link>
		<comments>http://www.ghostwire.com/blog/archives/using-uitextstyles-drawing-outline-on-text-glyphs/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 13:42:47 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Aspire UI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=528</guid>
		<description><![CDATA[Drawing outlines on text glyphs can help to give the text emphasis, or simply make it more legible or visible. This type of text rendering is commonly seen in video subtitles. When using the Aspire UI AS3 library, if you need to draw outlines on text glyphs in uiText instances, you can do so by [...]]]></description>
			<content:encoded><![CDATA[<p>Drawing outlines on text glyphs can help to give the text emphasis, or simply make it more legible or visible.  This type of text rendering is commonly seen in video subtitles.</p>
<p>When using the <a href="/aspireui/">Aspire UI AS3 library</a>, if you need to draw outlines on text glyphs in uiText instances, you can do so by defining the &#8220;outline&#8221; property when defining your text style(s).  This feature works with both embedded as well as non-embedded fonts.</p>
<p><span id="more-528"></span><br />
<strong>outline</strong><br />
Set up the text style via the uiTextStyles manager:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// ActionScript 3.0</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;demo&quot;</span>, <span style="color: #66cc66;">&#123;</span> fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontSize:<span style="color: #cc66cc;">21</span>, <span style="color: #0066CC;">color</span>:<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>, outline:<span style="color: #ff0000;">&quot;#000000&quot;</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Place the uiText instance:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// ActionScript 3.0</span>
<span style="color: #000000; font-weight: bold;">var</span> txt:uiText = <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
txt.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;demo&quot;</span>; <span style="color: #808080; font-style: italic;">// assign &quot;demo&quot; text style</span>
txt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
txt.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span>,<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>txt<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/outlinetext_4.png" alt="outline text weight 4" title="outline text weight 4" width="596" height="96" class="alignleft size-full wp-image-433" /></p>
<p><!-- --><br />
<strong>outlineWeight</strong><br />
To adjust the thickness of the outline, you can specify the &#8220;outlineWeight&#8221; property (v1.2.2+). The default value for &#8220;outlineWeight&#8221; is 4. Specify a larger number for a thicker outline.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// ActionScript 3.0</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;demo&quot;</span>, <span style="color: #66cc66;">&#123;</span> fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontSize:<span style="color: #cc66cc;">21</span>, <span style="color: #0066CC;">color</span>:<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>, outline:<span style="color: #ff0000;">&quot;#000000&quot;</span>, outlineWeight:<span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/outlinetext_8.png" alt="outline text weight 8" title="outline text weight 8" width="596" height="96" class="alignleft size-full wp-image-432" /></p>
<p>Try different values and see what works for the kind of look you want to achieve. Use values proportional to the font size. Obviously, if you are using a small font size, don&#8217;t specify a huge number for &#8220;outlineWeight&#8221;. One important thing to take note of is that this outline will not be taken into account when computing the uiText instance&#8217;s preferred size and a thick outline may therefore fall outside the bounds of its allocated space (can be rectified by giving the instance some <a href="http://ghostwire.com/aspireui/docs/layout/margin-and-padding">&#8220;margin&#8221;</a>).</p>
<p><!-- --><br />
<strong>CSS</strong><br />
Instead of hard-coding text styles via ActionScript, you may also define the style in CSS (text.css in the theme folder):</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">demo
<span style="color: #00AA00;">&#123;</span>
	fontFamily<span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span><span style="color: #00AA00;">;</span>
	fontSize<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">21</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;#000000&quot;</span><span style="color: #00AA00;">;</span>
	outlineWeight<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">8</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><!-- --><br />
<strong>Aspire UI Components</strong><br />
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework. You may experiment with the various features by <a href="/aspireui/download/">downloading a trial version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/using-uitextstyles-drawing-outline-on-text-glyphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode Character Charts By Script</title>
		<link>http://www.ghostwire.com/blog/archives/unicode-character-charts-by-script/</link>
		<comments>http://www.ghostwire.com/blog/archives/unicode-character-charts-by-script/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 08:09:29 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Embedded Fonts]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=530</guid>
		<description><![CDATA[If you often embed fonts for use in Flash/Flex and needs to specify &#8220;unicodeRange&#8221; in the [Embed] meta tag, the following site gives you the unicode tables for the various character glyphs: http://unicode.org/charts/ For example, if you need to embed Thai characters, you can look up &#8220;Thai&#8221; under &#8220;South East Asian&#8221; on that website &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>If you often embed fonts for use in Flash/Flex and needs to specify &#8220;unicodeRange&#8221; in the [Embed] meta tag, the following site gives you the unicode tables for the various character glyphs:</p>
<p><span id="more-530"></span><a href="http://unicode.org/charts/">http://unicode.org/charts/</a></p>
<p>For example, if you need to embed Thai characters, you can look up &#8220;Thai&#8221; under &#8220;South East Asian&#8221; on that website &#8211; it will give you a PDF document, have a peek inside and you will see that Thai characters are in the range &#8220;U+0E00-U+0E7F&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,
unicodeRange=<span style="color: #ff0000;">&quot;U+0E00-U+0E7F&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const REGULAR:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

<p><strong>Note</strong><br />
The font you are embedding must of course contain the respective glyphs in the specified unicode range(s).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/unicode-character-charts-by-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[AS3] Embossed and Engraved Text Effects (Embedded Fonts)</title>
		<link>http://www.ghostwire.com/blog/archives/as3-embossed-and-engraved-text-effects-embedded-fonts/</link>
		<comments>http://www.ghostwire.com/blog/archives/as3-embossed-and-engraved-text-effects-embedded-fonts/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 06:45:02 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash AS3]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Embedded Fonts]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=368</guid>
		<description><![CDATA[Here is how to apply embossed (and engraved) text effect during run-time easily using ActionScript. This works only when the TextField instance is using embedded font and its antiAliasType property is set to AntiAliasType.ADVANCED. Set up the TextField: // ActionScript 3.0 var txt:TextField = new TextField&#40;&#41;; // new TextFormat(font, size, color, bold) txt.defaultTextFormat = new [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how to apply embossed (and engraved) text effect during run-time easily using ActionScript.  This works only when the TextField instance is using embedded font and its antiAliasType property is set to AntiAliasType.ADVANCED.</p>
<p><span id="more-368"></span><br />
Set up the TextField:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// ActionScript 3.0</span>
<span style="color: #000000; font-weight: bold;">var</span> txt:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// new TextFormat(font, size, color, bold)</span>
txt.<span style="color: #006600;">defaultTextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, <span style="color: #cc66cc;">21</span>, 0x000000, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
txt.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>; <span style="color: #808080; font-style: italic;">// the font must be embedded</span>
txt.<span style="color: #006600;">antiAliasType</span> = AntiAliasType.<span style="color: #006600;">ADVANCED</span>;
txt.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
txt.<span style="color: #0066CC;">selectable</span> = <span style="color: #000000; font-weight: bold;">false</span>;
txt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
txt.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">5</span>;
txt.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">5</span>;
addChild<span style="color: #66cc66;">&#40;</span>txt<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>Embossed Text</strong><br />
To apply an embossed text effect, use the flash.filters.BevelFilter:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">txt.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> BevelFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1.5</span>, <span style="color: #cc66cc;">45</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #808080; font-style: italic;">// distance, angle</span></pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/embossedtext1.png" alt="embossed text" title="embossed text" width="596" height="96" class="alignnone size-full wp-image-389" /></p>
<p><strong>Engraved Text</strong><br />
To apply an engraved text effect, ie having the text look like it is etched into the surface, rotate the bevel angle by 180 degrees:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">txt.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> BevelFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1.5</span>, <span style="color: #cc66cc;">225</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #808080; font-style: italic;">// distance, angle</span></pre></div></div>

<p><img src="http://ghostwire.com/blog/wp-content/uploads/engravedtext1.png" alt="engraved text" title="engraved text" width="596" height="96" class="alignnone size-full wp-image-390" /></p>
<p>The first parameter of the BevelFilter is the bevel distance &#8211; you can try various values, but I have found 1.5 to work well for most font sizes, to give the text a subtle yet visible embossed/engraved look.</p>
<p>Do bear in mind that in order for the effects to be visible, there must be reasonable amount of painted area on the text glyphs. If you use a small, thin font, then the effects are not going to be very visible. On the other hand, using a large, bold font is going make the effect more obvious.</p>
<p>If you are going to use the same filter(s) in multiple places, consider placing the filter(s) in a constant:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> const embossFilter:BevelFilter = <span style="color: #000000; font-weight: bold;">new</span> BevelFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1.5</span>, <span style="color: #cc66cc;">45</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">private</span> const engraveFilter:BevelFilter = <span style="color: #000000; font-weight: bold;">new</span> BevelFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1.5</span>, <span style="color: #cc66cc;">225</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>You can then apply the filter as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">txt.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span>embossFilter<span style="color: #66cc66;">&#93;</span>;</pre></div></div>

<p>NOTE:<br />
Notice that in the example above, the &#8220;selectable&#8221; property of the TextField instance is set to &#8220;false&#8221;.  This is not really necessary, but it is important to note if the property is left as &#8220;true&#8221;, ie the text if left selectable, then when the text is selected, the portion that is selected loses the embossed/engraved effect.  This is because the BevelFilter is applied to the TextField as a whole, not each alphabet individually &#8211; when there is a selection, and the background is highlighted (painted), the filter is applied to the background rather than the text in the foreground.<br />
<img src="http://ghostwire.com/blog/wp-content/uploads/embossedtexts.png" alt="embossed text selected" title="embossed text selected" width="596" height="96" class="alignnone size-full wp-image-388" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/as3-embossed-and-engraved-text-effects-embedded-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using uiTextStyles: Defining Faux Bold Weights (Embedded Fonts)</title>
		<link>http://www.ghostwire.com/blog/archives/using-uitextstyles-defining-faux-bold-weights-embedded-fonts/</link>
		<comments>http://www.ghostwire.com/blog/archives/using-uitextstyles-defining-faux-bold-weights-embedded-fonts/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 06:30:54 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Aspire UI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Embedded Fonts]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=356</guid>
		<description><![CDATA[Yesterday, the Aspire UI library was updated to version 1.2.0. Among other changes, we have also implemented support for faux bold weights for embedded fonts. Faux bold is &#8220;fake&#8221; bold. It is an efficient way to display text in the same typeface but with different weights (bolder, thinner, etc.). It can be used as an [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, the <a href="/aspireui/">Aspire UI</a> library was updated to version 1.2.0.  Among other <a href="/aspireui/docs/changelog">changes</a>, we have also implemented support for faux bold weights for embedded fonts.</p>
<p>Faux bold is &#8220;fake&#8221; bold.  It is an efficient way to display text in the same typeface but with different weights (bolder, thinner, etc.).  It can be used as an alternative to the real bold font, or used in combination with the real thing.</p>
<p>Sometimes, the bold version of a font simply doesn&#8217;t exist so this is also where faux boldness comes in. Or, you can use this feature to make the typeface thinner (rather than bolder).</p>
<p><span id="more-356"></span><br />
<strong>The &#8220;weight&#8221; Property</strong><br />
The “weight” property is defined in CSS just like the other text formatting properties:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">specialstyle
<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span>
	weight<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">200</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If you prefer to define the style within your application code using ActionScript:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">	uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;specialstyle&quot;</span>,<span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">color</span>:<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>,weight:<span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The value of the &#8221;weight&#8221; property should be a value between -200 to 200. To make the font thinner, use a negative number. To make the font bolder, use a positive number.</p>
<p>You can also use some predefined values when specifying the &#8221;weight&#8221; property:<br />
&#8220;bolder&#8221; is equivalent to 200<br />
&#8220;bold&#8221; is equivalent to 100<br />
&#8220;thin&#8221; is equivalent to -100<br />
&#8220;thinner&#8221; is equivalent to -200</p>
<p><!-- --><br />
<strong>Example</strong><br />
<img src="/blog/wp-content/uploads/uitextfauxbold.png" alt="uiTextStyles Faux Bold" title="uitextfauxbold" width="516" height="296" class="size-full wp-image-357" /></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">uiText</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">managers</span>.<span style="color: #006600;">uiFonts</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">managers</span>.<span style="color: #006600;">uiTextStyles</span>;
&nbsp;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleA&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,weight:<span style="color: #ff0000;">&quot;thinner&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// -200</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleB&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,weight:<span style="color: #ff0000;">&quot;thin&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// -100</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleC&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleD&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,weight:<span style="color: #ff0000;">&quot;bold&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// 100</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleE&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,weight:<span style="color: #ff0000;">&quot;bolder&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// 200</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// ** faux bold weights can also be combined with true bold **</span>
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleAb&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span>,weight:<span style="color: #ff0000;">&quot;thinner&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleBb&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span>,weight:<span style="color: #ff0000;">&quot;thin&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleCb&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleDb&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span>,weight:<span style="color: #ff0000;">&quot;bold&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleEb&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span>,weight:<span style="color: #ff0000;">&quot;bolder&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
uiFonts.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextA:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextA.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextA.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextA.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleA&quot;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextA<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextB:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextB.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextB.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextB.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleB&quot;</span>;
displayTextB.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextB<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextC:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextC.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextC.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextC.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleC&quot;</span>;
displayTextC.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextC<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextD:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextD.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextD.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextD.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleD&quot;</span>;
displayTextD.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextD<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextE:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextE.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextE.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextE.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleE&quot;</span>;
displayTextE.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextE<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextAb:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextAb.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextAb.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextAb.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleAb&quot;</span>;
displayTextAb.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">105</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextAb<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextBb:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextBb.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextBb.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextBb.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleBb&quot;</span>;
displayTextBb.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">125</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextBb<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextCb:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextCb.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextCb.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextCb.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleCb&quot;</span>;
displayTextCb.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">145</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextCb<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextDb:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextDb.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextDb.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextDb.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleDb&quot;</span>;
displayTextDb.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">165</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextDb<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> displayTextEb:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
displayTextEb.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded fonts **</span>
displayTextEb.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
displayTextEb.<span style="color: #006600;">textStyle</span> = <span style="color: #ff0000;">&quot;styleEb&quot;</span>;
displayTextEb.<span style="color: #006600;">move</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">185</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>displayTextEb<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><!-- --><br />
<strong>Note</strong><br />
The faux bold feature is implemented via the &#8220;thickness&#8221; property of the native flash.text.TextField class. Therefore, if you are not using the Aspire UI library, you can still implement the same faux bold feature via that property &#8211; just make sure that you have embedded the font and the &#8220;antiAliasType&#8221; property of the text field is set to flash.text.AntiAliasType.ADVANCED.</p>
<p><!-- --><br />
<strong>Aspire UI Components</strong><br />
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework. You may experiment with the various features by <a href="/aspireui/download/">downloading a trial version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/using-uitextstyles-defining-faux-bold-weights-embedded-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling embedded font SWFs with the Flex compiler for use with the uiFonts manager</title>
		<link>http://www.ghostwire.com/blog/archives/compiling-embedded-font-swfs-with-the-flex-compiler-for-use-with-the-uifonts-manager/</link>
		<comments>http://www.ghostwire.com/blog/archives/compiling-embedded-font-swfs-with-the-flex-compiler-for-use-with-the-uifonts-manager/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 08:58:58 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Aspire UI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Embedded Fonts]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=173</guid>
		<description><![CDATA[In a previous demo Loading embedded fonts on-demand using the uiFonts manager, the uiFonts manager was shown to load external embedded font SWFs &#8220;on-demand&#8221;. The uiFonts manager can work with embedded font SWFs compiled either from the Flash IDE or the Flex compiler. When compiling using the Flash IDE, we use Font Symbols in the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous demo <a href="/blog/archives/loading-embedded-fonts-on-demand-using-the-uifonts-manager/">Loading embedded fonts on-demand using the uiFonts manager</a>, the uiFonts manager was shown to load external embedded font SWFs &#8220;on-demand&#8221;.</p>
<p>The uiFonts manager can work with embedded font SWFs compiled either from the Flash IDE or the Flex compiler.</p>
<p>When compiling using the Flash IDE, we use Font Symbols in the Library (see <a href="/aspireui/docs/usage/uifonts">uiFonts usage notes</a>).</p>
<p>When compiling using the Flex compiler, we use a single AS3 class file. The following shows how the AS3 Class must be written in order for the resulting SWF to work with the uiFonts manager.</p>
<p><span id="more-173"></span></p>
<p><em>If you are using <a href="http://www.flashdevelop.org">Flash Develop</a>, the following method for building font SWFs apply as well and you may use Tools -&gt; Flash Tools -&gt; Build Current File (CTRL-F8) to compile the class.</em></p>
<p>In this example, we will create a &#8220;DejaVu_Sans.swf&#8221; file containing the &#8220;DejaVu Sans&#8221; font. The font is available from <a href="http://dejavu-fonts.org">http://dejavu-fonts.org</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> DejaVu_Sans <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,
		unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const REGULAR:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span>,
		unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">BOLD</span>:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontStyle=<span style="color: #ff0000;">&quot;italic&quot;</span>,
		unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">ITALIC</span>:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span>, fontStyle=<span style="color: #ff0000;">&quot;italic&quot;</span>,
		unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const BOLD_ITALIC:<span style="color: #000000; font-weight: bold;">Class</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>Class Name</strong></p>
<ul>
<li>First of all, the class name must match the name of the font, converting any space to underscore.</li>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> DejaVu_Sans <span style="color: #0066CC;">extends</span> Sprite</pre></div></div>

</ul>
<p><strong>REGULAR</strong></p>
<ul>
<li>Embedding the REGULAR version of the font is mandatory. You may skip the BOLD, ITALIC and BOLD_ITALIC versions, but not the REGULAR version.</li>
<li>The REGULAR version of the font is embedded by defining a static variable (or constant) named REGULAR and declaring the [Embed] meta tag above it accordingly:</li>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,
unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const REGULAR:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

</ul>
<p><strong>BOLD</strong></p>
<ul>
<li>If the font has a BOLD version (depends on the font developer &#8211; not all fonts are provided with a bold version), you may embed that version by defining a static variable (or constant) with the name BOLD and declaring the &#8220;fontWeight&#8221; value as &#8220;bold&#8221; in the meta tag:</li>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span>,
unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">BOLD</span>:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

</ul>
<p><strong>ITALIC</strong></p>
<ul>
<li>Likewise, if the font has an ITALIC version (most CJK fonts do not have italic versions), you may embed that version by defining a static variable (or constant) with the name ITALIC and declaring the &#8220;fontStyle&#8221; value as &#8220;italic&#8221;:</li>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontStyle=<span style="color: #ff0000;">&quot;italic&quot;</span>,
unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">ITALIC</span>:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

</ul>
<p><strong>BOLD_ITALIC</strong></p>
<ul>
<li>If the font has both BOLD and ITALIC versions, you may embed a BOLD_ITALIC version:</li>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>mimeType=<span style="color: #ff0000;">&quot;application/x-font&quot;</span>, systemFont=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontName=<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>, fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span>, fontStyle=<span style="color: #ff0000;">&quot;italic&quot;</span>,
unicodeRange=<span style="color: #ff0000;">&quot;U+0020-U+007E&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const BOLD_ITALIC:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

</ul>
<p><strong>unicodeRange</strong></p>
<ul>
<li>The &#8220;unicodeRange&#8221; value in the [Embed] meta tag determines which glyphs to include. In the above example, we have embedded glyphs from the basic latin range:
<p>// BASIC LATIN<br />
U+0020-U+002F // punctuation<br />
U+0030-U+0039 // 0-9<br />
U+003A-U+0040 // punctuation<br />
U+0041-U+005A // A-Z<br />
U+005B-U+0060 // punctuation<br />
U+0061-U+007A // a-z<br />
U+007B-U+007E // punctuation
</li>
<li>If you happen to need Japanese glyphs, the following range would be useful:
<p>// JAPANESE KANA<br />
// Japanese-style punctuation<br />
U+3000-U+303F<br />
// Hiragana<br />
U+3040-U+309F<br />
// Katakana<br />
U+30A0-U+30FF<br />
// Half-width katakana<br />
U+FF61-U+FF9F<br />
// Full-width roman characters (suggest omit)<br />
U+FF00-U+FF60<br />
// CJK unifed ideographs &#8211; Common and uncommon kanji (huge!)<br />
U+4E00-U+9FAF
</li>
<li>The font you are embedding must of course contain the respective glyphs in the specified unicode range(s).</li>
</ul>
<p><strong>Using with the uiFonts manager</strong></p>
<ul>
<li>Once you have compiled the font SWF, put it in the project&#8217;s &#8220;assets/fonts/&#8221; folder to make it available for use in your application.
</li>
<li>Calling the uiFonts.manager.load() method will load &#8220;DejaVu_Sans.swf&#8221; from the fonts folder (note: specify the <em>font</em> name when calling the load() method, not the <em>file</em> name).

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">uiFonts.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

</li>
<li>As shown in the previous <a href="/blog/archives/loading-embedded-fonts-on-demand-using-the-uifonts-manager/">demo</a>, the uiFonts manager will work hand-in-hand with the uiTextStyles manager to automatically apply embedded fonts to uiText instances on the stage (instances that are using the respective font(s)) after loading completes.
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/compiling-embedded-font-swfs-with-the-flex-compiler-for-use-with-the-uifonts-manager/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loading embedded fonts on-demand using the uiFonts manager</title>
		<link>http://www.ghostwire.com/blog/archives/loading-embedded-fonts-on-demand-using-the-uifonts-manager/</link>
		<comments>http://www.ghostwire.com/blog/archives/loading-embedded-fonts-on-demand-using-the-uifonts-manager/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 13:57:31 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Aspire UI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Embedded Fonts]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Fonts]]></category>

		<guid isPermaLink="false">http://ghostwire.com/blog/?p=49</guid>
		<description><![CDATA[Why Embed Fonts? Embedding a font inside a SWF file means that the font does not need to be present on the devices the SWF file eventually plays back on. In order to ensure that text are rendered in the way the Flash application developer originally intended, it is often necessary to embed the fonts [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why Embed Fonts?</strong><br />
Embedding a font inside a SWF file means that the font does not need to be present on the devices the SWF file eventually plays back on. In order to ensure that text are rendered in the way the Flash application developer originally intended, it is often necessary to embed the fonts used in the application. This is especially so for fonts that are not commonly installed in the target devices. The use of embedded fonts is also mandatory for some features of the Flash Player to work, such as text rotation and transparency (pre-Flash Player version 10).</p>
<p><!-- --><br />
<strong>The Problem</strong><br />
Unfortunately, embedding fonts into the application SWF can seriously bloat the file size. It will also increase compile time significantly, wasting much development time.</p>
<p><!-- --><br />
<strong>The Solution</strong><br />
Using the uiFonts manager from Aspire UI Standard Edition, it is possible to use embedded fonts without compiling them into the main application SWF. Instead, each individual font exists in its own external SWF file which is loaded into the application on-demand during run-time. These font SWF files can be created once for each font and re-used across different applications.</p>
<p>This is especially helpful for applications where the use of embedded fonts is essential, such as an apparel print design or greeting card design application that offers multiple font choices.</p>
<p><span id="more-49"></span><br />
<strong>Live Demo</strong><br />
The following is a live demo of the uiFonts manager in action (FontsExample.swf):<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_FontsExample_1805813220"
			class="flashmovie"
			width="480"
			height="300">
	<param name="movie" value="/aspireui/swf/FontsExample.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/aspireui/swf/FontsExample.swf"
			name="fm_FontsExample_1805813220"
			width="480"
			height="300">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<ul>
<li>The text displaying &#8220;The quick brown fox jumps over the lazy dog.&#8221; is slightly rotated, so it won&#8217;t show up unless it is using embedded fonts.</li>
<li>The application starts with no embedded font available for usage.</li>
<li>Clicking the &#8220;DejaVu Sans&#8221; button loads the &#8220;DejaVu_Sans.swf&#8221; file from the &#8220;assets/fonts/&#8221; folder. Once it is loaded, the embedded font will be used automatically. To load the font dynamically during run-time, uiFonts.manager.load(&#8220;DejaVu Sans&#8221;) is called &#8211; the font name is specified, not the font file name.</li>
<li>Likewise, clicking the &#8220;SanaFon&#8221; button loads &#8220;SanaFon.swf&#8221; &#8211; uiFonts.manager.load(&#8220;SanaFon&#8221;) is called.</li>
<li>A Bold version of the &#8220;SanaFon&#8221; font does not exists.</li>
</ul>
<p><!-- --><br />
<strong>FontsExample.as</strong><br />
Here is the source code of the FontsExample.as class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">containers</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">controls</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #0066CC;">data</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">enums</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">managers</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #0066CC;">Capabilities</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FontsExample <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// ** instances **</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> displayTextA:uiText;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> displayTextB:uiText;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> progressText:uiText;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FontsExample<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// ** make sure stage is not null **</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>,init<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// ** let assets preload before starting application **</span>
			uiSkins.<span style="color: #006600;">manager</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>,main<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// ** topLevelPane **</span>
			<span style="color: #000000; font-weight: bold;">var</span> topLevelPane:uiPane = <span style="color: #000000; font-weight: bold;">new</span> uiPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			topLevelPane.<span style="color: #006600;">padding</span>	= <span style="color: #cc66cc;">4</span>;
			topLevelPane.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>,<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>topLevelPane<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> titleText:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Aspire UI Components Example&quot;</span><span style="color: #66cc66;">&#41;</span>;
			titleText.<span style="color: #006600;">alignX</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			titleText.<span style="color: #0066CC;">background</span>	= <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">color</span>:0x819A98,cornerRadius:<span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#125;</span>
			titleText.<span style="color: #006600;">padding</span>	= <span style="color: #ff0000;">&quot;6,12&quot;</span>;
			titleText.<span style="color: #006600;">textStyle</span>	= <span style="color: #ff0000;">&quot;title&quot;</span>;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>titleText<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> versionText:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Flash Player Version &quot;</span>+<span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">version</span><span style="color: #66cc66;">&#41;</span>;
			versionText.<span style="color: #006600;">alignX</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			versionText.<span style="color: #006600;">y</span>		= topLevelPane.<span style="color: #0066CC;">height</span> - <span style="color: #cc66cc;">80</span>;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>versionText<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> footerText:uiText	= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;© 2008-2009 GhostWire Studios&quot;</span><span style="color: #66cc66;">&#41;</span>
			footerText.<span style="color: #0066CC;">background</span>	= <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">color</span>:0x819A98<span style="color: #66cc66;">&#125;</span>;
			footerText.<span style="color: #006600;">padding</span>	= <span style="color: #cc66cc;">3</span>;
			footerText.<span style="color: #006600;">alignX</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			footerText.<span style="color: #006600;">fillX</span>	= <span style="color: #000000; font-weight: bold;">true</span>;
			footerText.<span style="color: #006600;">textStyle</span>	= <span style="color: #ff0000;">&quot;footer&quot;</span>;
			footerText.<span style="color: #006600;">y</span>		= topLevelPane.<span style="color: #0066CC;">height</span> - <span style="color: #cc66cc;">60</span>;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>footerText<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> ghostwireMark:uiImage	= <span style="color: #000000; font-weight: bold;">new</span> uiImage<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;GhostWireStudiosMark&quot;</span><span style="color: #66cc66;">&#41;</span>;
			ghostwireMark.<span style="color: #006600;">alignX</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			ghostwireMark.<span style="color: #006600;">alignY</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">BOTTOM</span>;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>ghostwireMark<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** display text **</span>
			displayTextA		= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			displayTextB		= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			displayTextB.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">2</span>; <span style="color: #808080; font-style: italic;">// ** text will not show unless using embedded font **</span>
&nbsp;
			displayTextA.<span style="color: #0066CC;">text</span>	=
			displayTextB.<span style="color: #0066CC;">text</span>	= <span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> txt:uiBox	= <span style="color: #000000; font-weight: bold;">new</span> uiBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			txt.<span style="color: #006600;">vertical</span>		= <span style="color: #000000; font-weight: bold;">true</span>;
			txt.<span style="color: #006600;">alignX</span>		= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			txt.<span style="color: #006600;">y</span>			= <span style="color: #cc66cc;">60</span>;
			txt.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>displayTextA<span style="color: #66cc66;">&#41;</span>;
			txt.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>displayTextB<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>txt<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// ** end display text **</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** buttons **</span>
			<span style="color: #000000; font-weight: bold;">var</span> buttons:uiBox	= <span style="color: #000000; font-weight: bold;">new</span> uiBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			buttons.<span style="color: #006600;">alignX</span>		= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			buttons.<span style="color: #006600;">y</span>		= <span style="color: #cc66cc;">150</span>;
			buttons.<span style="color: #006600;">spacing</span>		= <span style="color: #cc66cc;">20</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> buttonA:uiLabelButton	= <span style="color: #000000; font-weight: bold;">new</span> uiLabelButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> buttonB:uiLabelButton	= <span style="color: #000000; font-weight: bold;">new</span> uiLabelButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SanaFon&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			buttonA.<span style="color: #006600;">fillY</span>			= <span style="color: #000000; font-weight: bold;">true</span>;
			buttonB.<span style="color: #006600;">fillY</span>			= <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			buttonA.<span style="color: #0066CC;">data</span>		= <span style="color: #ff0000;">&quot;styleA&quot;</span>;
			buttonB.<span style="color: #0066CC;">data</span>		= <span style="color: #ff0000;">&quot;styleB&quot;</span>;
&nbsp;
			buttonA.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,on_click,<span style="color: #000000; font-weight: bold;">false</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			buttonB.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,on_click,<span style="color: #000000; font-weight: bold;">false</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			buttons.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>buttonA<span style="color: #66cc66;">&#41;</span>;
			buttons.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>buttonB<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>buttons<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// ** end buttons **</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** progress text **</span>
			progressText		= <span style="color: #000000; font-weight: bold;">new</span> uiText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			progressText.<span style="color: #006600;">alignX</span>	= <span style="color: #0066CC;">ALIGN</span>.<span style="color: #006600;">CENTER</span>;
			progressText.<span style="color: #006600;">y</span>		= <span style="color: #cc66cc;">190</span>;
			topLevelPane.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>progressText<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// ** end progress text **</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** end topLevelPane **</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** create some text styles **</span>
			uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleA&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleB&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;SanaFon&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleABold&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;DejaVu Sans&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			uiTextStyles.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;styleBBold&quot;</span>,<span style="color: #66cc66;">&#123;</span>fontFamily:<span style="color: #ff0000;">&quot;SanaFon&quot;</span>,fontSize:<span style="color: #cc66cc;">16</span>,fontWeight:<span style="color: #ff0000;">&quot;bold&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		apply new text style and load external font swf on demand
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> on_click<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			displayTextA.<span style="color: #006600;">textStyle</span> = <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>uiLabelButton<span style="color: #66cc66;">&#40;</span>evt.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;
			displayTextB.<span style="color: #006600;">textStyle</span> = displayTextA.<span style="color: #006600;">textStyle</span>+<span style="color: #ff0000;">&quot;Bold&quot;</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>displayTextA.<span style="color: #0066CC;">embedFonts</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// ** embedded font already loaded and in use **</span>
				progressText.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// ** begin loading external font swf **</span>
				progressText.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Loading...&quot;</span>;
				uiFonts.<span style="color: #006600;">manager</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>uiLabelButton<span style="color: #66cc66;">&#40;</span>evt.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</span>;
				uiFonts.<span style="color: #006600;">manager</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ProgressEvent.<span style="color: #006600;">PROGRESS</span>,on_loadProgress<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		tracks download progress
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> on_loadProgress<span style="color: #66cc66;">&#40;</span>evt:ProgressEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			progressText.<span style="color: #0066CC;">text</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>evt.<span style="color: #0066CC;">bytesLoaded</span> == evt.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #ff0000;">&quot;Total: &quot;</span> : <span style="color: #ff0000;">&quot;Loading: &quot;</span><span style="color: #66cc66;">&#41;</span>+evt.<span style="color: #0066CC;">bytesLoaded</span>+<span style="color: #ff0000;">&quot; bytes&quot;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<ul>
<li><strong>Lines 67-84:</strong> This is the display text for &#8220;A quick brown fox jumps over the lazy dog&#8221;. Notice that the &#8220;rotation&#8221; property of the containing box is set to 2 &#8211; the text will not show unless embedded fonts are used.</li>
<li><strong>Lines 87-108:</strong> These are the buttons that will set the text to the text styles using the respective fonts, and initiate the loading of the external font swf files.</li>
<li><strong>Lines 111-116:</strong> This is the text that shows the loading progress while an external font SWF file is being loaded.</li>
<li><strong>Lines 121-124:</strong> Set some text styles to use the respective fonts.</li>
<li><strong>Lines 130-146:</strong> Event handler when a button is clicked. Notice the &#8220;embedFonts&#8221; property is queried &#8211; this property automatically assume true/false depending on whether the embedded font is available or not.</li>
<li><strong>Lines 151-155:</strong> Event handler for tracking the download progress of external font SWF files.</li>
<li>Notice that there is no code explicitly asking text fields to use embedded fonts (after the fonts are loaded) &#8211; this is not necessary because the uiFonts manager works together with the <a href="/aspireui/docs/textstyles/using-text-styles">uiTextStyles</a> manager to invalidate and redraw uiText instances automatically after a font is loaded.</li>
</ul>
<p><!-- --><br />
<strong>Font SWF Files</strong><br />
For instructions on how to create individual font SWF files, please refer to <a href="/aspireui/docs/usage/uifonts">uiFonts usage notes</a>.</p>
<p><!-- --><br />
<strong>Aspire UI Components</strong><br />
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework. You may experiment with the various features by <a href="/aspireui/download/">downloading a trial version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/loading-embedded-fonts-on-demand-using-the-uifonts-manager/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

