Thank you for the suggestion. It tried it on the TextArea but it didn’t work. (putting it in the css and applying it via the styleName).

I might give it a try with the UITextField component later on, maybe it will work then.

 

I wonder if this should be filed as a bug as the documentation clearly states that the face attribute in the font tag also checks for embedded fonts…

 

Bart

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Freiman
Sent: donderdag 31 augustus 2006 16:58
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Using Embedded fonts in htmlText

 

I don't know why that is happening, and I don't know what's causing it exactly, but one workaround that I've seen elsewhere that might work here is to set the fontfamily ("Arial, Symbol")  to every font you might want to use in that textarea and then you should using html be able to set the the htmlText to any font that you have set fontFamily to (even mixing fonts simultaneously).  Don't know why this should work, but it has for me in UITextFields which is the textfield inside the TextArea.

On 8/31/06, Bart Vanhulle <bart.vanhulle@eun.org> wrote:

I was wondering if someone managed to achieve this. After struggling with embedding some fonts I finally got it working to some degree.

The fonts are taken in most components. However, when I'm trying to use an embedded font in a <font> tag and drop it in the htmlText attribute of a TextArea, the text is not using the embedded font, although the documentation claims it should. (devguide, 'Using tags in html text')

 

This is what I have in the css:

 

@font-face {

            src: url('/assets/fonts/arial_emb.ttf');

            fontWeight: normal;

            fontFamily: arialtest

}

 

.textarea { embedFonts: true; font-weight: normal; }

 

In the component I have something like this:

 

<mx:TextArea id="info" width="200" height="100" htmlText="" />

 

info.htmlText = "<font face='arialtest' size='14'>test test test test</font>";

 

This will take the default font setting of the flash application. arialtest is never applied.

 

This however works:

 

<mx:TextArea id="info" width="200" height="100" fontFamily="arialtest" htmlText=" />

 

info.htmlText = "<font size='14'>test test test test</font>";

 

But this is not what I want as there will be text in different formatting styles in that field…

 

Bart

 

 

 

 

__._,_.___

--
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




__,_._,___

Reply via email to