aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-07-21 16:48:14 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-07-21 16:48:14 +0000
commite6253facf92f0e0fc8da5a343c526ba7f2d09f22 (patch)
tree36612dd0e23b5722c6b2708700dce5bc5096bfe0 /src/java/org/apache/fop
parent3a2b3470fcb94d67bee705c296f4ef14427f30a5 (diff)
downloadxmlgraphics-fop-e6253facf92f0e0fc8da5a343c526ba7f2d09f22.tar.gz
xmlgraphics-fop-e6253facf92f0e0fc8da5a343c526ba7f2d09f22.zip
Renamed fname to more correct name fontKey.
Made createFontKey() in FontInfo synchronized which should hopefully fix Ingo Maas's threading problem (http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200807.mbox/%3C000a01c8eb4b$42166e60$a701010a@ebp01422%3E). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@678477 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/fonts/FontInfo.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java
index 8272a9bdf..560330f6d 100644
--- a/src/java/org/apache/fop/fonts/FontInfo.java
+++ b/src/java/org/apache/fop/fonts/FontInfo.java
@@ -319,10 +319,10 @@ public class FontInfo {
Integer size = new Integer(fontSize);
Font font = (Font)sizes.get(size);
if (font == null) {
- String fname = getInternalFontKey(triplet);
- useFont(fname);
- FontMetrics metrics = getMetricsFor(fname);
- font = new Font(fname, triplet, metrics, fontSize);
+ String fontKey = getInternalFontKey(triplet);
+ useFont(fontKey);
+ FontMetrics metrics = getMetricsFor(fontKey);
+ font = new Font(fontKey, triplet, metrics, fontSize);
sizes.put(size, font);
}
return font;
@@ -504,7 +504,7 @@ public class FontInfo {
* @param weight font weight
* @return internal key
*/
- public static FontTriplet createFontKey(String family, String style,
+ public static synchronized FontTriplet createFontKey(String family, String style,
int weight) {
return new FontTriplet(family, style, weight);
}