Hi, I try to achieve the subject mentions goal, but with no success. I wasted about two days but with no success. Nothing that talked about on the web works for me.
I'm using flexmojos & maven to build the app. I found out that sytles apply to mx:Label, but s:Label doesn't work (on desktop & mobile). The project running on desktop and mobile platforms. Here is subset of links I found. Unfortunately nothing helped. http://blogs.adobe.com/jasonsj/2011/08/embedding-fonts-in-flex-mobile-projects.html https://docs.sonatype.org/display/FLEXMOJOS/FAQ https://docs.sonatype.org/display/FLEXMOJOS/Using+Adobe+Font+Manager+to+embed+fonts https://flexmojos.atlassian.net/wiki/display/FLEXMOJOS/Embedding+(CFF)+fonts http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f5f.html I also read this. http://apache-flex-users.2333346.n4.nabble.com/CFF-fonts-render-bolder-in-Apache-4-9-over-Adobe-4-1a-td979.html#a986 The font is here http://www.dafont.com/explora.font I tried to convert it to .otf and .cff. In case with cff I get the transocode error while compile. .otf similar to .ttf doesn't work. That is my css file: -- main.css -- ... @font-face { src:url("../resources/assets/explora.ttf"); fontFamily: "ExploraCFF"; fontWeight: bold; embedAsCFF: true; } @font-face { src:url("../resources/assets/explora.ttf"); fontFamily: "Explora"; fontWeight: bold; embedAsCFF: false; } .nameLabelExplora { fontFamily: "ExploraCFF"; fontLookup: "embeddedCFF"; } ... -- main.mxml -- ... <fx:Style source="main.css"/> <s:Label id="nameLabel" color="#ffff7d" fontSize="20" paddingTop="3" paddingLeft="5" paddingRight="5" styleName="nameLabelExplora"/> ... In my pom.xml I added font managers and dependencies for flexmojos-maven-plugin -- pom.xml -- <plugin> <groupId>net.flexmojos.oss</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>6.0.1</version> <extensions>true</extensions> <configuration> <storepass/> <debug>${flex.debug}</debug> <defines> <property> <name>CONFIG::debug</name> <value>${flex.debug}</value> </property> </defines> <staticLinkRuntimeSharedLibraries>true</staticLinkRuntimeSharedLibraries> <fonts> <managers> <manager>flash.fonts.AFEFontManager</manager> <manager>flash.fonts.CFFFontManager</manager> </managers> </fonts> </configuration> <dependencies> <dependency> <groupId>com.adobe.flex.framework</groupId> <artifactId>flex-framework</artifactId> <version>${flex.version}</version> <type>pom</type> </dependency> <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> </dependency> <dependency> <groupId>com.adobe.flex.compiler</groupId> <artifactId>afe</artifactId> <version>${flex.version}</version> </dependency> <dependency> <groupId>com.adobe.flex.compiler</groupId> <artifactId>aglj40</artifactId> <version>${flex.version}</version> </dependency> <dependency> <groupId>com.adobe.flex.compiler</groupId> <artifactId>rideau</artifactId> <version>${flex.version}</version> </dependency> </dependencies> </plugin> Could anybody tell me how to achieve the spark label to be styled within the custom font? -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/How-to-embedd-font-and-apply-it-to-s-Label-flex-4-10-tp8216.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
