Fop
  1. Fop
  2. FOP-2032

[PATCH] How to use native text with EPSDocumentGraphics2D

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: renderer/ps
    • Labels:
      None
    • Environment:
      Operating System: Mac OS X 10.4
      Platform: PC
    • External issue ID:
      52966

      Description

      As reported recently in the users mailing list the code:

      OutputStream out = new FileOutputStream("mini-test.eps");
      EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
      g2d.setGraphicContext(new GraphicContext());
      g2d.setCustomTextHandler(new NativeTextHandler(g2d, null));
      g2d.setupDocument(out, 200, 100);
      g2d.setFont(new Font("Helvetica", Font.PLAIN, 12));
      g2d.drawString("Hi there", 50, 50);
      g2d.finish();
      out.close();

      generates invalid EPS files.

      1. fop.patch
        7 kB
        Luis Bernardo
      2. ExampleEPSSimple.java
        2 kB
        Luis Bernardo

        Activity

        Luis Bernardo created issue -
        Glenn Adams made changes -
        Field Original Value New Value
        Affects Version/s trunk [ 12323672 ]
        Affects Version/s all [ 12323671 ]

          People

          • Assignee:
            fop-dev
            Reporter:
            Luis Bernardo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development