2 Replies Latest reply on Jun 9, 2009 4:39 AM by bcsnyder

    Device Fonts - Jagged/aliased

    bcsnyder Level 1

      I am currently working on a Flex app that uses device fonts. Under random circumstances the device fonts appear jagged and not anti-aliased in some areas, while appearing anti-aliased in other locations. On the few occasions I was able to rectify the issue, it was caused by another element pushing the text element that was jagged down by two pixels. Once I removed the problematic element, the jagged text became anti-aliased (the only way they interacted was the fact that they were siblings).


      At first glance it would be easy to assume that the issue is due to poor design (i.e. an element here and there pushing other elements off by one pixel) but, even if that was the case I would tend to assume that would not cause  Flash to improperly render the font.


      (note: The application I am working on was using embedded fonts, however it will now be available in a multitude of languages making it necassary to use device/system fonts)


      (note 2: interestingly enough I cannot reproduce the issue in a small scale test which leads me to assume that there is some sort of global cause sort of like when a Web browser goes into quirks mode)


      Example of the text (notice the different colors in the top example caused by the anti-aliasing):


        • 1. Re: Device Fonts - Jagged/aliased
          Flex harUI Adobe Employee

          DeviceText has its limitations and things like half-pixel position changes can make it look bad.  Use of filters and scrollrects also cause device text to skip the anti-aliasing pass.  Have you considered loading an embedded font per locale?  It definitely costs more, but will look nicer.  If you can't, try to make sure you place things on integer pixel boundaries.


          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          1 person found this helpful
          • 2. Re: Device Fonts - Jagged/aliased
            bcsnyder Level 1

            Thanks for the quick response, Alex.


            I will ensure that all my text elements are on integer. Loading an embedded font per locale was also not an option as the application will be supporting some non-latin languages which put the apps size beyond that of what is capable of building from Flex Builder.


            Thanks again.