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

In textAlign right or center, Passing [space] to measureText() returns a lineMetrics with width 0.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.0 (Release)
    • None
    • mx: Text
    • None
    • Affected OS(s): Windows
      Affected OS(s):
      Language Found: English

    Description

      Steps to reproduce:
      1.text.setStyle("textAlign","right"); or text.setStyle("textAlign","center")
      2.text.validateNow();
      3.text.measureText(" ").width;

      Actual Results:
      no matter how many spaces passed in, width always return 0. if you pass a string which ends in spaces, the width of these spaces will be ignored. (it can correctly processing the string begins with spaces)

      Expected Results:
      actual text width includes spaces

      Workaround (if any):
      to calculate the actual space width, you have to do something like text.measureText(string+"A").width - text.measureText("A").width;

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: