com.openpcl.pclrenderimage.render
Class PriCharWidthTables
java.lang.Object
com.openpcl.pclrenderimage.render.PriCharWidthTables
public class PriCharWidthTables
- extends Object
Character width tables for the built in fonts in the HP Laserjet III printer.
You can use these tables to calculate the exact character width in the point size you want by applying the
following formula:
New Width = (New Point Size/Known Point Size) * Width of Known Point Size
The character widths included here are based on 100 point size, so Known Point Size = 100.
The Width of Known Point Size is determined from the Cursor Move column in the tables.
For example, if you want to know the character width of a capital i (I), which is the decimal value 73,
in 14 point using CGTIMR8R.CWT we would do the following:
New Width = (14/100) * 331.2 = 46.37
(Where 331.2 is the Cursor Move value for the decimal value 73, a capital i (I).)
As with most proportional fonts, the space character is not defined in the CG Times and Univers typefaces, so
no character width is listed for decimal character 32 (hex 20). When the printer receives a space character it
"prints" a control code space. The width for the control code space for all treatments and symbol sets of
CG Times is 123 dots and Univers is 138 dots.
These character width tables were generated in Roman 8 and PC-8 symbol sets for 100 point size characters.
There are 16 character width tables for built in printer fonts:
1. Univers 4148:
a. 4 tables for Plain, Bold, Italic, BoldItalic in Roman8
b. 4 tables for Plain, Bold, Italic, BoldItalic in PC8
2. Times 4101:
a. 4 tables for Plain, Bold, Italic, BoldItalic in Roman8
b. 4 tables for Plain, Bold, Italic, BoldItalic in PC8
- Author:
- howard 5/19/2006
9/27/07 HowardH Changed the char widths of char codes 128 to 255 of the 16 tables
for the 9U Windows 1252 ANSI Char set so that Spanish docs view and print OK.
Previously, the char widths were wrong for a e i o u with the accents over them, and the n with the tilde over it.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sIndexTimesPlainRoman8
public static final int sIndexTimesPlainRoman8
- See Also:
- Constant Field Values
sIndexTimesBoldRoman8
public static final int sIndexTimesBoldRoman8
- See Also:
- Constant Field Values
sIndexTimesItalicRoman8
public static final int sIndexTimesItalicRoman8
- See Also:
- Constant Field Values
sIndexTimesBoldItalicRoman8
public static final int sIndexTimesBoldItalicRoman8
- See Also:
- Constant Field Values
sIndexUniversPlainRoman8
public static final int sIndexUniversPlainRoman8
- See Also:
- Constant Field Values
sIndexUniversBoldRoman8
public static final int sIndexUniversBoldRoman8
- See Also:
- Constant Field Values
sIndexUniversItalicRoman8
public static final int sIndexUniversItalicRoman8
- See Also:
- Constant Field Values
sIndexUniversBoldItalicRoman8
public static final int sIndexUniversBoldItalicRoman8
- See Also:
- Constant Field Values
sIndexTimesPlainPC8
public static final int sIndexTimesPlainPC8
- See Also:
- Constant Field Values
sIndexTimesBoldPC8
public static final int sIndexTimesBoldPC8
- See Also:
- Constant Field Values
sIndexTimesItalicPC8
public static final int sIndexTimesItalicPC8
- See Also:
- Constant Field Values
sIndexTimesBoldItalicPC8
public static final int sIndexTimesBoldItalicPC8
- See Also:
- Constant Field Values
sIndexUniversPlainPC8
public static final int sIndexUniversPlainPC8
- See Also:
- Constant Field Values
sIndexUniversBoldPC8
public static final int sIndexUniversBoldPC8
- See Also:
- Constant Field Values
sIndexUniversItalicPC8
public static final int sIndexUniversItalicPC8
- See Also:
- Constant Field Values
sIndexUniversBoldItalicPC8
public static final int sIndexUniversBoldItalicPC8
- See Also:
- Constant Field Values
mCharWidthTablesArrayList
protected ArrayList<int[]> mCharWidthTablesArrayList
mSpaceCharWidthForTimes
protected int mSpaceCharWidthForTimes
mSpaceCharWidthForUnivers
protected int mSpaceCharWidthForUnivers
mTimesPlainRoman8
protected int[] mTimesPlainRoman8
mTimesBoldRoman8
protected int[] mTimesBoldRoman8
mTimesItalicRoman8
protected int[] mTimesItalicRoman8
mTimesBoldItalicRoman8
protected int[] mTimesBoldItalicRoman8
mUniversPlainRoman8
protected int[] mUniversPlainRoman8
mUniversBoldRoman8
protected int[] mUniversBoldRoman8
mUniversItalicRoman8
protected int[] mUniversItalicRoman8
mUniversBoldItalicRoman8
protected int[] mUniversBoldItalicRoman8
mTimesPlainPC8
protected int[] mTimesPlainPC8
mTimesBoldPC8
protected int[] mTimesBoldPC8
mTimesItalicPC8
protected int[] mTimesItalicPC8
mTimesBoldItalicPC8
protected int[] mTimesBoldItalicPC8
mUniversPlainPC8
protected int[] mUniversPlainPC8
mUniversBoldPC8
protected int[] mUniversBoldPC8
mUniversItalicPC8
protected int[] mUniversItalicPC8
mUniversBoldItalicPC8
protected int[] mUniversBoldItalicPC8
PriCharWidthTables
public PriCharWidthTables()
getCharWidthTablesArrayList
public ArrayList<int[]> getCharWidthTablesArrayList()
OpenPCL http://www.openpcl.com