From: thomas m. <tho...@gm...> - 2006-08-22 22:33:32
|
Hi all, I having a real hard time figuring out how to use embedded fonts with actionstep. I was trying to change the default font for all the application so I subclassed 'systemFontOfSize' in my custom theme. Here's what I did : function systemFontOfSize(fontSize:Number):NSFont { if (fontSize <= 0) { fontSize = systemFontSize(); } return NSFont.fontWithNameSizeEmbedded("Bliss", fontSize,true); } Of course the font has to be embedded in the swf so I tried the swfmill <font> solution which consists in a swml fil looking like this : <?xml version="1.0" encoding="iso-8859-1" ?> <movie width="1" height="1" framerate="12"> <frame> <library> <font id="Bliss" name="Bliss" import="D:\www\_sites\ScreenMatters\screenmatters.com\ressources\Fonts\BLISSHEAVY.TTF"/> </library> <Import file="fontsLibrary.swf" url=" http://mysite/flash/fontsLibrary.swf"></Import> </frame> </movie> It worked fine except that in an NSButton most of the fonts I have tried cause the button label to shifted approximatively 20 px up (using a NSButtonType.NSPushOnPushOffButton and pressing the button once shifts the label back into place ... ) + the fitToSize Method seems to not be working when the font is embedded it also appeared that menu items didn't seem to resize to the item text size properly and so the menu was not looking right (the end of the labels would for instance disappear under the arrow thats used to indicate a submenu) I then tried compiling on top of an already existing swf with the right font present in the library and linked with the correct id and the shifting dissapeared but the other problems didnt Would someone help me in solving this ? What is your preffered method regarding using embedded fonts ? thanks in advance thomas ps. is there an online app that is using actionstep ? I would have a look a indi but (would u believe it) I don't have a usb drive around. |