My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
FontCreation  
Font3D classes, creating how to.
Updated Jul 16, 2008 by barcin...@gmail.com

Introduction

Details

The font classes are created with Mathieu Badimon typogaphy creation tool.

You can download it over here: http://code.google.com/p/five3d/downloads/list

Then you need to make a little change to the code generated by this tool ( note i will change that in the futere ):

  1. make sure it extends Font3D
  2. add this code to your new font.

///////////////////////////////////////////
override public function get motifs():Object
{
if(!__initialized)initialize();
return __motifs;
}

override public function get widths():Object
{
if(!__initialized)initialize();
return __widths;
}

override public function get height():Number
{
if(!__initialized)initialize();
return __height;
}
////////////////////////////////////////////
Comment by p48l0.84...@gmail.com, Nov 29, 2008

One little correction:

override public function get height():Number
{
if(!__initialized)initialize();
return __heights; //<-  __heightS with S
}
Comment by laxanodo...@gmail.com, Feb 23, 2009

Took me a while to figure out, just a handful pointer for newbies out there. The generated file should finally read something like this:

package org.papervision3d.typography.fonts {

    import org.papervision3d.typography.Font3D; 

    public class YOURFONTNAME extends Font3D{ 

    static public var motifs:Object = {}; static public var widths:Object = {}; static public var heights:Number = 116; static public var initialized:Boolean = false; 

/////////////////////////////////////////// override public function get motifs():Object { if(!initialized)initialize(); return motifs; }

override public function get widths():Object { if(!initialized)initialize(); return widths; }

override public function get height():Number { if(!initialized)initialize(); return heights; } ////////////////////////////////////////////

    static public function initialize():void {

        initializeMotifs(); initializeWidths(); initialized = true; 

    } 

    static private function initializeMotifs():void {

        motifs["A"] = 

.. etc.


Sign in to add a comment
Powered by Google Project Hosting