aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-07-17 09:11:09 +0000
committerJeremias Maerki <jeremias@apache.org>2008-07-17 09:11:09 +0000
commit1867bcc73af7bbb10a7729ff01184a1909abbb4d (patch)
tree28f4f9508268a522c4cdd6238a74fe10fc45ba5d /test
parent7a56940e312c85dc0c0ec1a4729f990d0ff55358 (diff)
downloadxmlgraphics-fop-1867bcc73af7bbb10a7729ff01184a1909abbb4d.tar.gz
xmlgraphics-fop-1867bcc73af7bbb10a7729ff01184a1909abbb4d.zip
fonts package must not depend on the render package. Refactored to restore that rule.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@677543 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/config/FontsSubstitutionTestCase.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java b/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
index 6f286a3fb..725f0d4d7 100644
--- a/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
+++ b/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,10 +23,13 @@ import java.io.File;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.fonts.CustomFontCollection;
import org.apache.fop.fonts.Font;
+import org.apache.fop.fonts.FontCollection;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontManager;
import org.apache.fop.fonts.FontTriplet;
+import org.apache.fop.fonts.base14.Base14FontCollection;
import org.apache.fop.render.PrintRenderer;
/**
@@ -53,7 +56,11 @@ public class FontsSubstitutionTestCase extends
FontInfo fontInfo = new FontInfo();
renderer.setupFontInfo(fontInfo);
FontManager fontManager = ua.getFactory().getFontManager();
- fontManager.setupRenderer(renderer);
+ FontCollection[] fontCollections = new FontCollection[] {
+ new Base14FontCollection(fontManager.isBase14KerningEnabled()),
+ new CustomFontCollection(renderer.getFontResolver(), renderer.getFontList())
+ };
+ fontManager.setup(fontInfo, fontCollections);
FontTriplet triplet = new FontTriplet("Times", "italic",
Font.WEIGHT_NORMAL);
String internalFontKey = fontInfo.getInternalFontKey(triplet);