Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6474811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:37:54+00:00 2026-05-25T06:37:54+00:00

EDIT: It looks like a bug in AIR. I’ve reported it here: https://bugbase.adobe.com/index.cfm?event=bug&id=2955444 please

  • 0

EDIT:

It looks like a bug in AIR.

I’ve reported it here: https://bugbase.adobe.com/index.cfm?event=bug&id=2955444

please vote on it ↑


Problem:

I’ve tried to display white text on a colored background in FlashPlayer & AIR runtime. Unfortunately, the text displayed in the AIR runtime looks much worse, than FlashPlayer one.

Here is how does it look (AIR version at top, FlashPlayer at bottom):

IMG: http://imageshack.us/photo/my-images/710/fontcomparison.png/

So, the question is,

  • why there is such a difference?
  • how to resolve this issue, so the text in AIR looks exactly like FlashPlayer one (without font embedding)?

code:
main.mxml:

<?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/mx" minWidth="955" minHeight="600">
    <fx:Style source="style.css" />
    <s:Label text="() sample text ()" styleName="test" />
</s:Application>

style.css:

/* style.css CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
.test {
    font-family: Arial;
    font-size: 10;
    font-weight: bold;
    color: white;

    background-color: #BC2C49;
    paddingBottom:10px;
    paddingLeft:10px;
    paddingRight:10px;
    paddingTop:10px;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:37:54+00:00Added an answer on May 25, 2026 at 6:37 am

    I’ve finally found a workaround (based on fact, that fonts are drawn correctly on bitmaps). Feel free to use it, just replace <s:Label ...>, with <components:LabelWorkaround .../>.

    package components
    {
        import flash.display.Bitmap;
        import flash.display.BitmapData;
    
        import spark.components.Label;
    
        /**
         * <p>This class is a simple workaround for a bug 
         * <a href="https://bugbase.adobe.com/index.cfm?event=bug&id=2955444">#2955444</a>.
         * The trick is to draw base text on a <u>non-transparent</u> bitmap, so it renders correctly.</p>
         *
         * <p>Unfortunately if you would like to have background color other than white, <br/>
         * then you have to pass it using styles.</p>
         * 
         * @author Filip Zawada
         * @license Free to commercial use.
         * 
         * @see spark.components.Label
         * @see flash.display.BitmapData
         */
        public class LabelWorkaround extends Label
        {
            private var textBitmapData:BitmapData;
            private const textBitmap:Bitmap = new Bitmap();
    
            public function LabelWorkaround()
            {
                super();
                addChild(textBitmap);
            }
    
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
            {
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                textBitmap.visible = false; // turn off bitmap layer, to draw base text
                textBitmapData = new BitmapData(unscaledWidth, unscaledHeight, false);
                textBitmapData.draw(this); // render modified base text
                textBitmap.bitmapData = textBitmapData;
                textBitmap.visible = true; // turn on bitmap layer
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT - The code looks strange here, so I suggest viewing the files directly
Edit: Of course my real code doesn't look exactly like this. I tried to
Edit: This question was written in 2008, which was like 3 internet ages ago.
EDIT: I am attempting to encapsulate a 3rd party com object in .net classes
It looks like you can't use exec in a function that has a subfunction...
Consider the code below. Looks like perfectly valid C# code right? //Project B using
I'm using a script that looks like this: $.ajax({ url: 'myservice', type: 'POST', contentType:
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know
We are look at providing a method for our non-technical users to edit XML
Edit: From another question I provided an answer that has links to a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.