Examples of TTFGlyph


Examples of org.jnode.awt.font.truetype.glyph.TTFGlyph

        final GeneralPath gp = new GeneralPath();

        for (int i = 0; i < s.length(); i++) {
            // get the index for the needed glyph
            final int index = encTable.getTableFormat().getGlyphIndex(s.charAt(i));
            final TTFGlyph glyph = (TTFGlyph) glyphTable.getGlyph(index);
            final GeneralPath shape = glyph.getShape();
            gp.append(shape.getPathIterator(tx), false);
            tx.translate(hmTable.getAdvanceWidth(index), 0);
        }
        g2.draw(gp);
    }
View Full Code Here

Examples of org.jnode.awt.font.truetype.glyph.TTFGlyph

        for (int i = 0; i < s.length(); i++) {
            // get the index for the needed glyph
            final char ch = s.charAt(i);
            System.out.println("Getting index for char: " + ch);
            final int index = encTable.getTableFormat().getGlyphIndex(ch);
            final TTFGlyph glyph = (TTFGlyph) glyphTable.getGlyph(index);
            final GeneralPath shape = glyph.getShape();
            PathIterator pi = shape.getPathIterator(null);
            final float[] f = new float[6];
            while (!pi.isDone()) {
                final int type = pi.currentSegment(f);
                System.out.println(types[type] + ",\t(" + f[0] + "," + f[1] + "),\t(" + f[2] + "," + f[3] + "),\t(" +
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.