Examples of FontCache


Examples of org.apache.fop.fonts.FontCache

     */
    public void setUseCache(boolean useCache) {
        if (useCache) {
            this.fontCache = FontCache.load();
            if (this.fontCache == null) {
                this.fontCache = new FontCache();
            }
        } else {
            this.fontCache = null;
        }
    }
View Full Code Here

Examples of org.apache.fop.fonts.FontCache

            fontResolver = FontSetup.createMinimalFontResolver();
        }

        FopFactory factory = userAgent.getFactory();
        boolean strict = factory.validateUserConfigStrictly();
        FontCache fontCache = factory.getFontCache();

        List fontInfoList = buildFontListFromConfiguration(cfg,
                userAgent.getFontBaseURL(), fontResolver, strict,
                fontCache);
       
        if (fontCache != null && fontCache.hasChanged()) {
            fontCache.save();
        }
        printRenderer.addFontList(fontInfoList);
    }
View Full Code Here

Examples of org.apache.fop.fonts.FontCache

            fontResolver = FontSetup.createMinimalFontResolver();
        }

        FopFactory factory = userAgent.getFactory();
        boolean strict = factory.validateUserConfigStrictly();
        FontCache fontCache = factory.getFontCache();

        List fontInfoList = buildFontListFromConfiguration(cfg,
                userAgent.getFontBaseURL(), fontResolver, strict,
                fontCache);
       
        if (fontCache != null && fontCache.hasChanged()) {
            fontCache.save();
        }
        printRenderer.addFontList(fontInfoList);
    }
View Full Code Here

Examples of org.apache.fop.fonts.FontCache

     */
    public void setUseCache(boolean useCache) {
        if (useCache) {
            this.fontCache = FontCache.load();
            if (this.fontCache == null) {
                this.fontCache = new FontCache();
            }
        } else {
            this.fontCache = null;
        }
    }
View Full Code Here

Examples of org.apache.fop.fonts.FontCache

       
        //Fonts
        try {
            FontResolver fontResolver = FontSetup.createMinimalFontResolver();
            //TODO The following could be optimized by retaining the FontCache somewhere
            FontCache fontCache = FontCache.load();
            if (fontCache == null) {
                fontCache = new FontCache();
            }
            List fontList = PrintRendererConfigurator.buildFontListFromConfiguration(
                    cfg, null, fontResolver, false, fontCache);
            fontCache.save();
            FontInfo fontInfo = new FontInfo();
            FontSetup.setup(fontInfo, fontList, fontResolver);
            graphics.setFontInfo(fontInfo);
        } catch (FOPException e) {
            throw new ConfigurationException("Error while setting up fonts", e);
View Full Code Here

Examples of org.geotools.renderer.style.FontCache

        FontData[] fontData = Display.getCurrent().getFontList(null, true);
        Set<String> fontSet = new HashSet<String>();
        for( FontData fd : fontData ) {
            fontSet.add(fd.getName());
        }
        Set<String> fontCache = new TreeSet<String>((new FontCache()).getAvailableFonts());
        fontCache.retainAll(fontSet);
        return (String[]) fontCache.toArray(new String[0]);
    }
View Full Code Here

Examples of org.geotools.renderer.style.FontCache

        reloadFontCache();
    }

    void reloadFontCache() {
        List<Font> fonts = loadFontsFromDataDirectory();
        final FontCache cache = FontCache.getDefaultInstance();
        cache.resetCache();
        for (Font font : fonts) {
            cache.registerFont(font);
        }
    }
View Full Code Here

Examples of org.geotools.renderer.style.FontCache

        }
    }

    void reloadFontCache() {
        List<Font> fonts = loadFontsFromDataDirectory();
        final FontCache cache = FontCache.getDefaultInstance();
        cache.resetCache();
        for (Font font : fonts) {
            cache.registerFont(font);
        }
    }
View Full Code Here

Examples of org.geotools.renderer.style.FontCache

*/
public class FontListResource extends MapResource {

    @Override
    public Map getMap() throws Exception {
        FontCache cache = FontCache.getDefaultInstance();
       
        HashMap map = new HashMap();
        map.put("fonts", cache.getAvailableFonts());

        return map;
    }
View Full Code Here

Examples of org.geotools.renderer.style.FontCache

*/
public class FontListResource extends MapResource {

    @Override
    public Map getMap() throws Exception {
        FontCache cache = FontCache.getDefaultInstance();
       
        HashMap map = new HashMap();
        map.put("fonts", cache.getAvailableFonts());

        return map;
    }
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.