Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-21805

[TLF 2472526] Imported TextFlow no longer displays bold or italic text

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: FTETextField
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Found in trunk 4.0.0.11402

      Steps to reproduce:
      1. Compile and run attached MXML file.

      Actual Results:
      Note that the Spark RichText control doesnt display "Quick" in bold font or "Fox" in italic font.
      This works for both Halo Text controls.

      Expected Results:
      Bold and italic should appear.

      Workaround (if any):
      Use a different default font in the HTML string. If i wrapped everything in a <font face="arial">...</font> block, it displayed as expected. Not sure if it is due to the switch to some "Times Roman" font (which I believe should be Times New Roman").


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo"
      creationComplete="init();">

      <fx:Script>
      <![CDATA[
      import flashx.textLayout.conversion.ConversionType;
      import flashx.textLayout.conversion.TextConverter;
      import flashx.textLayout.elements.TextFlow;

      XML.ignoreWhitespace = false;

      public const condenseWhiteTxt:String = "<p>The <b>Quick</b> <font color='#FF0000'>Brown</font> <i>Fox</i> <a href='http://adobe.com/'>Jumps</a> <u>Over</u> The Lazy Dog.</p><p>Paragraph <b>2</b></p>";

      private function init():void

      { var importr:TextFlow = TextConverter.importToFlow(condenseWhiteTxt, TextConverter.TEXT_FIELD_HTML_FORMAT); var exportr1:Object = TextConverter.export(importr, TextConverter.TEXT_FIELD_HTML_FORMAT, ConversionType.STRING_TYPE); var exportr2:Object = TextConverter.export(importr, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE); in1.text = condenseWhiteTxt; out.textFlow = importr; out2.htmlText = exportr1.toString(); out3.htmlText = condenseWhiteTxt; ta1.text = exportr1.toString(); ta2.text = exportr2.toString(); }

      ]]
      >
      </fx:Script>

      <mx:Form>
      <mx:FormHeading id="sdkVer" initialize="sdkVer.label = mx_internal::VERSION;" />
      <mx:FormItem label="input:">
      <mx:Label id="in1" />
      </mx:FormItem>
      <mx:FormItem label="output (Spark):">
      <s:RichText id="out" />
      </mx:FormItem>
      <mx:FormItem label="output (Halo):">
      <mx:Text id="out2" />
      <mx:Text id="out3" />
      </mx:FormItem>
      <mx:FormItem label="HTML format:">
      <s:TextArea id="ta1" widthInChars="60" />
      </mx:FormItem>
      <mx:FormItem label="TextFlow format:">
      <s:TextArea id="ta2" widthInChars="60" />
      </mx:FormItem>
      </mx:Form>

      <s:RichText>
      <s>dfgpdofigdfg</s>
      </s:RichText>

      </s:Application>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment