Package com.sun.pdfview.font.ttf

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


     * Get the outline of a character given the character code
     */
    @Override
  protected synchronized GeneralPath getOutline (char src, float width) {
        // find the cmaps
        CmapTable cmap = (CmapTable) this.font.getTable ("cmap");

        // if there are no cmaps, this is (hopefully) a cid-mapped font,
        // so just trust the value we were given for src
        if (cmap == null) {
            return getOutline ((int) src, width);
        }

        CMap[] maps = cmap.getCMaps ();

        // try the maps in order
        for (int i = 0; i < maps.length; i++) {
            int idx = maps[i].map (src);
            if (idx != 0) {
View Full Code Here


     * @return GeneralPath
     */
    protected synchronized GeneralPath getOutlineFromCMaps (char val,
                                                            float width) {
        // find the cmaps
        CmapTable cmap = (CmapTable) this.font.getTable ("cmap");

        if (cmap == null) {
            return null;
        }

        // 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);
        }
View Full Code Here

TOP

Related Classes of com.sun.pdfview.font.ttf.CmapTable

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.