<?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>undefined-type &#187; runtime font</title>
	<atom:link href="http://undefined-type.com/tag/runtime-font/feed/" rel="self" type="application/rss+xml" />
	<link>http://undefined-type.com</link>
	<description>Flex,Flash &#38; AIR</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:48:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Runtime Fonts with Unicode Range</title>
		<link>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/</link>
		<comments>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:03:33 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime font]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=518</guid>
		<description><![CDATA[For a couple of months ago I publish a post about fonts embed with unicode range. There are ways on how to extract the fonts from Flash files with some de-compiling but for those who found the article interesting but never figured out the unicodeRange bit, well there is a solution.
1.) First look on how [...]]]></description>
			<content:encoded><![CDATA[<p>For a couple of months ago I publish a post about fonts embed with unicode range. There are ways on how to extract the fonts from Flash files with some de-compiling but for those who found the article interesting but never figured out the unicodeRange bit, well there is a solution.</p>
<p>1.) First look on how to setup and use the <a href="http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/" target="_blank">FontManager</a><br />
2.) Download <a href="http://undefined-type.com/wp-content/uploads/2009/10/UnicodeHexCreator.air">UnicodeHexCreator</a> I created to create the unicodeRange.</p>
<p>The AIR Unicode app is used to create the correct unicode range to optimize the amount of bytes that is needed to be loaded. To get the range it&#8217;s really simple.</p>
<p>1.) Copy/Paste your entire XML file to the input field (top field)<br />
2.) Select font to use and set class name.<br />
3.) Press convert<br />
4.) Copy/Paste the unicodeRange to the Flex Project that creates the font file.</p>
<p>Download <a href="http://undefined-type.com/wp-content/uploads/2009/10/UnicodeHexCreator.air">UnicodeHexCreator</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/10/runtime-fonts-with-unicode-range/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Runtime Dynamic fonts Flash CS3</title>
		<link>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/</link>
		<comments>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 16:37:13 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime font]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=61</guid>
		<description><![CDATA[All the examples showing runtime dynamic fonts for flash cs3 includes that you export swf file with a class that contains embedded font [Embed ??my font??].
This doesn’t really works for me because I need specified characters for a lot of different countrys. Usually when developing a flash application I have to handle between 15-50 countrys.

So [...]]]></description>
			<content:encoded><![CDATA[<p>All the examples showing runtime dynamic fonts for flash cs3 includes that you export swf file with a class that contains embedded font [Embed ??my font??].</p>
<p>This doesn’t really works for me because I need specified characters for a lot of different countrys. Usually when developing a flash application I have to handle between 15-50 countrys.</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2008/01/embed01.jpg" rel="lightbox[61]"><img class="alignnone size-full wp-image-300" title="embed01" src="http://undefined-type.com/wp-content/uploads/2008/01/embed01.jpg" alt="embed01" width="310" height="201" /></a></p>
<p>So I made my own little solution, made one of these for flash 6 for a couple of years ago and the trick still works. It basiclly works by loading shared runtime librarys and then embedded fonts will be shared cross the application when using a lot of swf files.</p>
<p>Making it a static class it’s easy to use.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">CSS.<span style="color: #006600;">loadStyleName</span> = <span style="color: #ff0000;">&quot;default&quot;</span>;CSS.<span style="color: #006600;">loadStylePath</span> = <span style="color: #ff0000;">&quot;css/&quot;</span>;CSS.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>IOErrorEvent.<span style="color: #006600;">IO_ERROR</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onError</span><span style="color: #66cc66;">&#41;</span>;CSS.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onComplete</span><span style="color: #66cc66;">&#41;</span>;CSS.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>And then to use it on textfields.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">txtField.<span style="color: #006600;">styleSheet</span> = CSS.<span style="color: #006600;">styleSheet</span>;txtField.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;txtField.<span style="color: #0066CC;">htmlText</span> = <span style="color: #ff0000;">&quot;&amp;amp;lt;span class='subTest'&amp;amp;gt;Embed Arial&amp;amp;lt;/span&amp;amp;gt;&quot;</span>;txtField.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">5</span>;
&nbsp;
txtField2.<span style="color: #006600;">styleSheet</span> = CSS.<span style="color: #006600;">styleSheet</span>;txtField2.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;txtField2.<span style="color: #0066CC;">htmlText</span> = <span style="color: #ff0000;">&quot;&amp;amp;lt;span class='subTest'&amp;amp;gt;Try embed Arial Black&amp;amp;lt;/span&amp;amp;gt;&quot;</span>;txtField2.<span style="color: #006600;">rotation</span> = -<span style="color: #cc66cc;">5</span>;</pre></div></div>

<p>To make this work.</p>
<p>1.1) Create your shared library file (example: default_lib.fla)</p>
<p>1.2) Create MovieClip on stage and export it for runtime.</p>
<p>1.3) In the MovieClip create a textfield for each font you need, embedd all the characters needed.<br />
<a href="http://undefined-type.com/wp-content/uploads/2008/01/embed02.jpg" rel="lightbox[61]"><img class="alignnone size-medium wp-image-301" title="embed02" src="http://undefined-type.com/wp-content/uploads/2008/01/embed02-300x241.jpg" alt="embed02" width="300" height="241" /></a></p>
<p>2.1) Create your shared library holder file (example: default.fla)</p>
<p>2.2) On the stage add the runtime MovieClip and give it instance name mcFont</p>
<p>3.1) Create your css file (example: default.css)</p>
<p>3.2) Add the styles that your need<br />
<a href="http://undefined-type.com/wp-content/uploads/2008/01/embed03.jpg" rel="lightbox[61]"><img class="alignnone size-full wp-image-302" title="embed03" src="http://undefined-type.com/wp-content/uploads/2008/01/embed03.jpg" alt="embed03" width="292" height="462" /></a></p>
<p>4.1) In the Application file add the following load code (look at example in top)</p>
<p>You can download example files here: <a href="http://undefined-type.com/wp-content/uploads/2008/01/runtimefonts_as3.zip">runtimefonts_as3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

