Thanks! I did quickly scan through the thread you
mentioned. Very interesting stuff but I didn’t see anything exactly like what I
needed. I wasn’t aware of the
Font.enumerateFonts() functions so I will look into this. Right now I have it working 90% at least.
Biggest issue is the TextArea which doesn’t work with my embedded fonts but
Button and Label do! Go figure L I think my biggest problem all along was
that I was testing with only the TextArea component… once I started testing
with Label and Button components things started working but still don’t work
with TextArea components. I will keep an eye on the thread you
mentioned though, very cool stuff! Thanks, Lance From: We've been working on something similar in a thread
called "embeding fonts at runtime" although i'm not sure it's exactly
what you want. Some of it might be useful. First check to see if
the font is actually there using Font.enumerateFonts On 8/30/06, I have been scowering the internet for information on how to
embed fonts in an RSL for Flex2. I ran accress this posting by Darron Schall but it looks like
it is for Flex 1.5? Anyway I gave it a try but it doesn't work for me. I set up
2 projects, 1 regular flex project and another as a library project. My regular
project references the library project as an RSL and in my library project I
created one component with the @font-face css tag in the <mx:Style> tag.
I also created a manifest file and set up the library project to use the
manifest file. Everything compiles right and my component from the RSL shows
up in my main app but when I try to use the font in the RSL the text in my main
app disappears (ie just like in Flash if you tell it to use embedded fonts but
the font doesn't exist). This has to be possible with Flex 2! Heck fonts alone are one
of the most important things to stuff in an RSL half the time! What am I doing wrong? Is there some more documentation on
this that I missed or a more recent blog post that I missed? Thanks for any help! Here is the code I have….. --- application code --- <?xml version="1.0"
encoding="utf-8"?> <mx:Application xmlns:mx=" http://www.adobe.
<mx:Style>
<![CDATA[
TextArea {
font-family:
mainFont;
}
]]>
</mx:Style>
<mystuff:MyStuff width="10" height="10" />
<mx:TextArea x="10" y="10" width="533"
height="434" text="Hello There!"/> </mx:Application> --- rsl component code --- <?xml version="1.0"
encoding="utf-8"?> <mx:Canvas xmlns:mx=" http://www.adobe.
<mx:Style>
<![CDATA[
@font-face {
src:url("verdana.ttf");
font-family:
mainFont;
font-style:
normal;
}
]]>
</mx:Style> </mx:Canvas> --- manifest file --- <?xml version="1.0"?> <componentPackage> <component id="MyStuff"
class="MyStuff"/> </componentPackage> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |