private static FontProgramDescriptor fetchType1FontDescriptor(String fontName, byte[] afm) throws java.io.IOException { //TODO close original stream, may be separate static method should introduced Type1Font fp = new Type1Font(fontName, null, afm, null); return new FontProgramDescriptor(fp.getFontNames(), fp.getFontMetrics()); }
protected static Type1Font createStandardFont(String name) throws java.io.IOException { if (StandardFonts.isStandardFont(name)) { return new Type1Font(name, null, null, null); } else { throw new IOException("{0} is not a standard type1 font.").setMessageParams(name); } }
protected static Type1Font createStandardFont(String name) throws java.io.IOException { if (StandardFonts.isStandardFont(name)) { return new Type1Font(name, null, null, null); } else { throw new IOException("{0} is not a standard type1 font.").setMessageParams(name); } }
private static FontProgramDescriptor fetchType1FontDescriptor(String fontName, byte[] afm) throws java.io.IOException { //TODO close original stream, may be separate static method should introduced Type1Font fp = new Type1Font(fontName, null, afm, null); return new FontProgramDescriptor(fp.getFontNames(), fp.getFontMetrics()); }
private static FontProgram createType1Font(String metricsPath, String binaryPath, byte[] afm, byte[] pfb, boolean cached) throws java.io.IOException { FontProgram fontProgram; FontCacheKey fontKey = null; if (cached) { fontKey = createFontCacheKey(metricsPath, afm); fontProgram = FontCache.getFont(fontKey); if (fontProgram != null) { return fontProgram; } } fontProgram = new Type1Font(metricsPath, binaryPath, afm, pfb); return cached ? FontCache.saveFont(fontProgram, fontKey) : fontProgram; }
private static FontProgram createType1Font(String metricsPath, String binaryPath, byte[] afm, byte[] pfb, boolean cached) throws java.io.IOException { FontProgram fontProgram; FontCacheKey fontKey = null; if (cached) { fontKey = createFontCacheKey(metricsPath, afm); fontProgram = FontCache.getFont(fontKey); if (fontProgram != null) { return fontProgram; } } fontProgram = new Type1Font(metricsPath, binaryPath, afm, pfb); return cached ? FontCache.saveFont(fontProgram, fontKey) : fontProgram; }