PDA

View Full Version : TextArea is not reflecting the Embedded Fonts


tarjinder80
03-18-2009, 07:02 AM
Hi,

I am making a TextEditor using TextArea component in FLex3.
I am embeddding fonts using this method
@font-face {
src:url("impact.TTF");
fontFamily: Impact;
unicode-range:
U+0020-U+0040, /* Punctuation, Numbers */
U+0041-U+005A, /* Upper-Case A-Z */
U+005B-U+0060, /* Punctuation and Symbols */
U+0061-U+007A, /* Lower-Case a-z */
U+007B-U+007E; /* Punctuation and Symbols */

}

i have textarea component named myTxt.
i am doing myTxt.htmlText = "<font face='Impact' size='12'>Hello Testing Font Embedding</font>";
TextArea is not reflecting the font.
If i create a TextField and apply the same font, the textfield is reflecting the font.

Please help.

box86rowh
03-18-2009, 06:06 PM
try using css to apply the font

wrs
03-19-2009, 01:40 AM
I believe i recently read somewhere that textarea defaults to Verdana, and if it doesnt find that as an embeded font then it will not use any other embeded font.;

IIRC the solution was to embed Verdana too. I can't find where I read this, but hopefully it points in the right direction.

Sekhar
03-19-2009, 06:56 AM
Set fontFamily to Impact for the TextArea.

Skampler
06-30-2009, 03:56 PM
I believe i recently read somewhere that textarea defaults to Verdana, and if it doesnt find that as an embeded font then it will not use any other embeded font.;

IIRC the solution was to embed Verdana too. I can't find where I read this, but hopefully it points in the right direction.

Man, I've just registered to say thanks to you. This post has saved my day.:D

I've been strugling for many hours to find a solution to TextArea not showing an embedded font and that trick of embedding Verdana also has been the only solution. It's really odd, and I had never imagined that, but it works like a charm! :-S

Kudos to you my friend!

shyamal
07-29-2009, 06:09 PM
I was also battling a similar problem where I used an embedded font to display Bengali. But then I could not display any Roman character within the Text. Adding Verdana as an embedded font, solved the problem.

Thanks

Shyamal

lucidlive999
02-15-2011, 12:50 PM
I was trying to load a font a runtime. I think I logged about 8 hours trying to figure out why the font would not apply to the TextArea. The font would apply to all my other components but not the TextArea. How can this be?

Embedding Verdana in the application solved my problem. I can't believe this is the solution.