Java 2D PostScript Text
Synopsis - what this project is about.
PSGraphics2D - Graphics2D subclass for PostScript.
Comparison - this project vs. Java 2D printing.
Source code hosted at
Java 2D PostScript Text builds on the Java 2D Graphics2D class to generate PostScript code for text-intensive, global printing applications. This includes support of CID fonts for multi-lingual printing.
It is part of a larger Lightsaber Computing multi-lingual computing initiative known as Project 3PO.
2000 Aug 6 - Initial tarball java2d-pstext-0.1.tar.gz has been released on Source Forge.
2000 Aug 4 -
Project has been registered on Source Forge.
No code has been copied to the site yet.
Project info is being written.
At present, effort is focusing on PSGraphics2D, an extension/subclass of the Graphics2D class, found in the Java 1.2 Standard Edition JDK/JRE. The parent class includes font and image manipulation, in addition to rendering of text; in these areas, PSGraphics2D doesn't come anywhere near its parent. This is an issue which will have to be addressed as the class implementation matures.
The current implementation of PSGraphics2D takes advantage of an earlier effort by Lightsaber Computing, aimed at solving a set of technical problems posed by clients of the company, particularly in dealing with multi-lingual printing.
Graphics2D is a general purpose 2D rendering API intended for display or printing. The API is sufficiently rich that it covers most of the capabilities that the Lightsaber Computing rendering library was aimed at. The API is being widely accepted; it there made sense to take the rendering library and match it to the API.
However, Graphics2D goes far beyond simply rendering
text. The involved technologies are sufficiently diverse and
complex that Lightsaber Computing has chosen to manage the effort
as an open source project.
Although Java 2D is able to generate PostScript code, each glyph in a line of text seems to be rendered by PostScript graphics operators. In essence, the resulting PostScript file has no text in it.
PSGraphics2D assumes that the output will be sent to a PostScript rendering engine, such as a laser printer or software package such as PostScript.
To compare the text rendering capabilities of the two, one can look at the PostScript output which was generated by each for rendering the string "Hello, World!":
The PostScript generated by PSGraphics2D is clearly smaller. However, the issues are not so simple.
The advantages of the native Java 2D solution are that:
The disadvantages are that the resulting file:
By contrast, the PSgraphics2D class takes the traditional PostScript printing approach, assuming that the fonts are loaded into the printer. The potential problems which plague this, and every PostScript generator are:
The advantages are that the resulting output: