summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-12-19 15:14:01 +0000
committerJeremias Maerki <jeremias@apache.org>2005-12-19 15:14:01 +0000
commit78b40141996f340ed503af254ed25695e5c822e4 (patch)
treef2eedd9f56309cf0ff7a2ff4db4ca34009405c4b
parentaaf7686283e2c5465da339f8059a1f0f849af8e1 (diff)
downloadxmlgraphics-fop-78b40141996f340ed503af254ed25695e5c822e4.tar.gz
xmlgraphics-fop-78b40141996f340ed503af254ed25695e5c822e4.zip
One less lookup.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357705 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fonts/FontInfo.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/FontInfo.java b/src/java/org/apache/fop/fonts/FontInfo.java
index e1bc87884..59e7bdbd5 100644
--- a/src/java/org/apache/fop/fonts/FontInfo.java
+++ b/src/java/org/apache/fop/fonts/FontInfo.java
@@ -286,8 +286,9 @@ public class FontInfo {
* @return font metrics
*/
public FontMetrics getMetricsFor(String fontName) {
- usedFonts.put(fontName, fonts.get(fontName));
- return (FontMetrics)fonts.get(fontName);
+ FontMetrics metrics = (FontMetrics)fonts.get(fontName);
+ usedFonts.put(fontName, metrics);
+ return metrics;
}
/**