diff options
author | Keiron Liddle <keiron@apache.org> | 2001-07-09 08:14:44 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2001-07-09 08:14:44 +0000 |
commit | fb5eabc94fc281e0e59cb56bda66fe57751a81f5 (patch) | |
tree | 892fb80b0dd87336cd373bce24653a66395ddf25 /src/org/apache | |
parent | 8c52cd6f14c78fd8f5ef77c7afacc95820dab393 (diff) | |
download | xmlgraphics-fop-fb5eabc94fc281e0e59cb56bda66fe57751a81f5.tar.gz xmlgraphics-fop-fb5eabc94fc281e0e59cb56bda66fe57751a81f5.zip |
sets up the font state if not using strokes for text
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194340 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r-- | src/org/apache/fop/svg/PDFDocumentGraphics2D.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/org/apache/fop/svg/PDFDocumentGraphics2D.java b/src/org/apache/fop/svg/PDFDocumentGraphics2D.java index 4a2e5ea0c..f0bc9f9cd 100644 --- a/src/org/apache/fop/svg/PDFDocumentGraphics2D.java +++ b/src/org/apache/fop/svg/PDFDocumentGraphics2D.java @@ -1,13 +1,16 @@ /* $Id$ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the - * LICENSE file included with these sources." + * LICENSE file included with these sources. */ package org.apache.fop.svg; import org.apache.fop.pdf.*; import org.apache.fop.fonts.*; +import org.apache.fop.render.pdf.FontSetup; +import org.apache.fop.layout.*; +import org.apache.fop.apps.FOPException; import java.awt.Graphics; import java.awt.Font; @@ -49,6 +52,15 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D { public PDFDocumentGraphics2D(boolean textAsShapes, OutputStream stream, int width, int height) { super(textAsShapes); + + if(!textAsShapes) { + FontInfo fontInfo = new FontInfo(); + FontSetup.setup(fontInfo); + try { + fontState = new FontState(fontInfo, "Helvetica", "normal", "normal", 12, 0); + } catch(FOPException e) { + } + } standalone = true; this.stream = stream; this.pdfDoc = new PDFDocument(); |