Package org.apache.flex.forks.batik.gvt.font

Examples of org.apache.flex.forks.batik.gvt.font.UnicodeRange


        // process the u1 attribute
        StringTokenizer st = new StringTokenizer(u1, ",");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            if (token.startsWith("U+")) { // its a unicode range
                firstUnicodeRanges.add(new UnicodeRange(token));
            } else {
                int[] glyphCodes = font.getGlyphCodesForUnicode(token);
                if (firstGlyphSet == null) {
                    firstGlyphSet = glyphCodes;
                    firstGlyphLen = glyphCodes.length;
                }else {
                    if ((firstGlyphLen + glyphCodes.length) >
                        firstGlyphSet.length) {
                        int sz = firstGlyphSet.length*2;
                        if (sz <firstGlyphLen + glyphCodes.length)
                            sz = firstGlyphLen + glyphCodes.length;
                        int [] tmp = new int[sz];
                        for (int i = 0; i < firstGlyphLen; i++)
                            tmp[i] = firstGlyphSet[i];
                        firstGlyphSet = tmp;
                    }
                    for (int i = 0; i < glyphCodes.length; i++)
                        firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
                }
            }
        }
       
        // process the u2 attrbute
        st = new StringTokenizer(u2, ",");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            if (token.startsWith("U+")) { // its a unicode range
                secondUnicodeRanges.add(new UnicodeRange(token));
            } else {
                int[] glyphCodes = font.getGlyphCodesForUnicode(token);
                if (secondGlyphSet == null) {
                    secondGlyphSet = glyphCodes;
                    secondGlyphLen = glyphCodes.length;
View Full Code Here


        // process the u1 attribute
        StringTokenizer st = new StringTokenizer(u1, ",");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            if (token.startsWith("U+")) { // its a unicode range
                firstUnicodeRanges.add(new UnicodeRange(token));
            } else {
                int[] glyphCodes = font.getGlyphCodesForUnicode(token);
                if (firstGlyphSet == null) {
                    firstGlyphSet = glyphCodes;
                    firstGlyphLen = glyphCodes.length;
                }else {
                    if ((firstGlyphLen + glyphCodes.length) >
                        firstGlyphSet.length) {
                        int sz = firstGlyphSet.length*2;
                        if (sz <firstGlyphLen + glyphCodes.length)
                            sz = firstGlyphLen + glyphCodes.length;
                        int [] tmp = new int[sz];
                        System.arraycopy( firstGlyphSet, 0, tmp, 0, firstGlyphLen );
                        firstGlyphSet = tmp;
                    }
                    for (int i = 0; i < glyphCodes.length; i++)
                        firstGlyphSet[firstGlyphLen++] = glyphCodes[i];
                }
            }
        }

        // process the u2 attrbute
        st = new StringTokenizer(u2, ",");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            if (token.startsWith("U+")) { // its a unicode range
                secondUnicodeRanges.add(new UnicodeRange(token));
            } else {
                int[] glyphCodes = font.getGlyphCodesForUnicode(token);
                if (secondGlyphSet == null) {
                    secondGlyphSet = glyphCodes;
                    secondGlyphLen = glyphCodes.length;
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.gvt.font.UnicodeRange

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.