diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/java/org/apache/fop/config/FontsSubstitutionTestCase.java | 13 |
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); |