<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Styling a Flex Button control using embedded fonts</title>
	<link>http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 11:06:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12508</link>
		<author>peterd</author>
		<pubDate>Mon, 05 May 2008 15:33:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12508</guid>
		<description>&lt;a href="http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12507" rel="nofollow"&gt;Eric Fields&lt;/a&gt;,

The problem is that you only embedded the normal font weight for the Arial font, and by default the Button control's label is bold. You have two options:
1) Set the button's label to use normal font weight instead of bold by setting the &lt;code&gt;fontWeight&lt;/code&gt; style:
&lt;pre class="code"&gt;
&#60;mx:Style&#62;
    @font-face {
        src: url("fonts/Arial.ttf");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        fontWeight: normal;
    }


    Application {
        color: white;
        fontSize: 12px;
        fontFamily: ArialEmbedded;
    }
    
    Button {
        fontWeight: normal;
    }
&#60;/mx:Style&#62;
&lt;/pre&gt;

2) Embed both the normal and bold font weights in your application:
&lt;pre class="code"&gt;
&#60;mx:Style&#62;
    @font-face {
        src: local("Arial");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        font-weight: normal;
    }

    @font-face {
        src: local("Arial");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        font-weight: bold;
    }

    Application {
        color: white;
        fontSize: 12px;
        fontFamily: ArialEmbedded;
    }
&#60;/mx:Style&#62;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12507" rel="nofollow">Eric Fields</a>,</p>
<p>The problem is that you only embedded the normal font weight for the Arial font, and by default the Button control&#8217;s label is bold. You have two options:<br />
1) Set the button&#8217;s label to use normal font weight instead of bold by setting the <code>fontWeight</code> style:</p>
<pre class="code">
&lt;mx:Style&gt;
    @font-face {
        src: url("fonts/Arial.ttf");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        fontWeight: normal;
    }

    Application {
        color: white;
        fontSize: 12px;
        fontFamily: ArialEmbedded;
    }

    Button {
        fontWeight: normal;
    }
&lt;/mx:Style&gt;
</pre>
<p>2) Embed both the normal and bold font weights in your application:</p>
<pre class="code">
&lt;mx:Style&gt;
    @font-face {
        src: local("Arial");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        font-weight: normal;
    }

    @font-face {
        src: local("Arial");
        fontFamily: ArialEmbedded;
        fontStyle: normal;
        font-weight: bold;
    }

    Application {
        color: white;
        fontSize: 12px;
        fontFamily: ArialEmbedded;
    }
&lt;/mx:Style&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Fields</title>
		<link>http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12507</link>
		<author>Eric Fields</author>
		<pubDate>Mon, 05 May 2008 14:53:10 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/28/styling-a-flex-button-control-using-embedded-fonts/#comment-12507</guid>
		<description>Is there any trick to getting a common Button to use embedded fonts? I've got the following:

@font-face {
	src: url("fonts/Arial.ttf");
	fontFamily: ArialEmbedded;
	fontStyle: normal;
	fontWeight: normal;
}
Application {
	color: white;
	fontSize: 12px;
	fontFamily: ArialEmbedded;
}

And the Button text defaults to some gross serif font. So i tried

Application, Button { ... 

And still nothing. So I just tried

Button {
	embedFonts: true;
	fontFamily: ArialEmbedded;...

Still doesn't pick up the font. Still the serif. 

Thank you.</description>
		<content:encoded><![CDATA[<p>Is there any trick to getting a common Button to use embedded fonts? I&#8217;ve got the following:</p>
<p>@font-face {<br />
	src: url(&#8221;fonts/Arial.ttf&#8221;);<br />
	fontFamily: ArialEmbedded;<br />
	fontStyle: normal;<br />
	fontWeight: normal;<br />
}<br />
Application {<br />
	color: white;<br />
	fontSize: 12px;<br />
	fontFamily: ArialEmbedded;<br />
}</p>
<p>And the Button text defaults to some gross serif font. So i tried</p>
<p>Application, Button { &#8230; </p>
<p>And still nothing. So I just tried</p>
<p>Button {<br />
	embedFonts: true;<br />
	fontFamily: ArialEmbedded;&#8230;</p>
<p>Still doesn&#8217;t pick up the font. Still the serif. </p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
