Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2032

[PATCH] How to use native text with EPSDocumentGraphics2D

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.5
    • None
    • renderer/ps
    • None
    • Operating System: Mac OS X 10.4
      Platform: PC
    • 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.

      Attachments

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

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            lmpmbernardo Luis Bernardo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: