Well if you want to use the CSS Font Manager in MX components I
remember that you have to explicitly reference a special CSS file
(MXFTEText.css) that configures the textFieldClass to use a different
class:
mx|Label
{
textFieldClass: ClassReference("mx.core.UIFTETextField");
}
Mabe this helps.
I wrote up a lot of stuff regarding CFF embedding in my confluence:
http://dev.c-ware.de/confluence/display/PUBLIC/Embedding+%28CFF%29+fonts
Chris
2011/7/26 David Keutgens <[email protected]>:
> Thanks muji,
>
> only using CFFFontManager doesn't help, unfortunately. Still have to
> try enumerateFonts.
>
> I ran some more tests and it turns out that it's not because of the
> library. It rather seems to be only related to TextInput components,
> all Labels embed the font (Arial in this case) without problems.
>
> Does anyone have any other ideas?
>
> Thanks,
> David
>
>
> On Jul 14, 6:20 pm, muji <[email protected]> wrote:
>> If you are using FTE which it looks like it by the embedded theme try
>> just specifying the CFFFontManager:
>>
>> <managers>
>> <manager>flash.fonts.CFFFontManager</manager>
>> </managers>
>>
>> Being sure to do it for the swc (or swf) that compiles in the font(s).
>>
>> That fixed it for me recently using FTE with embedded fonts.
>>
>> Event when I put the CFFFontManager above the others it still didn't
>> work correctly (even though flexmojos was passing the options to mxmlc
>> correctly).
>>
>> I also suggest using Font.enumerateFonts() and the FontDescription
>> class to find out what is going on with the fonts...
>>
>> Something like:
>>
>> protected function enumerateFonts():void
>> {
>> var embedded:Array = Font.enumerateFonts( false );
>> trace("enumerateFonts()", embedded, embedded.length );
>> for( var i:int = 0;i < embedded.length;i++ )
>> {
>> var f:Font = embedded[i];
>> trace("[font name]", f.fontName );
>> trace("[font type]", f.fontType );
>> trace("[normal compatible]", f.fontName,
>> FontDescription.isFontCompatible( f.fontName,
>> "normal", "normal" ) );
>> trace("[bold compatible]", f.fontName,
>> FontDescription.isFontCompatible( f.fontName,
>> "bold", "normal" ) );
>> trace("[italic compatible]", f.fontName,
>> FontDescription.isFontCompatible( f.fontName,
>> "normal", "italic" ) );
>> }
>>
>> }
>>
>> The fontType property being very important, if you are using FTE you
>> would want a value of "embeddedCFF".
>>
>> Hope that is some help.
>>
>> On Thu, Jul 14, 2011 at 3:39 AM, David Keutgens
>>
>>
>>
>>
>>
>>
>>
>> <[email protected]> wrote:
>> > Hi All,
>>
>> > I'm using Flexmojos 4.0-SNAPSHOT.
>>
>> > I have a project library swc file that contains a component
>> > (LookupInput) which extends TextInput. My main application uses font
>> > embedding which works fine for all text components within my main
>> > application's source path. But when I use the library's LookupInput
>> > component within my main application, it doesn't use embedded fonts.
>>
>> > Even if I explicitly set the embedded font for LookupInput in my main
>> > application's CSS file, the compiled application doesn't use embedded
>> > fonts for that component but for everything else.
>> > If I compile using FlashBuilder, font embedding works fine for
>> > everything.
>>
>> > I compared the config dumps of Flashbuilder/Flexmojos for both the
>> > library and my main application but I can't spot anything that be
>> > causing this behavior. But maybe I'm missing something.
>> > Has anyone ever had a similar problem?
>>
>> > These are the important bits of my pom files:
>>
>> > My library:
>> > ---------------------------------------------------------------------------
>> > --------------------------------------
>> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
>> >www.w3.org/2001/XMLSchema-instance"
>> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> >http://maven.apache.org/maven-v4_0_0.xsd">
>> > <modelVersion>4.0.0</modelVersion>
>>
>> > <groupId>com.example</groupId>
>> > <artifactId>common</artifactId>
>> > <version>1.0.0-SNAPSHOT</version>
>> > <packaging>swc</packaging>
>>
>> > <name>common</name>
>>
>> > <properties>
>> > <flex.version>4.5.0.20967</flex.version>
>> > <flexunit.version>0.90</flexunit.version>
>> > </properties>
>>
>> > <build>
>> > <sourceDirectory>src/main/flex</sourceDirectory>
>> > <testSourceDirectory>src/test/flex</testSourceDirectory>
>> > <plugins>
>> > <plugin>
>> > <groupId>org.sonatype.flexmojos</groupId>
>> >
>> > <artifactId>flexmojos-maven-plugin</artifactId>
>> > <version>4.0-SNAPSHOT</version>
>> > <extensions>true</extensions>
>> > <configuration>
>> > <swfVersion>11</swfVersion>
>> > <targetPlayer>10.2.0</targetPlayer>
>> > <optimize>true</optimize>
>> >
>> > <loadConfig>mxmlcconf.xml</loadConfig>
>> >
>> > <advancedAntiAliasing>true</advancedAntiAliasing>
>> > <maxCachedFonts>20</maxCachedFonts>
>> >
>> > <maxGlyphsPerFace>1000</maxGlyphsPerFace>
>> >
>> > <removeUnusedRsls>true</removeUnusedRsls>
>> > <managers>
>> >
>> > <manager>flash.fonts.JREFontManager</manager>
>> >
>> > <manager>flash.fonts.BatikFontManager</manager>
>> >
>> > <manager>flash.fonts.AFEFontManager</manager>
>> >
>> > <manager>flash.fonts.CFFFontManager</manager>
>> > </managers>
>> > <themes>
>> >
>> > <theme>${basedir}/src/main/assets/css/MXFTEText.css</theme>
>> > </themes>
>> >
>> > <defaultFrameRate>24</defaultFrameRate>
>> > <ditaSkip>true</ditaSkip>
>> > <localesCompiled>
>> > <locale>en_US</locale>
>> > </localesCompiled>
>> > </configuration>
>> > <dependencies>
>> > <dependency>
>> >
>> > <groupId>com.adobe.flex</groupId>
>> >
>> > <artifactId>compiler</artifactId>
>> >
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > <dependency>
>> >
>> > <groupId>com.adobe.flex.compiler</groupId>
>> >
>> > <artifactId>flex-fontkit</artifactId>
>> >
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > <dependency>
>> >
>> > <groupId>com.adobe.flex.compiler</groupId>
>> > <artifactId>afe</artifactId>
>> >
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > <dependency>
>> >
>> > <groupId>com.adobe.flex.compiler</groupId>
>> >
>> > <artifactId>aglj40</artifactId>
>> >
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > <dependency>
>> >
>> > <groupId>com.adobe.flex.compiler</groupId>
>> >
>> > <artifactId>rideau</artifactId>
>> >
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > </dependencies>
>> > </plugin>
>> > </plugins>
>> > </build>
>>
>> > <dependencies>
>> > <dependency>
>> > <groupId>com.adobe.flex.framework</groupId>
>> > <artifactId>flex-framework</artifactId>
>> > <version>${flex.version}</version>
>> > <type>pom</type>
>> > </dependency>
>> > <dependency>
>> > <groupId>com.adobe.flexunit</groupId>
>> > <artifactId>flexunit</artifactId>
>> > <version>${flexunit.version}</version>
>> > <type>swc</type>
>> > <scope>test</scope>
>> > </dependency>
>> > ...
>>
>> read more »
>
> --
> You received this message because you are subscribed to the Google
> Groups "Flex Mojos" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/flex-mojos
>
> http://flexmojos.sonatype.org/
>
--
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos
http://flexmojos.sonatype.org/