|
FontCreation
Font3D classes, creating how to.
IntroductionDetailsThe 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 ):
///////////////////////////////////////////
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;
}
////////////////////////////////////////////
|
► Sign in to add a comment
One little correction:
override public function get height():Number { if(!__initialized)initialize(); return __heights; //<- __heightS with S }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.