<?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>Randomize Everything &#187; quicktip</title>
	<atom:link href="http://www.bartclaessens.com/tag/quicktip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bartclaessens.com</link>
	<description>And create the perfect world</description>
	<lastBuildDate>Sat, 17 Jul 2010 11:57:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Quicktip #6: Fixing the cut off character on embedded-font-textfields</title>
		<link>http://www.bartclaessens.com/2010/01/quicktip-6-fixing-the-cut-off-character-on-embedded-font-textfields/</link>
		<comments>http://www.bartclaessens.com/2010/01/quicktip-6-fixing-the-cut-off-character-on-embedded-font-textfields/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 21:50:42 +0000</pubDate>
		<dc:creator>Bart Claessens</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[QuickTips]]></category>
		<category><![CDATA[failing width calculation]]></category>
		<category><![CDATA[font embedding]]></category>
		<category><![CDATA[quicktip]]></category>
		<category><![CDATA[textfield autosize]]></category>

		<guid isPermaLink="false">http://www.bartclaessens.com/?p=191</guid>
		<description><![CDATA[As we all know, Flash has these crazy bugs nobody ever understands. One of those is the fact that the last character of a dynamic textfield (which has been set to &#8220;AutoSize&#8221;) gets cut off when you&#8217;re using an embedded font. Up till now I still don&#8217;t understand what kind of situation leads to this [...]]]></description>
			<content:encoded><![CDATA[<p>As we all know, Flash has these crazy bugs nobody ever understands. One of those is the fact that the last character of a dynamic textfield (which has been set to &#8220;AutoSize&#8221;) gets cut off when you&#8217;re using an embedded font. Up till now I still don&#8217;t understand what kind of situation leads to this exceptional behavior. The only thing I can say is that Flash Player fails to determine the correct text length which screws up the textfield width to be shorter than it has to be.</p>
<p>Example:<br />
<div id="attachment_193" class="wp-caption alignnone" style="width: 261px"><a href="http://www.bartclaessens.com/wp-content/uploads/2010/01/blurredchars.jpg" rel="lightbox[191]"><img src="http://www.bartclaessens.com/wp-content/uploads/2010/01/blurredchars.jpg" alt="Blurred/Cut Off Characters" title="Blurred Characters" width="251" height="53" class="size-full wp-image-193" /></a><p class="wp-caption-text">Blurred/Cut Off Characters</p></div><br />
<span id="more-191"></span><br />
<br/><br />
A quicktip post wouldn&#8217;t be a quicktip post without a solution. So, here&#8217;s one of the tricks you might give a go: increase the rightMargin property of the TextField to a small value like 1 or 2.</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">var textFormat:TextFormat = new TextFormat();
textFormat.rightMargin = 1;
&nbsp;
textField.antiAliasType = AntiAliasType.ADVANCED;
textField.gridFitType = GridFitType.SUBPIXEL;
textField.embedFonts = true;
textField.autoSize = TextFieldAutoSize.CENTER;
textField.defaultTextFormat = textFormat;
textField.setTextFormat(textFormat);</pre></div></div>

<p>Hope this helps!</p>
<div class="shr-publisher-191"></div>]]></content:encoded>
			<wfw:commentRss>http://www.bartclaessens.com/2010/01/quicktip-6-fixing-the-cut-off-character-on-embedded-font-textfields/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

