incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Line" <>
Subject RE: Embedded fonts, mixed FTE/Textfield components, and embedAsCFF
Date Fri, 16 Nov 2012 18:54:52 GMT
In a large application working on we load the same font twice to overcome
this problem, although we don't embed the full font only some characters.

Seems to work quite well until we finish moving fully to tlf

-----Original Message-----
From: Alex Harui [] 
Sent: 16 November 2012 18:45
Subject: Re: Embedded fonts, mixed FTE/Textfield components, and embedAsCFF

Yes, you can certainly embed the font twice, it just fattens the app, and if
you have a full unicode font, that can be hefty.

I think StyleableTextField is in the Spark namepace which typically has the
s| prefix.  The LabelItemRenderer should be in Spark as well and setting
fontFamily there should work.

On 11/16/12 10:24 AM, "Russell Warren" <> wrote:

>> Unfortunately, that is a trade-off you will have to make.
> Do I really need to trade this off?  Can I use brute force instead?  
> For example... is there some way I can embed the same font twice, once 
> as CFF for all the Spark skins, and once as non-CFF for anything based 
> on TextField?
> Something like this:
> @font-face {
>>     src:url("assets/fonts/Vera.ttf");
>>     fontFamily: Vera;
>>     fontWeight: normal;
>>     fontStyle: normal;
>>     advancedAntiAliasing: true;
>>     embedAsCFF: true;
>>     }
>> @font-face {
>>     src:url("assets/fonts/Vera.ttf");
>>     fontFamily: Vera*NoCFF*;
>>     fontWeight: normal;
>>     fontStyle: normal;
>>     advancedAntiAliasing: true;
>>     embedAsCFF: *false*;
>>     }
> Is this possible to split between Spark/FTE and MX/TextField?  I can't 
> figure out a CSS selector path for identifying styles for 
> StyleableTextField instances.  I don't quite understand the CSS, though.
>  For instance I have no idea how the snippet below fixes the font 
> issues for the MX tooltips and, but it works perfectly:
> /* Changing the global fontFamily above breaks mx components.  The
>> mx|global bit below fixes this.
>>       Source:
>> x-4
>> */
>> mx|global {
>>     textFieldClass: ClassReference("mx.core.UIFTETextField");
>> }
> If the brute force font double-up has the potential of working... how 
> would I set the fontFamily for StyleableTextField to VeraCFF?  I've 
> tried this
> with:
> StyleableTextField {
>>     fontFamily: VeraNoCFF;
>> }
> but the compiler complains that "Type 'StyleableTextField' in CSS 
> selector 'StyleableTextField' must be qualified with a namespace." and 
> I can't figure out what the namespace would be to get to

Alex Harui
Flex SDK Team
Adobe Systems, Inc.

View raw message