Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-13-2009, 06:43 PM   #1
Registered User
Join Date: Apr 2007
Posts: 48
Default Embedded Fonts Mystery!!

Hey there, I have a mega mystery that needs solving in regards to embedded fonts.

I have generated an swf file that contains my embedded font of specified Unicode range, then I am loading this swf into my application. The code in the generated file for the font, automatically registers the font using the Font.registerFont method.

I then load this swf file into my application, I never add it to the display list, I just created an instance of the file so that the code is executed to register the font.

Then I use the font name when I create embedded text fields and there you go it works... well it used to, I am not having any luck at the moment though. Sometimes it displays fine, other times it all appears cut off and I see a few pixels of the text I am trying to display.... Anyone else had a similar issue? Know what it might be?

I have created a class below that I am using for the embedded font text, any issues people see with this? Thanks for your help.

ActionScript Code:
public class EmbededTextField extends TextField     {         public function EmbededTextField(fontName:String, size:int, color:uint, passedX:int, passedY:int, align:String, passedSelectable:Boolean = false)         {             super();                         selectable = passedSelectable;             x = passedX;             y = passedY;             embedFonts = true;              antiAliasType = AntiAliasType.ADVANCED;             autoSize = TextFieldAutoSize.LEFT;             defaultTextFormat = new TextFormat(fontName, size, color,null,null,null,null,null,align);                     }           }
lucas_wallsi is offline   Reply With Quote
Old 11-13-2009, 06:56 PM   #2
Registered User
Join Date: Apr 2007
Posts: 48

Well, possibly I found the answer, might just be a coincidence though. I removed the line antiAliasType and it hasn't played up since.. not sure if its related, or how it could effect it intermittently... we will see..
lucas_wallsi is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:54 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.