Package org.axsl.ps

Examples of org.axsl.ps.CharSet


                return fsf.getWidths();
            }
            return getSubsetWidths();
        }
        final Encoding encoding = this.fontUse.getEncoding();
        final CharSet charSet = fsf.getCharSet();
        final int firstIndex = encoding.getFirstIndex();
        final int lastIndex = encoding.getLastIndex();
        final int size = lastIndex - firstIndex + 1;
        final short[] widthsByFontIndex = new short[size];
        for (int i = firstIndex; i <= lastIndex; i++) {
            // Decode the character for this index
            final int codePoint = encoding.decodeCharacter(i);
            // Find the charSet index for that character.
            final int charSetIndex = charSet.getIndex(codePoint);
            if (charSetIndex < 0) {
                continue;
            }
            // Find the width for that charSet index.
            final short width = fsf.getWidths()[charSetIndex];
View Full Code Here


    private void loadExtentTable(final MetricsFileReader reader) throws IOException {
        final EncodingVector internalEncoding = this.getInternalEncoding();
        if (internalEncoding == null) {
            return;
        }
        final CharSet charSet = this.getCharSet();
        if (charSet == null) {
            return;
        }
        final short[] extentTable = new short[charSet.size()];
        this.dfMinWidth = this.getMaxWidth();
        for (int i = this.dfFirstChar; i <= this.dfLastChar; i++) {
            final short width = (short) reader.readUnsignedShortLoHi();
            final char encodedIndex = (char) i;
            final int codePoint = internalEncoding.decodeCharacter(
                    encodedIndex);
            final int charSetIndex = charSet.getIndex(codePoint);
            if (charSetIndex < 0
                    || charSetIndex >= extentTable.length) {
                continue;
            }
            extentTable[charSetIndex] = width;
View Full Code Here

TOP

Related Classes of org.axsl.ps.CharSet

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.