Package com.sun.pdfview.font.ttf

Examples of com.sun.pdfview.font.ttf.CMap.map()


        // this should be gv.getGlyphMetrics(0).getAdvance(), but that is
        // broken on the Mac, so we need to read the advance from the
        // hmtx table in the font
        CMap map = cmapTable.getCMap (mapIDs[0], mapIDs[1]);
        int glyphID = map.map (src);
        float advance = (float) hmtxTable.getAdvance (glyphID) / (float) unitsPerEm;

        float widthfactor = width / advance;
        gp.transform (AffineTransform.getScaleInstance (widthfactor, -1));
View Full Code Here


        // this should be gv.getGlyphMetrics(0).getAdvance(), but that is
        // broken on the Mac, so we need to read the advance from the
        // hmtx table in the font
        CMap map = this.cmapTable.getCMap (mapIDs[0], mapIDs[1]);
        int glyphID = map.map (src);
        float advance = (float) this.hmtxTable.getAdvance (glyphID) / (float) this.unitsPerEm;

        float widthfactor = width / advance;
        gp.transform (AffineTransform.getScaleInstance (widthfactor, -1));
View Full Code Here

        // try maps in required order of (3, 1), (1, 0)
        CMap map = cmap.getCMap ((short) 3, (short) 1);
        if (map == null) {
            map = cmap.getCMap ((short) 1, (short) 0);
        }
        int idx = map.map (val);
        if (idx != 0) {
            return getOutline (idx, width);
        }

        return null;
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.