After days if trying to figure this out I figured out the following 
and it works, so I believe this could help your problem..

Problem:
How to get Dynamically Loaded Embedded Font Swfs from a Stylesheet to 
display correctly when using it in a Flex TextArea component that is 
reading Multi-Formatted HTML Text?

Solution:
Step 1: Create a swf file for each Font you want, with a text sample 
of the Font on stage and whatever characters embedded.
Step 2: Add the fonts as a font-face in a .css StyleSheet, which can 
be loaded dynamically in the Flex application.
Step 3: Create a style name containing all the fonts needed , for 
example:

.subPageFontStyles
{
  font-family: "Bello Pro";
  font-size: 28px;
  color: #7E1A7B;
  
  font-family: "Arial Rounded MT Bold";
  font-size: 15px;
  color: #302F00;
}

Step 4: In the TextArea Flex component, set "styleName" to the font 
style name in the StyleSheet, for example "subPageFontStyles".
Step 5:  In the HTML Text File, for each text block set the "font 
face" tag to font-family specified in the style name from the .css 
Stylesheet, for example "Bello Pro".  

Notes: 
-You have the option to change font size and color tags in the HTML 
Text.
-Make sure to use the  HTML Text property of the Text Area Flex 
component to set the HTML Text.
-Make sure to recompile the .css Stylesheet file into a .swf file if 
it is being loaded dynamically.


--- In [email protected], "hawkfansixty" <[EMAIL PROTECTED]> 
wrote:
>
> No, it happens in other scenarios as well.
> 
> Here are some of the documented scenarios I've tested and the 
result (If
> further verbiage necessary, let me know)
> 
> Font   Location (Embed Type)   Control Location   Result      
> Application   (ttf)   Application   Good       Application   (ttf)  
> Application (SL)   Good       Application   (swf)   Application   
BAD
> Application   (swf)   Application (SL)   BAD       Application   
(ttf)  
> Module (SL)   BAD       Application   (swf)   Module (SL)   
BAD      
> Application   using SL (ttf)   Application   BAD       Application  
> using SL (ttf)   Application (SL)   BAD       Module   (ttf)   
Module
> (SL)   Not Embeded
> SL = shared library project
> ttf = font embeded in mxml from ttf file
> swf = font embeded with StyleManager.loadStyleDeclarations or from 
swf
> file (generated by flex)
> 
> Embedding the swf in mxml and using a font swf from flash are other
> variables I've played around with but haven't yet found the winning
> combination.  This seems to work in some instances but not others 
(need
> to specify a font family on the TextArea control or goes blank with
> rotation)
> 
> The more I play around with it, the more confused i get.  [:(]
> 
> Thoughts?
> 
> 
> --- In [email protected], "Gordon Smith" <gosmith@> wrote:
> >
> > Are you claiming that this only happens when you dynamically load 
a
> SWF
> > containing embedded fonts? I doubt it. I'll bet it's a problem 
with
> > embedded fonts, even if they're embedded in the application SWF. 
It
> > looks like the font embedding process at compilation time can 
produce
> > glyphs that are less attractive that the original device font.
> >
> >
> >
> > Please file a bug at http://bugs.adobe.com/flex/.
> >
> >
> >
> > Gordon Smith
> >
> > Adobe Flex SDK Team
> >
> >
> >
> > ________________________________
> >
> > From: [email protected] 
[mailto:[EMAIL PROTECTED]
> On
> > Behalf Of hawkfansixty
> > Sent: Wednesday, June 04, 2008 11:16 AM
> > To: [email protected]
> > Subject: [flexcoders] Some Characters on Dynamically Loaded Fonts 
Show
> > Incorrectly
> >
> >
> >
> > I'm having an issue with dynamically loaded fonts not showing up
> > correctly.  The fonts are loaded using
> > StyleManager.loadStyleDeclarations("fonts.swf", true).  As you 
can see
> > on the attached image, some characters do not render correctly.  
In
> the
> > image, the top is Verdana and the bottom is Arial.  Both fonts 
have
> > problems with some characters.
> >
> > The displayed text is from a TextArea with an htmlText 
of "<TEXTFORMAT
> > LEADING='2'><P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='127'
> > COLOR='#000000' LETTERSPACING='0' KERNING='0'>The quick brown fox
> jumps
> > over the lazy dog</P></TEXTFORMAT>"
> >
> > Anyone have any thoughts as to what might be causing this or what
> could
> > be done to resolve the issue?
> >
> >  <http://img165.imageshack.us/img165/1466/fontissueuh4.jpg>
> >
>


Reply via email to