Examples of FontBuilder


Examples of flash.swf.builder.tags.FontBuilder

            if (fontFace == null)
                FontManager.throwFontNotFound(font.alias, fontFamily, font.style, null);
        }

        FontBuilder builder = new FontBuilder(tagCode, fontFace, font.alias, font.advancedAntiAliasing);

        // Add characters for unicode-range
        int[][] ranges = getUnicodeRanges(font.unicodeRanges);
        if (ranges != null)
        {
            for (int i = 0; i < ranges.length; i++)
            {
                int[] range = ranges[i];
                if (range != null && range.length == 2)
                {
                    int count = range[1] - range[0] + 1; // Inclusive range
                    builder.addCharset(range[0], count);
                }
            }
        }
        else
        {
            builder.addAllChars();
        }

        return (DefineFont)builder.build();
    }
View Full Code Here

Examples of flash.swf.builder.tags.FontBuilder

    protected long time() throws Throwable
    {
        long start = System.currentTimeMillis();

        FontBuilder fontBuilder = new FontBuilder(Tag.stagDefineFont2, fontManager, "TemporaryFont", family, 0, true, false);
        fontBuilder.addCharset("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcedefghijklmnopqrstuvwxyz".toCharArray());
        fontBuilder.build();

        return System.currentTimeMillis() - start;
    }
View Full Code Here

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

Examples of org.joshy.gfx.draw.FontBuilder

    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
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.