Yeah, other people have run into this problem, but no one seems to
have found a solution.

Anyway, there is a workaround where you can avoid using an Embed tag.

1. Embed a font symbol in the fla's library, select Verdana, and check
Export for ActionScript

2. Pass root.loaderInfo.bytes into the VectorText.extractFont()
function.

This is working:

package
{
        import away3d.primitives.TextField3D;
        import wumedia.vector.VectorText;

        public class UsingTextField3D extends Chapter06SampleBase
        {

                protected override function createScene():void
                {
                        VectorText.extractFont(root.loaderInfo.bytes);

                        var tf3D : TextField3D = new TextField3D('Verdana');
                        tf3D.text = 'Vector text in 3D!';
                        tf3D.size = 100;
                        tf3D.leading = 20;
                        tf3D.width = 600;
                        tf3D.x = -300;
                        tf3D.y = 150;
                        view.scene.addChild(tf3D);
                }
        }
}

Flash bug: If you embed multiple font symbols which use the same font
but different styles (e.g., Verdana Regular, Verdana Bold...), the
internal font name for all of them will be 'Verdana' and Away3D will
use Verdana Regular. This has not been fixed in CS5.

Reply via email to