diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-17 18:14:01 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-17 18:14:01 +0000 |
commit | 96b06ff833f8c1059c3a5ae5a3bc023812e38a14 (patch) | |
tree | 1c333b49039e0c9bd89ee34259929a3b053a8e5d /test | |
parent | 74567e49f4caf648926ab2ba7a034ae84c30b2e9 (diff) | |
download | xmlgraphics-fop-96b06ff833f8c1059c3a5ae5a3bc023812e38a14.tar.gz xmlgraphics-fop-96b06ff833f8c1059c3a5ae5a3bc023812e38a14.zip |
Merged revisions 676161,676297,676307,676397,676608,677404-677405,677543,677648-677652 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r676161 | jeremias | 2008-07-12 13:19:40 +0100 (Sat, 12 Jul 2008) | 1 line
Attempt to fix a potential build problem.
........
r676297 | adelmelle | 2008-07-13 11:26:48 +0100 (Sun, 13 Jul 2008) | 2 lines
Replace occurrences of File.toURL() by File.toURI().toURL() (recommended as of Java 6, where File.toURL() is deprecated)
........
r676307 | jeremias | 2008-07-13 13:11:17 +0100 (Sun, 13 Jul 2008) | 1 line
null is not correct here, an empty String needs to be used for the default namespace. Saxon 9 fails with a NullPointerException otherwise. Xalan is more tolerant.
........
r676397 | adelmelle | 2008-07-13 19:31:30 +0100 (Sun, 13 Jul 2008) | 1 line
Another attempt at avoiding build issues (?)
........
r676608 | cbowditch | 2008-07-14 15:44:53 +0100 (Mon, 14 Jul 2008) | 1 line
A nit: clarify message so its more meaningful to end user
........
r677404 | jeremias | 2008-07-16 21:16:51 +0100 (Wed, 16 Jul 2008) | 1 line
Worked around a bug in Xalan 2.4.0 (bundled with Sun Java 1.4.2_xx) where file URLs like file:/C:/.... got converted to file:\C:\.... on Windows causing a FileNotFoundException.
........
r677405 | jeremias | 2008-07-16 21:22:17 +0100 (Wed, 16 Jul 2008) | 1 line
Removed stray System.out.
........
r677543 | jeremias | 2008-07-17 10:11:09 +0100 (Thu, 17 Jul 2008) | 1 line
fonts package must not depend on the render package. Refactored to restore that rule.
........
r677648 | acumiskey | 2008-07-17 18:39:14 +0100 (Thu, 17 Jul 2008) | 2 lines
ZapfDingbats and Symbol is not always available on the AFPRenderer so we can't have these as default font family properties unfortunately.
........
r677649 | acumiskey | 2008-07-17 18:40:12 +0100 (Thu, 17 Jul 2008) | 2 lines
A minor optimization.
........
r677650 | acumiskey | 2008-07-17 18:41:27 +0100 (Thu, 17 Jul 2008) | 2 lines
An optimization and improved readability of fontLookup() call.
........
r677651 | acumiskey | 2008-07-17 18:44:08 +0100 (Thu, 17 Jul 2008) | 2 lines
Moved font setup stuff from setupFontInfo() in AFPRenderer and delegated this stuff to an AFPFontCollection class.
........
r677652 | acumiskey | 2008-07-17 18:47:04 +0100 (Thu, 17 Jul 2008) | 2 lines
Unused imports.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@677664 13f79535-47bb-0310-9956-ffa450edef68
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); |