Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Later
-
Adobe Flex SDK 3.1 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Run the attached Flex app
Actual Results:
In the Courier section, the second and third mx:Text samples ignore the <br> and show all the text on one line.
If you change the CSS to make Courier the default font, this is reversed: the embedded font samples will be the broken ones.
Expected Results:
mx:Text should respect the <br> tag in all cases
Workaround (if any):
Wrap the <mx:Text> in a container that sets fontFamily to font that is different from what you are going to use, but of the same type (embedded / device):
<mx:Canvas fontFamily="Times New Roman">
<mx:Text htmlText="Text, <br>bound" fontFamily="
" />
</mx:Canvas>
This seems to fake it out: the mx:Text's changing the font a second time gets it into a good state, and the embed <-> device change has already been absorbed by the sacrificial parent container.
Or try setting up one of the "does not repro" cases listed in the notes below.
Notes:
- does not repro with other HTML formatting like <u> – these are respected even in the "broken" cases
- does not repro if newlines (\n) are used instead of <br>s
- repros even if the CSS default comes from a parent container rather than the global{} selector
- does not repro if both fonts are embedded, or if both fonts are device fonts
- repros even if the data-binding is to a const variable
- repros in the programmattic case even if the htmlText is programmatically reset after changing the font
- does not repro with htmlText in mx:TextArea