Examples of Cmap04


Examples of org.axsl.ps.Cmap04

        final int glyphIdArrayOffset = (int) getReader().getFilePointer();

        // Parse the table entries and build a CMap4 from them.
        final String encodingName = "internal-"
                + this.ttfFont().getPostscriptName();
        final Cmap04 cmap04 = psServer.makeCmap04(encodingName, segCountX2 / 2);
        for (int i = 0; i < startCount.length; i++) {
            if (rangeOffset[i] == 0) {
                cmap04.addEntry(startCount[i],
                        endCount[i],
                        (char) (startCount[i] + deltas[i]));
            } else {
                final char[] computedIndexes = new char[endCount[i]
                        - startCount[i] + 1];
                for (int j = startCount[i]; j <= endCount[i]; j++) {
                    final int glyphOffset
                            = glyphIdArrayOffset
                            + ((rangeOffset[i] / 2)
                            + (j - startCount[i])
                            + i - segCountX2 / 2)
                            * 2;
                    getReader().seek(glyphOffset);
                    final char glyphIndex =
                            (char) ((getReader().readUnsignedShort()
                            + deltas[i]) & Character.MAX_VALUE);
                    computedIndexes[j - startCount[i]] = glyphIndex;
                }
                cmap04.addEntry(startCount[i],
                        endCount[i], computedIndexes);
            }
            getLogger().debug(i + ": " + startCount[i] + " - "
                    + endCount[i]);
        }
View Full Code Here

Examples of org.foray.ps.encode.CMap04

    /**
     * {@inheritDoc}
     */
    public Cmap04 makeCmap04(final String name, final int expectedEntries) {
        return new CMap04(name, expectedEntries);
    }
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.