incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Embedded fonts, mixed FTE/Textfield components, and embedAsCFF
Date Fri, 16 Nov 2012 18:45:11 GMT
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" <russ@perspexis.com> 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 Alert.show, but it works perfectly:
> 
> /* Changing the global fontFamily above breaks mx components.  The
>> mx|global bit below fixes this.
>>       Source:
>> http://mikeorth.com/2012/embedded-fonts-with-tooltip-and-alert-in-flex-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 StyleableTextField.

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Mime
View raw message