PDA

View Full Version : Chinese fonts runtime loading


crazydev
09-25-2010, 07:45 PM
Hi Gurus,

Does anyone know how can I load chinese fonts at runtime? When I embed font to a text box it works fine but when I load is at runtime its doesn't work.

Can anyone help me in this matter?

Deackie
09-26-2010, 01:39 AM
u need a tutorial basically on how to embed fonts and format text fields.
a few tips here:
as u r using as 2.0, 3 steps need to be done,
1. create a new font symbol in ur library and correctly set its property and linkage
2. compile the file containing the font symbol, and name it, say, fonts.swf
3. load fonts.swf into ur main project at proper time. after the file is loaded completed, the embedded font in ur fonts.swf is available for use by text fields whose embedFonts are set true.

tacos
09-26-2010, 01:43 AM
In other words, using a shared Library.

http://www.quasimondo.com/archives/000227.php

http://kb2.adobe.com/cps/147/tn_14767.html

crazydev
09-26-2010, 01:32 PM
Thank you both of you. Actually I have created font files using shared library. English fonts are working perfect, but the problem is with chinese fonts. Let me attach sample files shortly, please check them and let me know if I'm doing something wrong.

Here attached file, I have included font file sources as well so that you can see how I have shred fonts.

Experiments.fla contains font embeded inside fla file. It is working fine.

while font11.fla using font loading at runtime. chinese font is not loading properly.

Deackie
09-27-2010, 01:12 AM
if i didnt wrong u, u didnt create any font symbol in ur font-embedded .swf file, huh?
Facts are that u just embedded the desired font by set 'embed...' button shown in the property panel when any dynamic textfield is selected in Flash Authoring Tool. But that's not what is called shared library.
Create a brand new FONT symbol in ur library. u can find that option when u right click within the library panel.
And it's necessary for u to go browsing the links provided by Tacos