1 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java
2 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:15:06.215353433 +0000
3 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:26:44.036236575 +0000
5 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
6 import org.pentaho.reporting.libraries.base.util.StringUtils;
7 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
8 -import org.apache.commons.logging.Log;
9 -import org.apache.commons.logging.LogFactory;
10 +import java.util.logging.Logger;
13 * Creation-Date: 21.07.2007, 20:14:05
16 public class AfmFontRegistry extends AbstractFontFileRegistry
18 - private static final Log logger = LogFactory.getLog(AfmFontRegistry.class);
19 + private static final Logger logger = Logger.getLogger(AfmFontRegistry.class.getName());
22 * The font path filter is used to collect font files and directories during
23 * the font path registration.
25 filePfb.isFile() == false ||
26 filePfb.canRead() == false)
28 - logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
29 + logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
34 catch (final ClassNotFoundException cnfe)
36 // ignore the exception.
37 - logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
38 + logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
42 - logger.debug("Failed to restore the cache:", e);
43 + logger.config("Failed to restore the cache: " + e);
51 - logger.debug("Failed to store cached font data", e);
52 + logger.config("Failed to store cached font data: " + e);
59 - logger.debug("Failed to store cached font data", e);
60 + logger.config("Failed to store cached font data: " + e);
64 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java
65 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:15:06.228353587 +0000
66 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:27:11.614524616 +0000
68 import org.pentaho.reporting.libraries.resourceloader.factory.property.PropertiesResourceFactory;
69 import org.pentaho.reporting.libraries.base.config.Configuration;
70 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
71 -import org.apache.commons.logging.Log;
72 -import org.apache.commons.logging.LogFactory;
73 +import java.util.logging.Logger;
76 * A global registry for all supported encodings. This offers the option to fall
79 public final class EncodingRegistry
81 - private static final Log logger = LogFactory.getLog(EncodingRegistry.class);
82 + private static final Logger logger = Logger.getLogger(EncodingRegistry.class.getName());
85 * Implementation doc: This class uses several sources to load the encodings.
90 - logger.warn("Failed to create external-encoding instance for key " + key, e);
91 + logger.warning("Failed to create external-encoding instance for key " + key + " : " + e);
94 if (isEncodingSupportedJVM(name))
95 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java
96 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:15:06.218353469 +0000
97 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:27:47.015894357 +0000
99 import org.pentaho.reporting.libraries.fonts.encoding.External8BitEncodingData;
100 import org.pentaho.reporting.libraries.base.config.DefaultConfiguration;
101 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
102 -import org.apache.commons.logging.Log;
103 -import org.apache.commons.logging.LogFactory;
104 +import java.util.logging.Logger;
107 * A simple sourcecode generator.
110 public class EncodingGenerator
112 - private static final Log logger = LogFactory.getLog(EncodingGenerator.class);
113 + private static final Logger logger = Logger.getLogger(EncodingGenerator.class.getName());
115 private File targetDirectory;
116 private DefaultConfiguration propertySet;
121 - logger.warn ("Failed to generate Encoding " + key, e);
122 + logger.warning("Failed to generate Encoding " + key + " : " + e);
130 - logger.warn ("Failed to generate Encoding " + key, e);
131 + logger.warning("Failed to generate Encoding " + key + " : " + e);
135 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java
136 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:15:06.217353457 +0000
137 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:28:33.904384084 +0000
139 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
140 import org.pentaho.reporting.libraries.base.util.StringUtils;
141 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
142 -import org.apache.commons.logging.Log;
143 -import org.apache.commons.logging.LogFactory;
144 +import java.util.logging.Logger;
147 * Creation-Date: 21.07.2007, 16:58:06
150 public class PfmFontRegistry extends AbstractFontFileRegistry
152 - private static final Log logger = LogFactory.getLog(PfmFontRegistry.class);
153 + private static final Logger logger = Logger.getLogger(PfmFontRegistry.class.getName());
156 * The font path filter is used to collect font files and directories during
158 filePfb.isFile() == false ||
159 filePfb.canRead() == false)
161 - logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
162 + logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
168 if (pfmFont.isItextCompatible() == false)
170 - logger.warn("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
171 + logger.warning("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
174 registerFont (pfmFont);
179 - logger.debug("Failed to restore the cache:", e);
180 + logger.config("Failed to restore the cache: " + e);
184 @@ -326,14 +325,14 @@
185 catch (IOException e)
188 - logger.debug("Failed to store cached font data", e);
189 + logger.config("Failed to store cached font data: " + e);
193 catch (IOException e)
196 - logger.debug("Failed to store cached font data", e);
197 + logger.config("Failed to store cached font data: " + e);
201 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java
202 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:15:06.229353599 +0000
203 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:25:43.831607771 +0000
205 import java.util.Iterator;
206 import java.util.Map;
208 -import org.apache.commons.logging.Log;
209 -import org.apache.commons.logging.LogFactory;
210 +import java.util.logging.Logger;
211 import org.pentaho.reporting.libraries.fonts.LibFontBoot;
212 import org.pentaho.reporting.libraries.fonts.encoding.EncodingRegistry;
213 import org.pentaho.reporting.libraries.base.util.StringUtils;
216 public abstract class AbstractFontFileRegistry implements FontRegistry
218 - private static final Log logger = LogFactory.getLog(AbstractFontFileRegistry.class);
219 + private static final Logger logger = Logger.getLogger(AbstractFontFileRegistry.class.getName());
221 private HashMap seenFiles;
227 - logger.warn("Extra font path " + extraDir + " could not be fully registered.", e);
228 + logger.warning("Extra font path " + extraDir + " could not be fully registered: " + e);
233 final String jrepath = safeSystemGetProperty("java.home", ".");
234 final String fs = safeSystemGetProperty("file.separator", File.separator);
236 - logger.debug("Running on operating system: " + osname);
237 - logger.debug("Character encoding used as default: " + encoding);
238 + logger.config("Running on operating system: " + osname);
239 + logger.config("Character encoding used as default: " + encoding);
241 if (safeSystemGetProperty("mrj.version", null) != null)
243 final String userhome = safeSystemGetProperty("user.home", ".");
244 - logger.debug("Detected MacOS (Property 'mrj.version' is present.");
245 + logger.config("Detected MacOS (Property 'mrj.version' is present.");
246 registerFontPath(new File(userhome + "/Library/Fonts"), encoding);
247 registerFontPath(new File("/Library/Fonts"), encoding);
248 registerFontPath(new File("/Network/Library/Fonts"), encoding);
253 - logger.debug("Assuming unix like file structures");
254 + logger.config("Assuming unix like file structures");
255 // Assume X11 is installed in the default location.
256 registerFontPath(new File("/usr/X11R6/lib/X11/fonts"), encoding);
257 registerFontPath(new File("/usr/share/fonts"), encoding);
260 private void registerWindowsFontPath(final String encoding)
262 - logger.debug("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
263 + logger.config("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
265 // If you are not using windows, ignore this. This just checks if a windows system
266 // directory exist and includes a font dir.
271 - logger.debug("Fonts located in \"" + fontPath + '\"');
272 + logger.config("Fonts located in \"" + fontPath + '\"');
273 if (fontPath != null)
275 final File file = new File(fontPath);
280 - logger.warn("Font " + file + " is invalid. Message:" + e.getMessage(), e);
281 + logger.warning("Font " + file + " is invalid. Message: " + e);
285 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java
286 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:15:06.205353315 +0000
287 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:29:03.600694237 +0000
289 import java.io.IOException;
291 import org.pentaho.reporting.libraries.fonts.tools.ByteTable;
292 -import org.apache.commons.logging.Log;
293 -import org.apache.commons.logging.LogFactory;
294 +import java.util.logging.Logger;
297 * Creation-Date: 11.06.2006, 17:11:16
300 public final class GraphemeClassifier
302 - private static final Log logger = LogFactory.getLog(GraphemeClassifier.class);
303 + private static final Logger logger = Logger.getLogger(GraphemeClassifier.class.getName());
305 public static final int OTHER = 0;
311 - logger.warn ("Unable to load the pre-generated classification data.", e);
312 + logger.warning("Unable to load the pre-generated classification data: " + e);
316 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java
317 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:15:06.214353421 +0000
318 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:29:19.746862875 +0000
320 import org.pentaho.reporting.libraries.fonts.ByteAccessUtilities;
321 import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
322 import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
323 -import org.apache.commons.logging.Log;
324 -import org.apache.commons.logging.LogFactory;
325 +import java.util.logging.Logger;
328 * Creation-Date: 06.11.2005, 18:27:21
331 public class TrueTypeFont
333 - private static final Log logger = LogFactory.getLog(TrueTypeFont.class);
334 + private static final Logger logger = Logger.getLogger(TrueTypeFont.class.getName());
336 private static class TrueTypeFontHeader
339 (FontHeaderTable) getTable(FontHeaderTable.TABLE_ID);
342 - logger.warn("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
343 + logger.warning("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
346 final byte[] buffer =
347 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java
348 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:15:06.213353409 +0000
349 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:29:38.442058137 +0000
351 import java.io.IOException;
352 import java.util.HashMap;
354 -import org.apache.commons.logging.Log;
355 -import org.apache.commons.logging.LogFactory;
356 +import java.util.logging.Logger;
357 import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
358 import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
359 import org.pentaho.reporting.libraries.fonts.registry.FontContext;
362 public class TrueTypeFontMetricsFactory implements FontMetricsFactory
364 - private static final Log logger = LogFactory.getLog(TrueTypeFontMetricsFactory.class);
365 + private static final Logger logger = Logger.getLogger(TrueTypeFontMetricsFactory.class.getName());
366 private HashMap fontRecords;
368 public TrueTypeFontMetricsFactory()
371 catch (IOException e)
373 - logger.warn("Unable to read the font.", e);
374 + logger.warning("Unable to read the font: " + e);
375 // todo: We should throw a better exception instead, shouldnt we?
376 throw new IllegalStateException();
378 diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java
379 --- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:15:06.214353421 +0000
380 +++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:31:15.504071887 +0000
382 import java.io.Serializable;
383 import java.util.HashMap;
385 -import org.apache.commons.logging.Log;
386 -import org.apache.commons.logging.LogFactory;
387 +import java.util.logging.Logger;
388 import org.pentaho.reporting.libraries.fonts.FontException;
389 import org.pentaho.reporting.libraries.fonts.LibFontBoot;
390 import org.pentaho.reporting.libraries.fonts.cache.FontCache;
392 return secondLevelCache;
395 - private static final Log logger = LogFactory.getLog(TrueTypeFontRegistry.class);
396 + private static final Logger logger = Logger.getLogger(TrueTypeFontRegistry.class.getName());
399 * The font path filter is used to collect font files and directories during the font path registration.
404 - logger.info("Unable to register font file " + file, e);
405 + logger.info("Unable to register font file " + file + " : " + e);
406 // An error must not stop us on our holy mission to find and register
411 catch (FontException e)
413 - logger.info("The font '" + font.getFilename() + "' is invalid.", e);
414 + logger.info("The font '" + font.getFilename() + "' is invalid: " + e);
418 @@ -347,11 +346,11 @@
419 catch (final ClassNotFoundException cnfe)
421 // ignore the exception.
422 - logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
423 + logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
427 - logger.debug("Non-Fatal: Failed to restore the cache. The cache will be rebuilt.", e);
428 + logger.config("Non-Fatal: Failed to restore the cache. The cache will be rebuilt: " + e);
432 @@ -394,14 +393,14 @@
433 catch (IOException e)
436 - logger.debug("Failed to store cached font data", e);
437 + logger.config("Failed to store cached font data: " + e);
441 catch (IOException e)
444 - logger.debug("Failed to store cached font data", e);
445 + logger.config("Failed to store cached font data: " + e);
449 --- a/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
450 +++ b/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
452 import org.pentaho.reporting.libraries.fonts.merge.CompoundFontRecord;
453 import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
454 import org.pentaho.reporting.libraries.base.util.StringUtils;
455 -import org.apache.commons.logging.Log;
456 -import org.apache.commons.logging.LogFactory;
457 +import java.util.logging.Level;
458 +import java.util.logging.Logger;
461 * iText font support.
464 public class BaseFontSupport implements FontMapper
466 - private static final Log logger = LogFactory.getLog(BaseFontSupport.class);
467 + private static final Logger logger = Logger.getLogger(BaseFontSupport.class.getName());
469 * Storage for BaseFont objects created.
472 final FontSource source = (FontSource) registryFontRecord;
473 if (source.isEmbeddable() == false)
475 - logger.warn("License of font forbids embedded usage for font: " + fontKey);
476 + logger.warning("License of font forbids embedded usage for font: " + fontKey);
478 embeddedOverride = false;
480 @@ -286,13 +286,13 @@
484 - if (logger.isDebugEnabled())
485 + if (logger.isLoggable(Level.CONFIG))
487 - logger.debug("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage(), e);
488 + logger.config("BaseFont.createFont failed. Key = " + fontKey + ": " + e);
490 - else if (logger.isWarnEnabled())
491 + else if (logger.isLoggable(Level.WARNING))
493 - logger.warn("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
494 + logger.warning("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
497 // fallback .. use BaseFont.HELVETICA as default
502 - logger.warn("BaseFont.createFont for FALLBACK failed.", e);
503 + logger.warning("BaseFont.createFont for FALLBACK failed: " + e);
504 throw new BaseFontCreateException("Null font = " + fontKey);
506 throw new BaseFontCreateException("BaseFont creation failed, null font: " + fontKey);