Package org.apache.fop.fonts

Examples of org.apache.fop.fonts.CodePointMapping


                nonBase14.setWidthMetrics(firstChar,
                                     lastChar,
                                     makeArray(metrics.getWidths()));
               
                //Handle encoding
                CodePointMapping mapping = singleByteFont.getCodePointMapping();
                if (singleByteFont.isSymbolicFont()) {
                    //no encoding, use the font's encoding
                } else if (PDFEncoding.isPredefinedEncoding(mapping.getName())) {
                    font.setEncoding(mapping.getName());
                } else {
                    CodePointMapping winansi = CodePointMapping.getMapping(
                            CodePointMapping.WIN_ANSI_ENCODING);
                    PDFEncoding pdfEncoding = new PDFEncoding(winansi.getName());
                    PDFEncoding.DifferencesBuilder builder
                            = pdfEncoding.createDifferencesBuilder();
                    int start = -1;
                    String[] winansiNames = winansi.getCharNameMap();
                    String[] charNameMap = mapping.getCharNameMap();
                    for (int i = 0; i < 256; i++) {
                        String wac = winansiNames[i];
                        String c = charNameMap[i];
                        if (!wac.equals(c)) {
View Full Code Here


                }
                if (log.isDebugEnabled()) {
                    log.debug("Unusual font encoding encountered: "
                            + encoding + " -> " + effEncodingName);
                }
                CodePointMapping mapping = buildCustomEncoding(effEncodingName, afm);
                singleFont.setEncoding(mapping);
            }
        } else {
            if (pfm.getCharSet() >= 0 && pfm.getCharSet() <= 2) {
                singleFont.setEncoding(pfm.getCharSetName() + "Encoding");
View Full Code Here

                    log.warn("Multi-character representation of glyph not currently supported: "
                            + charMetrics);
                }
            }
        }
        return new CodePointMapping(encodingName, table, charNameMap);
    }
View Full Code Here

                nonBase14.setWidthMetrics(firstChar,
                                     lastChar,
                                     makeArray(metrics.getWidths()));
               
                //Handle encoding
                CodePointMapping mapping = singleByteFont.getCodePointMapping();
                if (PDFEncoding.isPredefinedEncoding(mapping.getName())) {
                    font.setEncoding(mapping.getName());
                } else {
                    CodePointMapping winansi = CodePointMapping.getMapping(
                            CodePointMapping.WIN_ANSI_ENCODING);
                    PDFEncoding pdfEncoding = new PDFEncoding(winansi.getName());
                    PDFEncoding.DifferencesBuilder builder
                            = pdfEncoding.createDifferencesBuilder();
                    int start = -1;
                    String[] winansiNames = winansi.getCharNameMap();
                    String[] charNameMap = mapping.getCharNameMap();
                    for (int i = 0; i < 256; i++) {
                        String wac = winansiNames[i];
                        String c = charNameMap[i];
                        if (!wac.equals(c)) {
View Full Code Here

                }
                if (log.isDebugEnabled()) {
                    log.debug("Unusual font encoding encountered: "
                            + encoding + " -> " + effEncodingName);
                }
                CodePointMapping mapping = buildCustomEncoding(effEncodingName, afm);
                singleFont.setEncoding(mapping);
                addUnencodedBasedOnAFM(afm);
            }
        } else {
            if (pfm.getCharSet() >= 0 && pfm.getCharSet() <= 2) {
View Full Code Here

                    log.warn("Multi-character representation of glyph not currently supported: "
                            + charMetrics);
                }
            }
        }
        return new CodePointMapping(encodingName, table, charNameMap);
    }
View Full Code Here

                }
                if (log.isDebugEnabled()) {
                    log.debug("Unusual font encoding encountered: "
                            + encoding + " -> " + effEncodingName);
                }
                CodePointMapping mapping = buildCustomEncoding(effEncodingName, afm);
                singleFont.setEncoding(mapping);
                addUnencodedBasedOnAFM(afm);
            }
        } else {
            if (pfm.getCharSet() >= 0 && pfm.getCharSet() <= 2) {
View Full Code Here

                    log.warn("Multi-character representation of glyph not currently supported: "
                            + charMetrics);
                }
            }
        }
        return new CodePointMapping(encodingName, table, charNameMap);
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fonts.CodePointMapping

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.