Ah, 2 thing to mention here. 1. In your CSS, instead of using local() (this is only supported by the JREFontManager as it is the only FontManager implementation that has access to your native operating system font server. The reason I suggest not using JREFontManager is that there are issues with the JRE's reporting of font metrics that can lead to layout issues), try using url() and point to the .ttf file itself. Many developers keep fonts in an assets folder with their Flex source and do something like this:
src: url("assets/SomeFontICanEmbed.ttf"); 2. In order to use the AFEFontManager in /frameworks/flex-config.xml, check that you have the following jars in your Flex SDK's lib directory: /lib/afe.jar /lib/aglj32.jar /lib/rideau.jar If you do not see these files, you may have downloaded the MPL version of the Flex SDK 3.1 (in the column "Open Source Flex SDK". If you can, try downloading the non-MPL version (in the column "Adobe Flex SDK") to get the complete functionality of Flex SDK 3.1. http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3 If you must use the MPL version, continue to use the url() syntax in your src: property of your CSS @font-face, rules but rely on the BatikFontManager in /frameworks/flex-config.xml. Pete P.S. Note you can leave the JREFontManager configured in /frameworks/flex-config.xml - you'd just leave it as the base (first) entry so that it can still handle any local() syntax in src: properties of @font-face CSS rules. Any FontManager entry following it will override its behavior for at least url() referenced fonts. For MPL SDK, try: <managers> <manager-class>flash.fonts.JREFontManager</manager-class> <manager-class>flash.fonts.BatikFontManager</manager-class> </managers> For non-MPL, i.e. the full SDK, try: <managers> <manager-class>flash.fonts.JREFontManager</manager-class> <manager-class>flash.fonts.AFEFontManager</manager-class> </managers> -----Original Message----- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Peldi Guilizzoni, Balsamiq Studios Sent: Wednesday, March 18, 2009 5:37 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] OS-dependent mxmlc behavior for fonts? I forgot to mention, I'm using the 3.1.0 framework. --------------------------------------------------- Giacomo 'Peldi' Guilizzoni Founder, Balsamiq Studios, LLC http://www.balsamiq.com ph: +1 (415) 367-3531, Skype, GTalk, Facebook, Twitter, FriendFeed: balsamiq On Wed, Mar 18, 2009 at 10:32 AM, Peldi Guilizzoni, Balsamiq Studios <pe...@balsamiq.com> wrote: > Peter, you're definitely on to something!!! > > Yes by system fonts I meant device fonts, and it wasn't Arial, it's > Comic Sans (ok, I admit it, shame on me for using it). I installed > msttcorefonts on my linux machine so it's the same old TTF from > Windows. > > If I comment out the Batik and the other manager and only leave this > in my flex-config: > > <!-- Compiler font manager classes, in policy resolution order--> > <managers> > <manager-class>flash.fonts.AFEFontManager</manager-class> > </managers> > > my build fails! > > /home/svnadmin/mockups/trunk/trunk/skins/sketch/sketch.css(19): Error: > exception during transcoding: No FontManager provided. Cannot build > font. > src: local("Comic Sans MS");</message> > - > > /home/svnadmin/mockups/trunk/trunk/skins/sketch/sketch.css(19): Error: > unable to build font 'mySketchFont' > src: local("Comic Sans MS");</message> > > /home/svnadmin/mockups/trunk/MockupsLive/build.xml:46: Java returned: 8 > at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) > at org.apache.tools.ant.Project.executeTarget(Project.java:1306) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1189) > at org.apache.tools.ant.Main.runBuild(Main.java:758) > at org.apache.tools.ant.Main.startAnt(Main.java:217) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > > So it appears that my linux machine doesn't have the AFEFontManager, > but how can it be? Is it a file I need to install? I've searched my > local HD and didn't find anything. > > We're so close, I can feel it! :) > > Peldi > --------------------------------------------------- > Giacomo 'Peldi' Guilizzoni > Founder, Balsamiq Studios, LLC > http://www.balsamiq.com > ph: +1 (415) 367-3531, Skype, GTalk, Facebook, Twitter, FriendFeed: balsamiq > > > > On Wed, Mar 18, 2009 at 2:50 AM, Peter Farland <pfarl...@adobe.com> wrote: >> Peldi, by system font, do you mean device fonts (i.e. not embedded)? >> >> What version of Flex? Are you pointing to a .ttf file using an @font-face >> CSS rule with a url? >> >> If so, and if you're using Flex SDK 3, go into your >> /frameworks/flex-config.xml and comment out the BatikFontManager from the >> list of font managers, and try just leaving the AFEFontManager. >> >> Pete >> >> -----Original Message----- >> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On >> Behalf Of Peldi Guilizzoni, Balsamiq Studios >> Sent: Tuesday, March 17, 2009 5:34 PM >> To: flexcoders@yahoogroups.com >> Subject: Re: [flexcoders] OS-dependent mxmlc behavior for fonts? >> >> Thanks for the reply Rick. I am using 2 TTF files for the embedded >> fonts, and a system font (Arial) as well. >> I do not anticipate any change to my fonts, no. Why? >> I don't really like the SWF option...do you or anyone else know why >> I'm getting these differences? What part of mxmlc is >> platform-dependent? Can it be tweaked/fixed? >> >> Peldi >> --------------------------------------------------- >> Giacomo 'Peldi' Guilizzoni >> Founder, Balsamiq Studios, LLC >> http://www.balsamiq.com >> ph: +1 (415) 367-3531, Skype, GTalk, Facebook, Twitter, FriendFeed: balsamiq >> >> > ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links