Examples of mapChar()


Examples of org.apache.fop.fonts.Font.mapChar()

                + PDFNumber.doubleOut(lt[5]) + " Tm [" + startText);

        int l = s.length();

        for (int i = 0; i < l; i++) {
            char ch = fontState.mapChar(s.charAt(i));

            if (!useMultiByte) {
                if (ch > 127) {
                    currentStream.write("\\");
                    currentStream.write(Integer.toOctalString(ch));
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                currentStream.write(PDFText.toUnicodeHex(ch));
            }

            if (kerningAvailable && (i + 1) < l) {
                addKerning(currentStream, (Integer.valueOf(ch)),
                           (Integer.valueOf(fontState.mapChar(s.charAt(i + 1)))),
                           kerning, startText, endText);
            }

        }
        currentStream.write(endText);
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                            + ", charWidth: " + cw);
                }
            }
            Font f = textUtil.selectFontForChar(ch);
            char paintChar = (CharUtilities.isAnySpace(ch) ? ' ' : ch);
            char mappedChar = f.mapChar(paintChar);
            boolean encodingChanging = false; // used for single byte
            if (!textUtil.isMultiByteFont(f.getFontName())) {
                int encoding = mappedChar / 256;
                mappedChar = (char) (mappedChar % 256);
                if (textUtil.getCurrentEncoding() != encoding) {
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

        for (int i = 0; i < l; i++) {
            char orgChar = text.charAt(i);
            char ch;
            float glyphAdjust = 0;
            if (font.hasChar(orgChar)) {
                ch = font.mapChar(orgChar);
                ch = selectAndMapSingleByteFont(singleByteFont, fontName, fontSize, textutil, ch);
                if ((wordSpacing != 0) && CharUtilities.isAdjustableSpace(orgChar)) {
                    glyphAdjust += wordSpacing;
                }
            } else {
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                    glyphAdjust += wordSpacing;
                }
            } else {
                if (CharUtilities.isFixedWidthSpace(orgChar)) {
                    //Fixed width space are rendered as spaces so copy/paste works in a reader
                    ch = font.mapChar(CharUtilities.SPACE);
                    int spaceDiff = font.getCharWidth(ch) - font.getCharWidth(orgChar);
                    glyphAdjust = -spaceDiff;
                } else {
                    ch = font.mapChar(orgChar);
                    if ((wordSpacing != 0) && CharUtilities.isAdjustableSpace(orgChar)) {
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                    //Fixed width space are rendered as spaces so copy/paste works in a reader
                    ch = font.mapChar(CharUtilities.SPACE);
                    int spaceDiff = font.getCharWidth(ch) - font.getCharWidth(orgChar);
                    glyphAdjust = -spaceDiff;
                } else {
                    ch = font.mapChar(orgChar);
                    if ((wordSpacing != 0) && CharUtilities.isAdjustableSpace(orgChar)) {
                        glyphAdjust += wordSpacing;
                    }
                }
                ch = selectAndMapSingleByteFont(singleByteFont, fontName, fontSize,
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                double  xa              = f.getCharWidth(ch) + maybeWordOffsetX ( wox, ch, null );
                double  ya              = 0;
                double  xd              = ( xo - xoLast ) / 1000f;
                double  yd              = ( yo - yoLast ) / 1000f;
                tu.writeTd ( xd, yd );
                tu.writeTj ( f.mapChar ( ch ) );
                xc += xa + pa[2];
                yc += ya + pa[3];
                xoLast = xo;
                yoLast = yo;
            }
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                + PDFNumber.doubleOut(lt[5]) + " Tm [" + startText);

        int l = s.length();

        for (int i = 0; i < l; i++) {
            char ch = fontState.mapChar(s.charAt(i));

            if (!useMultiByte) {
                if (ch > 127) {
                    currentStream.write("\\");
                    currentStream.write(Integer.toOctalString((int)ch));
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                currentStream.write(PDFText.toUnicodeHex(ch));
            }

            if (kerningAvailable && (i + 1) < l) {
                addKerning(currentStream, (new Integer((int)ch)),
                           (new Integer((int)fontState.mapChar(s.charAt(i + 1)))),
                           kerning, startText, endText);
            }

        }
        currentStream.write(endText);
View Full Code Here

Examples of org.apache.fop.fonts.Font.mapChar()

                + PDFNumber.doubleOut(lt[5]) + " Tm [" + startText);

        int l = s.length();

        for (int i = 0; i < l; i++) {
            char ch = fontState.mapChar(s.charAt(i));

            if (!useMultiByte) {
                if (ch > 127) {
                    currentStream.write("\\");
                    currentStream.write(Integer.toOctalString(ch));
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.