You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@apache.org on 2002/09/03 14:48:57 UTC

cvs commit: xml-fop/src/org/apache/fop/svg PDFGraphics2D.java

keiron      2002/09/03 05:48:57

  Modified:    src/org/apache/fop/pdf PDFDocument.java
               src/org/apache/fop/svg PDFGraphics2D.java
  Log:
  correctly handles font in pattern
  
  Revision  Changes    Path
  1.50      +3 -3      xml-fop/src/org/apache/fop/pdf/PDFDocument.java
  
  Index: PDFDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- PDFDocument.java	23 Aug 2002 13:45:25 -0000	1.49
  +++ PDFDocument.java	3 Sep 2002 12:48:57 -0000	1.50
  @@ -933,8 +933,8 @@
       public PDFFont makeFont(String fontname, String basefont,
                               String encoding, FontMetric metrics,
                               FontDescriptor descriptor) {
  -        if(fontMap.containsKey(basefont)) {
  -            return (PDFFont)fontMap.get(basefont);
  +        if(fontMap.containsKey(fontname)) {
  +            return (PDFFont)fontMap.get(fontname);
           }
   
           /*
  
  
  
  1.40      +6 -5      xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java
  
  Index: PDFGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- PDFGraphics2D.java	31 Jul 2002 08:20:41 -0000	1.39
  +++ PDFGraphics2D.java	3 Sep 2002 12:48:57 -0000	1.40
  @@ -797,7 +797,7 @@
               PDFResourceContext context = new PDFResourceContext(0, pdfDoc, res);
               PDFGraphics2D pattGraphic = new PDFGraphics2D(textAsShapes, fi,
                                               pdfDoc, context, pageRef,
  -                                            currentFontName, currentFontSize,
  +                                            "", 0,
                                               currentYPosition, currentXPosition);
               pattGraphic.gc = (GraphicContext)this.gc.clone();
               pattGraphic.gc.validateTransformStack();
  @@ -1008,9 +1008,10 @@
               FontMetric metrics = fontInfo.getMetricsFor(fname);
               fontState = new FontState(fname, metrics, siz * 1000);
           } else {
  -            fontState = ovFontState;
  +            FontMetric metrics = fontInfo.getMetricsFor(ovFontState.getFontName());
  +            fontState = new FontState(ovFontState.getFontName(), metrics, ovFontState.getFontSize());
               ovFontState = null;
  -        }       
  +        }
           String name;
           float size;
           name = fontState.getFontName();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org