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

Inconsistent display of embedded Arial font in the Alert Control when using BatikFontManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • Adobe Flex SDK 3.0 (Release)
    • None
    • mx: Alert
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Internet Explorer 7.x
      Language Found: English

    Description

      Steps to reproduce:

      1. Make sure the Arial and Arial Bold fonts (arial.ttf, arialbd.ttf) are installed to C:\WINDOWS\Fonts.

      2. Compile and run the attached MXML application.

      Actual Results:

      An alert dialog is displayed with a message that reads "The application data file is corrupt or." Note that the full error message should read, "The application data file is corrupt or invalid." It appears that the Alert Control is miscalculating the width of the alert text when the font is embedded using the BatikFontManager, causing the message to truncate. This may be confirmed by adding the following compiler argument:

      -compiler.fonts.managers flash.fonts.BatikFontManager

      Expected Results:

      The full alert message is displayed without being truncated.

      Workaround (if any):

      Changing the width of the message, either by adding or subtracting words, seems to correct this issue. Of course, if you want the error to read exactly as written, then you're out of luck. Furthermore, there doesn't appear to be a way to determine when fonts will be displayed correctly in the Alert Control, or what strings will prevent the alert message from being truncated. As such, this behavior yields erratic results.

      That being said, the JRE font manager seems to render the Arial font correctly, which may be confirmed by adding the following compiler argument:

      -compiler.fonts.managers flash.fonts.JREFontManager

      However, the Flex documentation states that, 'In general, the Batik font manager provides smoother rendering and more accurate line metrics.' So one would assume is goes against best practice to switch the font manager simply to stabilize font rendering in the Alert Control. Plus, there may be residual effects on other fonts in the application after switching the global font manager.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: