Examples of VectorFont


Examples of org.mt4j.components.visibleComponents.font.VectorFont

    pathParser.setPathHandler(pathHandler);
   
    XmlHandler.getInstance().saxParse(
        svgFontFileName,
        this);
    VectorFont font = this.getFont();
    font.setFontFileName(svgFontFileName);
   
    return font;
  }
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.VectorFont

    tab.setNoStroke(true);
    characters.add(tab);
   
    //Create a new SVG-FONT
//    VectorFont svgFont = new VectorFont(this.getCharacters(), fontDefaultXAdvancing, fontFamily, fontMaxAscent, fontMaxDescent, font_units_per_em, fontSize,
    VectorFont svgFont = new VectorFont((VectorFontCharacter[])characters.toArray(new VectorFontCharacter[characters.size()]), fontDefaultXAdvancing, fontFamily, fontMaxAscent, fontMaxDescent, font_units_per_em, fontSize,
        fillColor,
        strokeColor,
        antiAliased
    );
   
    //TODO this caused performance problems - reason UNKOWN! DISABLE IF PERFORMANCE DROPS SIGNIFICANTLY!
    //Set font max descent and ascent according to font size
//    float tmp = fontMaxAscent * (float)(1.0/(float)font_units_per_em);
//    fontMaxAscent = Math.round(tmp * fontSize);
//    float tmp2 = fontMaxDescent * (float)(1.0/(float)font_units_per_em);
//    fontMaxDescent = Math.round(tmp2 * fontSize);
    fontMaxAscent = Math.round(fontMaxAscent * this.scaleFactor);
    fontMaxDescent = Math.round(fontMaxDescent * this.scaleFactor);
   
    svgFont.setFontMaxAscent(fontMaxAscent);
    svgFont.setFontMaxDescent(fontMaxDescent);
   
    svgFont.setFontId(fontID);
   
    this.svgFont = svgFont;
   
//    pathVertexArrays.clear();
//    vertexArrToOutlinesList.clear();
View Full Code Here

Examples of org.mt4j.components.visibleComponents.font.VectorFont

//    fontMaxDescent = Math.round(tmp2 * fontSize);
    fontMaxAscent = Math.round(fontMaxAscent * this.scaleFactor);
    fontMaxDescent = Math.round(fontMaxDescent * this.scaleFactor);

    //Create Font
    VectorFont vectorFont = new VectorFont(newArray, fontDefaultXAdvancing, this.getFamily(f), fontMaxAscent, fontMaxDescent, this.unitsPerEm, fontSize,
        fillColor,
        strokeColor,
        antiAliasing);
    vectorFont.setFontFileName(fontPath);
    vectorFont.setFontId("-1");
    return vectorFont;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.