Re: [flexcoders] Include fonts in RSL Flex2

2006-08-31 Thread Daniel Freiman



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(). Second, we're currently looking into whether the embeded font name needs to be the same as the actual font. If the other thread is close enough jump on it, otherwise I tell you if anything comes up that may be applicable.
On 8/30/06, Lance Linder [EMAIL PROTECTED] wrote:

















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.com/2006/mxml
xmlns:mystuff=http://mystuff layout=absolute

 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.com/2006/mxml
width=10 height=10 backgroundColor=0x00

 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
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Include fonts in RSL Flex2

2006-08-31 Thread Lance Linder












Think I figured part of the problem out. Seems
Darron Schalls blog post is still valid as I am able to get this to work
on Label or Button components but TextArea (which I first tried) is a different
story. So it seems that TextArea is doing something under the covers that Label
and Button dont.



Any ideas?











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Lance
 Linder
Sent: Wednesday, August 30, 2006
6:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Include
fonts in RSL Flex2













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 doesnt 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 doesnt 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.com/2006/mxml
xmlns:mystuff=http://mystuff layout=absolute


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.com/2006/mxml
width=10 height=10
backgroundColor=0x00


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
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] Include fonts in RSL Flex2

2006-08-31 Thread Lance Linder












Thanks!



I did quickly scan through the thread you
mentioned. Very interesting stuff but I didnt see anything exactly like what I
needed.



I wasnt 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 doesnt 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 dont work
with TextArea components.



I will keep an eye on the thread you
mentioned though, very cool stuff!



Thanks,

Lance











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Daniel Freiman
Sent: Thursday, August 31, 2006
9:14 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Include
fonts in RSL Flex2











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(). Second,
we're currently looking into whether the embeded font name needs to be the same
as the actual font. If the other thread is close enough jump on it,
otherwise I tell you if anything comes up that may be applicable. 



On 8/30/06, Lance Linder [EMAIL PROTECTED]tal.com
wrote:







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.com/2006/mxml
xmlns:mystuff=http://mystuff
layout=absolute


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.com/2006/mxml
width=10 height=10 backgroundColor=0x00


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
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






[flexcoders] Include fonts in RSL Flex2

2006-08-30 Thread Lance Linder












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
doesnt 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 doesnt 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.com/2006/mxml
xmlns:mystuff=http://mystuff layout=absolute

 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.com/2006/mxml
width=10 height=10 backgroundColor=0x00

 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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___