]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
sets up the font state if not using strokes for text
authorKeiron Liddle <keiron@apache.org>
Mon, 9 Jul 2001 08:14:44 +0000 (08:14 +0000)
committerKeiron Liddle <keiron@apache.org>
Mon, 9 Jul 2001 08:14:44 +0000 (08:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194340 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/svg/PDFDocumentGraphics2D.java

index 4a2e5ea0c9aaa4eeaf5fb51a15e168bb5b9fcc09..f0bc9f9cd091068443e9132fc6836a3ec00f9b6c 100644 (file)
@@ -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();