开发者

Problem with embedded fonts on input field

I'm trying to embed a font using css on in my flex project via CSS:

@font-face {
    src: url("/slimCurves.ttf");
    fontFamily: SlimCurves;
    embedAsCFF: true;
    font-weight:normal;
}


.slimCurves
{
    fontFamily: SlimCurves;
    fontLookup: embeddedCFF;
    fontSize: 15px;
}开发者_StackOverflow

When I try to apply the style to a text input field the input field looses its existing style, but doesn't seem to inherit the custom one.

<s:TextInput width="100%" fontSize="33" text="test" styleName="slimCurves"/>

If I apply the same style to a label, the label shows the text in the custom font as would be expected. Any ideas?


Looks like this had something to do with the selected theme. Selecting a different template seems to have resolved this issue.


I think the problems is due to the fact that Buttons Text is by default in BOLD. You are creating only the normal Font and not the bold one.

I usually use this code:

@font-face{
   src: url("FONT.TTF");
   fontFamily: DAX2;
   font-weight:normal;
}
@font-face{
   src: url("FONT.TTF");
   fontFamily: DAX2;
   font-weight:bold;
}

Kind regards, Claudio

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜