Please choose a menu option
Visit the IDRsolutions WebSite

Java Font Rasterizer

The Java Font Rasterizer takes the Font technology developed for the JPedal PDF renderer and makes it available as a generic library for more general usage.

It offers the ability to create custom components which can use Type1, CFF, OpenType and TrueType fonts available on a machine. This is a much broader range of fonts than currently available in Swing and also bypasses a number of Swing font bugs.

At the moment, it is still a 'work in progress'.

If you are looking at PDF fonts, the SimpleViewer Java PDF viewer is able to load PDF fonts on startup and display information about them.

Licensing

Licensing is on a GPL basis.

Downloading the Rasterizer

The Java font library is provided as a standalone jar file along with the source code.

Click here to Download latest version of the compiled jar.

Click here to download latest version of the java source code

Running the Demo

The Java Font Rasterizer can be run by double-clicking on the jar (if your machine is correctly setup) or using the command java -jar jfr.jar from the command-line.

You may need to tell the Java font rasterizer where the fonts are with the font flag (ie -Dorg.jpedal.fontdirs=/Library/Fonts on a MAC). Please see font article for details on how to find out paths and use this command.

Both should bring up a demo window looking like this (please note the actual fonts displayed WILL VARY.

PDF printing

Using the Java font rasterizer in your code

The library can used by adding the jar file to the classpath. The Java Font Rasterizer includes the following java code examples:

  • org.jfr.examples.Viewer is a very simple example which pops up a display and shows some sample text in different fonts.
  • org.jfr.examples.TxtViewer will open and display the contents of a text file in a Viewer.

 

Return to main PDF support section

Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library

 


PDF viewer