views:

87

answers:

2

Hi!

I have an application with a css for skinning. I noticed that some texts are not displayed as they should regarding the colors. Here's an image to give you a better idea of the issue:

alt text

The texts should be kinda grey. The color is correctly displayed on the top part of the text, but the bottom is kind of faded. The same goes for "Europe". The text is not very clear.

Here is the CSS code, just in case:

.HPLabels
{
 padding-bottom: 0;
 padding-top: 2;
 fontFamily: Ericson;
 fontSize: 9;
 color: #58585A;
 fontWeight: normal;
 font-anti-alias-type: advanced;
 fontSharpness: -100;
}

And here is the mxml code:

<mx:Label text="..." width="20%" styleName="HPLabels"/>

Would anyone have an idea of what is going wrong?

A: 

In Flex some styles from the parent of a widget affect its children. Take a look at the CSS for the object that contains your label.

Josh Knauer
Hi, Thanks for your answer. But the parent container has not custom style... >_<
BS_C3
+1  A: 

Your font-sharpness seems inappropriate for that font as well - does setting it to 0 fix the problem? Also, at what size did you embed the "Ericson" font? Since it's a pixel font - you may have to make sure it's embeded at the size you're using it, the font outlines may differ from size to size and cause this blurriness you're seeing.

quoo
Hi!Setting the font sharpness to 0 doesn't fix the problem.However, I didn't know that you embed a font depending on a size. How do I set the embed font's size?
BS_C3
Well, it depends how you're embeding it - I think it's only an issue if you're using a fonts.swf rather than embeding the font directly. You can then edit the fonts.swf to include the font at the size you're using it.
quoo
oh, also, since it's a bitmap font, you'll want font-anti-alias-type: normal; rather than advanced.
quoo
Hi!I actually used the font-anti-alias-type to remove the bluriness =PRegarding the font, I'm embeding a ttf font... how do I edit the font?
BS_C3
oh well, then you do have all the font sizes if it's a tff, sounds like it was just the aliasing:)
quoo
Hi!Actually it's not the aliasing (I didn't express myself properly?).The aliasing property does not change the blurring problem... -_-'Any more clues?
BS_C3