Package org.apache.fop.fonts.autodetect

Examples of org.apache.fop.fonts.autodetect.FontInfoFinder


    private static void addFontInfoListFromFileList(
            List fontFileList, List fontInfoList, FontResolver resolver, FontCache fontCache) {
        for (Iterator iter = fontFileList.iterator(); iter.hasNext();) {
            File fontFile = (File)iter.next();
            // parse font to ascertain font info
            FontInfoFinder finder = new FontInfoFinder();
            EmbedFontInfo fontInfo = finder.find(fontFile, resolver, fontCache);
            if (fontInfo != null) {
                fontInfoList.add(fontInfo);               
            }
        }
    }
View Full Code Here


            LogUtil.handleError(log, "font without font-triplet", strict);

            // if not strict try to determine font info from the embed/metrics url
            File fontFile = CachedFontInfo.getFileFromUrls(new String[] {embedUrl, metricsUrl});
            if (fontFile != null) {
                FontInfoFinder finder = new FontInfoFinder();
                return finder.find(fontFile, fontResolver, fontCache);
            } else {
                return null;
            }
        } else {
            List tripleList = new java.util.ArrayList();
View Full Code Here

    private static void addFontInfoListFromFileList(
            List fontFileList, List fontInfoList, FontResolver resolver, FontCache fontCache) {
        for (Iterator iter = fontFileList.iterator(); iter.hasNext();) {
            URL fontUrl = (URL)iter.next();
            // parse font to ascertain font info
            FontInfoFinder finder = new FontInfoFinder();
            EmbedFontInfo fontInfo = finder.find(fontUrl, resolver, fontCache);
            if (fontInfo != null) {
                fontInfoList.add(fontInfo);               
            }
        }
    }
View Full Code Here

                // Should never happen
                log.debug("Malformed Url: " + e.getMessage());
                return null;
            }
            if (fontFile != null) {
                FontInfoFinder finder = new FontInfoFinder();
                return finder.find(fontUrl, fontResolver, fontCache);
            } else {
                return null;
            }
        } else {
            List tripleList = new java.util.ArrayList();
View Full Code Here

     * @param fontURLList font file list
     * @param fontInfoList a configured font info list
     */
    public void add(List/*<URL>*/ fontURLList, List/*<EmbedFontInfo>*/ fontInfoList) {
        FontCache cache = manager.getFontCache();
        FontInfoFinder finder = new FontInfoFinder();
        finder.setEventListener(listener);

        for (Iterator iter = fontURLList.iterator(); iter.hasNext();) {
            URL fontUrl = (URL)iter.next();
            EmbedFontInfo[] embedFontInfos = finder.find(fontUrl, resolver, cache);
            if (embedFontInfos == null) {
                continue;
            }
            for (int i = 0, c = embedFontInfos.length; i < c; i++) {
                EmbedFontInfo fontInfo = embedFontInfos[i];
View Full Code Here

                fontURL = fontFile.toURI().toURL();
            } catch (MalformedURLException e) {
                LogUtil.handleException(log, e, strict);
            }
            if (fontFile != null) {
                FontInfoFinder finder = new FontInfoFinder();
                finder.setEventListener(listener);
                EmbedFontInfo[] infos = finder.find(fontURL, fontResolver, fontCache);
                return infos[0]; //When subFont is set, only one font is returned
            } else {
                return null;
            }
        }
View Full Code Here

     * @param fontURLList font file list
     * @param fontInfoList a configured font info list
     */
    public void add(List<URL> fontURLList, List<EmbedFontInfo> fontInfoList) {
        FontCache cache = manager.getFontCache();
        FontInfoFinder finder = new FontInfoFinder();
        finder.setEventListener(listener);

        for (URL fontURL : fontURLList) {
            EmbedFontInfo[] embedFontInfos = finder.find(fontURL, resolver, cache);
            if (embedFontInfos == null) {
                continue;
            }
            for (int i = 0, c = embedFontInfos.length; i < c; i++) {
                EmbedFontInfo fontInfo = embedFontInfos[i];
View Full Code Here

                // Should never happen
                log.debug("Malformed Url: " + e.getMessage());
                return null;
            }
            if (fontFile != null) {
                FontInfoFinder finder = new FontInfoFinder();
                finder.setEventListener(listener);
                EmbedFontInfo[] infos = finder.find(fontUrl, fontResolver, fontCache);
                return infos[0]; //When subFont is set, only one font is returned
            } else {
                return null;
            }
        }
View Full Code Here

                fontURL = fontFile.toURI().toURL();
            } catch (MalformedURLException e) {
                LogUtil.handleException(log, e, strict);
            }
            if (fontFile != null) {
                FontInfoFinder finder = new FontInfoFinder();
                finder.setEventListener(listener);
                EmbedFontInfo[] infos = finder.find(fontURL, fontResolver, fontCache);
                return infos[0]; //When subFont is set, only one font is returned
            } else {
                return null;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.fop.fonts.autodetect.FontInfoFinder

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.