Examples of Glyf


Examples of com.sun.pdfview.font.ttf.Glyf

     * Get the outline of a character given the glyph id
     */
    protected synchronized GeneralPath getOutline (int glyphId, float width) {
        // find the glyph itself
        GlyfTable glyf = (GlyfTable) this.font.getTable ("glyf");
        Glyf g = glyf.getGlyph (glyphId);

        GeneralPath gp = null;
        if (g instanceof GlyfSimple) {
            gp = renderSimpleGlyph ((GlyfSimple) g);
        } else if (g instanceof GlyfCompound) {
View Full Code Here

Examples of com.sun.pdfview.font.ttf.Glyf

    protected GeneralPath renderCompoundGlyph (GlyfTable glyf, GlyfCompound g) {
        GeneralPath gp = new GeneralPath ();

        for (int i = 0; i < g.getNumComponents (); i++) {
            // find and render the component glyf
            Glyf gl = glyf.getGlyph (g.getGlyphIndex (i));
            GeneralPath path = null;
            if (gl instanceof GlyfSimple) {
                path = renderSimpleGlyph ((GlyfSimple) gl);
            } else if (gl instanceof GlyfCompound) {
                path = renderCompoundGlyph (glyf, (GlyfCompound) gl);
            } else {
                throw new RuntimeException (
                        "Unsupported glyph type " + gl.getClass ().getCanonicalName ());
            }

            // multiply the translations by units per em
            double[] matrix = g.getTransform (i);
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.