diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-11-03 10:48:17 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-11-03 10:48:17 +0000 |
commit | b58bd2b16672a0a39ac5d3d4d24291569fad6697 (patch) | |
tree | 43f093f69d354805617d8e6b0f6d326d991f5545 /src/java | |
parent | 46e8fb467370744775df6fc17a0e3f24df7299f2 (diff) | |
download | xmlgraphics-fop-b58bd2b16672a0a39ac5d3d4d24291569fad6697.tar.gz xmlgraphics-fop-b58bd2b16672a0a39ac5d3d4d24291569fad6697.zip |
Method for dumping all font triplets to System.out for diagnostic purposes.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@591581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/fonts/FontInfo.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java index e833b7b93..6cea08afd 100644 --- a/src/java/org/apache/fop/fonts/FontInfo.java +++ b/src/java/org/apache/fop/fonts/FontInfo.java @@ -440,4 +440,22 @@ public class FontInfo { return 0; } } + + /** + * Diagnostic method for logging all registered fonts to System.out. + */ + public void dumpAllTripletsToSystemOut() { + Collection entries = new java.util.TreeSet(); + Iterator iter = this.triplets.keySet().iterator(); + while (iter.hasNext()) { + FontTriplet triplet = (FontTriplet)iter.next(); + String key = getInternalFontKey(triplet); + FontMetrics metrics = getMetricsFor(key); + entries.add(triplet.toString() + " -> " + key + " -> " + metrics.getFontName()); + } + iter = entries.iterator(); + while (iter.hasNext()) { + System.out.println(iter.next()); + } + } } |