954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

calibri font display is unclear if text is read from xml file

problem in short - when the flash file reads text from a xml file, the font display is unclear. when the text is embedded in the flash, it appears clearly

problem in detail -

i would appreciate your help because i am unable to resolve this problem despite my best efforts. please see '~about.fla'. it has been decompiled from a swf file as the original source code was not available (can this be causing the problem?). the xml folder resides in the same folder as '~about.fla'. it contains 'about.xml'. you can download these files at http://rapidshare.com/files/306946284/calibri_font_unclear_if_read_from_xml.zip

i discovered a problem - if you view 'about.swf' - when you click on 'history' link, you can see that the text is distorted. this text is read from the xml file. but is you click on the 'key people' link, you can see that the text appears perfectly. this text is embedded in the flash itself.

please help me to resolve this problem. thank you in advance for you time and efforts.

i have given the screenshots 'text is unclear.jpg' and 'text is clear.jpg' to further explain my query.

please tell me if i have explained my problem properly or further clarifications are needed.

sandra21
Newbie Poster
17 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

Steps:

1. Rightclick emptyspace on the library and select "New Font"
2. Give a name and select your font, dont forget to give export in first frame, and for actionscript.
3.

var myFont = new Font1();
var myFormat:TextFormat = new TextFormat();
myFormat.size = 15;
myFormat.align = TextFormatAlign.CENTER;
myFormat.font = myFont.fontName;
var splashtxt:TextField = new TextField();
splashtxt.defaultTextFormat = myFormat;
splashtxt.embedFonts = true;
splashtxt.antiAliasType = AntiAliasType.ADVANCED;


The above is in ActionScript 3.0 make the relevant conversion to ActionScript 2.0

Hope this helps!

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

font1 is the class name you given when you created font from the library

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

also if i try to embed the calibri font in the flash file, the font display is clear, but some parts of the text is simply not read from the xml file. please see the screenshots 'how i embed fonts.jpg', 'text without embedding fonts.jpg' and 'text after embedding fonts.jpg'. these are also available at http://rapidshare.com/files/309129518/embedding_fonts.zip
i later discovered that if you embed fonts, the text between in the xml disappears, but text within displays. can you throw some light on this? suppose i want to make some text in the xml bold, how do i achieve this without putting in the xml? perhaps use css?
also when i embed fonts, why does it have to be done for each dynamic text field in the fla. whats the way to do it only once for each fla?

sandra21
Newbie Poster
17 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

Instead of bold tag, you just increase the size to 18.

<font color="#CC0000" size="18">History of Aaren Initiative</font>


for now!

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

Thanks for sharing.

krisov
Newbie Poster
11 posts since Dec 2009
Reputation Points: 6
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: