Package org.mt4j.components.visibleComponents.font.fontFactories

Examples of org.mt4j.components.visibleComponents.font.fontFactories.BitmapFontFactory


        && fontFileName != null
        && fontFileName.length() > 0
      ){
        IFontFactory fontFactory = FontManager.getInstance().getFactoryForFileSuffix("");
        if (fontFactory != null && fontFactory instanceof BitmapFontFactory){
          BitmapFontFactory bitmapFontFactory = (BitmapFontFactory)fontFactory;
          if (this.getCharacters().length > 0 && this.getCharacters()[0] != null && this.getCharacters()[0] instanceof MTComponent){
            MTComponent comp = (MTComponent)this.getCharacters()[0];
            PApplet pa = comp.getRenderer();
            List<BitmapFontCharacter> charactersList = bitmapFontFactory.getCharacters(pa, unicode, fillColor, strokeColor, this.fontFileName, this.originalFontSize, this.antiAliased);
            BitmapFontCharacter[] characters = charactersList.toArray(new BitmapFontCharacter[charactersList.size()]);
            if (characters.length >= 1 && characters[0] != null){
              BitmapFontCharacter loadedCharacter = characters[0];
              BitmapFontCharacter[] newArray = new BitmapFontCharacter[this.getCharacters().length + 1];
              System.arraycopy(this.getCharacters(), 0, newArray, 0, this.getCharacters().length);
View Full Code Here


   
    //Register default font factories
    this.registerFontFactory(".ttf", new TTFontFactory());
    this.registerFontFactory(".svg", new SvgFontFactory());
     
    BitmapFontFactory bitmapFontFactory = new BitmapFontFactory();
//    this.registerFontFactory(".ttf", bitmapFontFactory); // TEST
      this.registerFontFactory("", bitmapFontFactory);
      this.registerFontFactory(".vlw", bitmapFontFactory);
      this.registerFontFactory(".otf", bitmapFontFactory);
     
View Full Code Here

TOP

Related Classes of org.mt4j.components.visibleComponents.font.fontFactories.BitmapFontFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.