This content has been marked as final. Show 12 replies
I'm bumping this thread. It seems like a straightforward enough question. Is there an Adobe rep (or anyone!) who can answer it please?
How are you defining the selected text to display with your custom font?
Thanks for the response!
Initially I'm using textrange to assign the fontFamily. I am actually recoding an app I originally coded with Flash MX 2004, so some of the data is coming straight from the DB with the appropriate font face tags wrapping where needed (it worked in flash 7). I've tried to dumb everything down so far that I'm writing the html and assigning it as htmlText to a textarea component, but it still won't work.
hope this helps you help me =)
I found this in the help....
<mx:TextArea height="100" width="250">
<mx:htmlText><![CDATA[You can vary the <font size='20'>font size</font>,<br><font color="#0000FF">color</font>,<br><fontface="CourierNew, Courier, Typewriter">face</font>, or<br><font size="18"color="#FF00FF"face="Times, Times New Roman, _serif">any combination ofthe three.
I tried it.. and it doesnt display the text after the fontface is changed. This is straight from the help docs, so it should work... however I have found mistakes in the help docs before..
Is this where you're getting your problem?
Actually, I got that example to work... here are the changes I made...
<![CDATA[You can vary the <font size='20'>font size</font>,<br><font color="#0000FF">color</font>,<br><font face="Courier New">face</font>, or<br><font size="18"color="#FF00FF"face="Times New Roman">any combination of the three.</font>]]>
As I said above, I have found errors in the code of the help docs... this is yet another one of them. Usually its spaces in the wrong place, or no space at all, or missing ) or ], or a case sensitivity issue.
If you got your custom font to display, that should work... but then again.. what should work, doesn't always.
I've tried that. Works great when I've got the system font installed, but not when I embed it and remove it from the system. At the same time those conditions do work for other components, which is why I'm leaning towards it being a bug...
Try downloading some free weird font (that is not currently on your system), embedding it in your app (but not installing it on your system) and make the same example work in a text area component.
Again, the embedded font displays properly in buttons, etc. The problem is when I try to format some html text in a text area component.
I see what you mean...
Do you think that maybe the html code is looking for system fonts and not even seeing what you have embedded in the application? This would make sense. Is there a way to embed fonts in html? You might want to try that.. but I'm not sure Flex can handle something like that.
I expect that since we embed fonts in an application because we assume the end user will not have that font installed ~and it is essential that they see what we intend for them to see~ the embedded font should render anywhere within the application...
Which is why I'd like clarification on this. If it is a bug I'd really like to have some closure!
bumping again for obvious reasons...
Is there a solution for this problem?
I need to apply an embedded font to the <h1>-tags in my html, but it only works if you have installed the font on your system...
try embedding the font in actionscript, converting it to a swf and loading it in Flex. Here's a link:
you have to take the .as file and drag it over the mxmlc.exe icon to turn it into a swf.
oh wait, I didn't see that h1 tag thing. use the embed using css version.