diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-10-22 13:42:56 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-10-22 13:42:56 +0000 |
commit | 82f8cd4c3a02919eb554776059f051623e2ac683 (patch) | |
tree | 8bc5cf28cf041ec50f840f5bfdfc907cc1fcce38 /src/java/org/apache/fop/fonts/FontInfo.java | |
parent | 69e12c0a1cec260629c5034abb609beb671bf09b (diff) | |
download | xmlgraphics-fop-82f8cd4c3a02919eb554776059f051623e2ac683.tar.gz xmlgraphics-fop-82f8cd4c3a02919eb554776059f051623e2ac683.zip |
Default to inline resource level for GOCA graphic objects (when no afp:resource-level extension is provided).
This is due to a bug in the IBM AFP Workbench Viewer (2.04.01.07) (hard copy works just fine with default print-file level)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@707075 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fonts/FontInfo.java')
-rw-r--r-- | src/java/org/apache/fop/fonts/FontInfo.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java index d9f2e0de8..ad838708d 100644 --- a/src/java/org/apache/fop/fonts/FontInfo.java +++ b/src/java/org/apache/fop/fonts/FontInfo.java @@ -206,7 +206,8 @@ public class FontInfo { private FontTriplet fontLookup(String family, String style, int weight, boolean substitutable) { if (log.isTraceEnabled()) { - log.trace("Font lookup: " + family + " " + style + " " + weight); + log.trace("Font lookup: " + family + " " + style + " " + weight + + (substitutable ? " substitutable" : "")); } FontTriplet startKey = createFontKey(family, style, weight); @@ -288,7 +289,7 @@ public class FontInfo { } // last resort: use default - if (internalFontKey == null) { + if (key == null && internalFontKey == null) { key = Font.DEFAULT_FONT; internalFontKey = getInternalFontKey(key); } @@ -359,7 +360,7 @@ public class FontInfo { private List/*<FontTriplet>*/ fontLookup(String[] families, String style, int weight, boolean substitutable) { - List matchingTriplets = new java.util.ArrayList(); + List/*<FontTriplet>*/ matchingTriplets = new java.util.ArrayList/*<FontTriplet>*/(); FontTriplet triplet = null; for (int i = 0; i < families.length; i++) { triplet = fontLookup(families[i], style, weight, substitutable); @@ -569,7 +570,7 @@ public class FontInfo { List/*<FontTriplet>*/ foundTriplets = new java.util.ArrayList(); for (Iterator iter = triplets.entrySet().iterator(); iter.hasNext();) { Map.Entry tripletEntry = (Map.Entry) iter.next(); - if (fontName.equals(((String)tripletEntry.getValue()))) { + if (fontName.equals((tripletEntry.getValue()))) { foundTriplets.add(tripletEntry.getKey()); } } |