<?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: Using embedded fonts with the Panel container in Flex</title>
	<link>http://blog.flexexamples.com/2008/02/28/using-embedded-fonts-with-the-panel-container-in-flex/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 21 Nov 2008 07:03:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/02/28/using-embedded-fonts-with-the-panel-container-in-flex/#comment-14923</link>
		<author>peterd</author>
		<pubDate>Mon, 25 Aug 2008 15:27:13 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/28/using-embedded-fonts-with-the-panel-container-in-flex/#comment-14923</guid>
		<description>Benjamin,

I wasn't able to figure out the local font name for Verdana Bold, but the following example shows how you can embed the file from your C:\WINDOWS\Fonts\ directory (which may need tweaking based on your OS/install -- or you can just copy the verdanab.TTF font into your Flex project):

&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="horizontal"&#62;

    &#60;mx:Style&#62;
        @font-face {
            src: url("C:/WINDOWS/Fonts/verdanab.TTF");
            fontFamily: VerdanaBoldEmbedded;
            fontWeight: bold;
        }

        @font-face {
            src: local("Verdana");
            fontFamily: VerdanaNormalEmbedded;
        }

        @font-face {
            src: local("Verdana");
            fontFamily: VerdanaNormalBoldEmbedded;
            fontWeight: bold;
        }

        .verdanaBoldBoldTitle {
            fontFamily: VerdanaBoldEmbedded;
            fontWeight: bold;
        }

        .verdanaNormalTitle {
            fontFamily: VerdanaNormalEmbedded;
            fontWeight: normal;
        }

        .verdanaNormalBoldTitle {
            fontFamily: VerdanaNormalBoldEmbedded;
            fontWeight: bold;
        }
    &#60;/mx:Style&#62;

    &#60;mx:Panel title="Verdana Bold Test"
            titleStyleName="verdanaBoldBoldTitle"
            width="33%"
            height="100"&#62;
        &#60;mx:Label text="Verdana Bold bold" /&#62;
    &#60;/mx:Panel&#62;

    &#60;mx:Panel title="Verdana Normal Test"
            titleStyleName="verdanaNormalTitle"
            width="33%"
            height="100"&#62;
        &#60;mx:Label text="Verdana normal" /&#62;
    &#60;/mx:Panel&#62;

    &#60;mx:Panel title="Verdana Normal Test (w/ bold)"
            titleStyleName="verdanaNormalBoldTitle"
            width="33%"
            height="100"&#62;
        &#60;mx:Label text="Verdana bold" /&#62;
    &#60;/mx:Panel&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Benjamin,</p>
<p>I wasn&#8217;t able to figure out the local font name for Verdana Bold, but the following example shows how you can embed the file from your C:\WINDOWS\Fonts\ directory (which may need tweaking based on your OS/install &#8212; or you can just copy the verdanab.TTF font into your Flex project):</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="horizontal"&gt;

    &lt;mx:Style&gt;
        @font-face {
            src: url("C:/WINDOWS/Fonts/verdanab.TTF");
            fontFamily: VerdanaBoldEmbedded;
            fontWeight: bold;
        }

        @font-face {
            src: local("Verdana");
            fontFamily: VerdanaNormalEmbedded;
        }

        @font-face {
            src: local("Verdana");
            fontFamily: VerdanaNormalBoldEmbedded;
            fontWeight: bold;
        }

        .verdanaBoldBoldTitle {
            fontFamily: VerdanaBoldEmbedded;
            fontWeight: bold;
        }

        .verdanaNormalTitle {
            fontFamily: VerdanaNormalEmbedded;
            fontWeight: normal;
        }

        .verdanaNormalBoldTitle {
            fontFamily: VerdanaNormalBoldEmbedded;
            fontWeight: bold;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Panel title="Verdana Bold Test"
            titleStyleName="verdanaBoldBoldTitle"
            width="33%"
            height="100"&gt;
        &lt;mx:Label text="Verdana Bold bold" /&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title="Verdana Normal Test"
            titleStyleName="verdanaNormalTitle"
            width="33%"
            height="100"&gt;
        &lt;mx:Label text="Verdana normal" /&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title="Verdana Normal Test (w/ bold)"
            titleStyleName="verdanaNormalBoldTitle"
            width="33%"
            height="100"&gt;
        &lt;mx:Label text="Verdana bold" /&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://blog.flexexamples.com/2008/02/28/using-embedded-fonts-with-the-panel-container-in-flex/#comment-14916</link>
		<author>Benjamin</author>
		<pubDate>Mon, 25 Aug 2008 09:51:14 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/28/using-embedded-fonts-with-the-panel-container-in-flex/#comment-14916</guid>
		<description>I had the problem that all of a sudden in my panel title single chars disappeared. As I had seen similar things with flash I suspected an embedding problem and it seems I am right. With your tutorial I got it properly displayed again. So thanks for that.
Some problem unfortunately remains. I want to use a bold verdana but when I use font-weight: bold it just looks awful. I tried to embed the bold verdana version itself but can´t figure out the right name... i.e. 'src:local("Verdana Bold");' doesn´t work.

Any Ideas?</description>
		<content:encoded><![CDATA[<p>I had the problem that all of a sudden in my panel title single chars disappeared. As I had seen similar things with flash I suspected an embedding problem and it seems I am right. With your tutorial I got it properly displayed again. So thanks for that.<br />
Some problem unfortunately remains. I want to use a bold verdana but when I use font-weight: bold it just looks awful. I tried to embed the bold verdana version itself but can´t figure out the right name&#8230; i.e. &#8217;src:local(&#8221;Verdana Bold&#8221;);&#8217; doesn´t work.</p>
<p>Any Ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
