Package org.joshy.gfx.draw

Examples of org.joshy.gfx.draw.FontBuilder


        addFontIfMissing(getFont("league_gothic.ttf"), "LeagueGothic");
        addFontIfMissing(getFont("OpenSans-Regular.ttf"), "OpenSans");

        //resolve all fonts to make sure they are usable
        for(Asset asset : assetDatabase.getAllFonts()) {
            new FontBuilder(asset.getFile()).resolve();
        }

        modeHelpers.add(new VectorModeHelper(this));
        modeHelpers.add(new PresoModeHelper(this));
        modeHelpers.add(new PixelModeHelper(this));
View Full Code Here


    private void addFontIfMissing(URL font, String fontName) throws IOException {
        if(assetDatabase.getFontByName(fontName) == null) {
            u.p("installing default font: " + font);
            Asset asset = assetDatabase.copyAndAddFont(font);
            new FontBuilder(asset.getFile()).resolve();
        } else {
            //u.p("the font is already instaleld: " + fontName);
            Asset asset = assetDatabase.getFontByName(fontName);
            new FontBuilder(asset.getFile()).resolve();
        }
    }
View Full Code Here

TOP

Related Classes of org.joshy.gfx.draw.FontBuilder

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.