diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-05-06 16:18:51 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-05-06 16:18:51 +0000 |
commit | 175c6a8d234fc44e8b41bad5816645c2a9184a87 (patch) | |
tree | 43ff4a8ddf613e27336201697e83d0028e4ab277 /src/java/org/apache/fop/svg | |
parent | e413e9c8a102146703e2f47291f5894476edc48b (diff) | |
download | xmlgraphics-fop-175c6a8d234fc44e8b41bad5816645c2a9184a87.tar.gz xmlgraphics-fop-175c6a8d234fc44e8b41bad5816645c2a9184a87.zip |
Merged revisions 653826 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r653826 | acumiskey | 2008-05-06 17:14:09 +0100 (Tue, 06 May 2008) | 6 lines
* Added font substitution configuration reader, model, business logic, junit test and docs.
* Added java 1.5 generics comments to many methods.
* Performed some preparatory cleanup and refactoring which includes (but is not limited to..)
- Creating a FontManager delegating class that is called upon when renderers are setting up fonts
- A new FontCollection interface and concrete implementing classes to supercede the static FontSetup mechanism.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@653827 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/svg')
3 files changed, 10 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java index 420e46cb8..513ba4587 100644 --- a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java @@ -156,7 +156,7 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D { if (fontInfo == null) { //Default minimal fonts FontInfo fontInfo = new FontInfo(); - FontSetup.setup(fontInfo, null, null); + FontSetup.setup(fontInfo); setFontInfo(fontInfo); } } diff --git a/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java b/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java index f57e8cc58..02e9d6da4 100644 --- a/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java +++ b/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java @@ -26,6 +26,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.fop.apps.FOPException; import org.apache.fop.fonts.FontCache; import org.apache.fop.fonts.FontInfo; +import org.apache.fop.fonts.FontManager; import org.apache.fop.fonts.FontResolver; import org.apache.fop.fonts.FontSetup; import org.apache.fop.pdf.PDFDocument; @@ -53,17 +54,20 @@ public class PDFDocumentGraphics2DConfigurator { //Fonts try { - FontResolver fontResolver = FontSetup.createMinimalFontResolver(); + FontResolver fontResolver = FontManager.createMinimalFontResolver(); //TODO The following could be optimized by retaining the FontCache somewhere FontCache fontCache = FontCache.load(); if (fontCache == null) { fontCache = new FontCache(); } - List fontList = PrintRendererConfigurator.buildFontListFromConfiguration( - cfg, null, fontResolver, false, fontCache); + //TODO Provide fontBaseURL to this method call + final String fontBaseURL = null; + List/*<EmbedFontInfo>*/ embedFontInfoList + = PrintRendererConfigurator.buildFontListFromConfiguration( + cfg, fontBaseURL, fontResolver, false, fontCache); fontCache.save(); FontInfo fontInfo = new FontInfo(); - FontSetup.setup(fontInfo, fontList, fontResolver); + FontSetup.setup(fontInfo, embedFontInfoList, fontResolver); graphics.setFontInfo(fontInfo); } catch (FOPException e) { throw new ConfigurationException("Error while setting up fonts", e); diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index 05c30ef50..5a147f3be 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -959,7 +959,7 @@ public class PDFGraphics2D extends AbstractGraphics2D { preparePainting(); FontInfo specialFontInfo = new FontInfo(); - FontSetup.setup(specialFontInfo, null, null); + FontSetup.setup(specialFontInfo); PDFResources res = pdfDoc.getFactory().makeResources(); PDFResourceContext context = new PDFResourceContext(res); |