Package com.itextpdf.text.pdf
Class Pfm2afm
- java.lang.Object
-
- com.itextpdf.text.pdf.Pfm2afm
-
public final class Pfm2afm extends java.lang.ObjectConverts a PFM file into an AFM file.
-
-
Field Summary
Fields Modifier and Type Field Description private shortascenderprivate shortascentprivate shortavgwidthprivate intbitoffprivate intbitsprivate bytebrkcharprivate shortcapheightprivate bytecharsetprivate intchartabprivate java.lang.Stringcopyrightprivate bytedefcharprivate shortdescenderprivate intdeviceprivate shortextleadingprivate shortextlenprivate intfaceprivate intfirstcharprivate intfontnameprivate inth_lenprivate shorthorresprivate RandomAccessFileOrArrayinprivate shortintleadingprivate booleanisMonoprivate byteitalicprivate intkernpairsprivate bytekindprivate intlastcharprivate shortmaxwidthprivate java.io.PrintWriteroutprivate byteoversprivate shortpixheightprivate shortpixwidthprivate shortpointsprivate intpsextprivate intres1private intres2private shorttypeprivate byteulineprivate shortverresprivate shortversprivate shortweightprivate shortwidthbyprivate int[]Win2PSStdTranslate table from 1004 to psstd.private java.lang.String[]WinCharsWindows character names.private int[]WinClassCharacter class.private shortxheight
-
Constructor Summary
Constructors Modifier Constructor Description privatePfm2afm(RandomAccessFileOrArray in, java.io.OutputStream out)Creates a new instance of Pfm2afm
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidconvert(RandomAccessFileOrArray in, java.io.OutputStream out)Converts a PFM file into an AFM file.private voidopenpfm()private voidoutchar(int code, int width, java.lang.String name)private voidoutval(int n)private voidputchartab()private voidputheader()private voidputkerntab()private voidputtrailer()private java.lang.StringreadString()private java.lang.StringreadString(int n)
-
-
-
Field Detail
-
in
private RandomAccessFileOrArray in
-
out
private java.io.PrintWriter out
-
vers
private short vers
-
h_len
private int h_len
-
copyright
private java.lang.String copyright
-
type
private short type
-
points
private short points
-
verres
private short verres
-
horres
private short horres
-
ascent
private short ascent
-
intleading
private short intleading
-
extleading
private short extleading
-
italic
private byte italic
-
uline
private byte uline
-
overs
private byte overs
-
weight
private short weight
-
charset
private byte charset
-
pixwidth
private short pixwidth
-
pixheight
private short pixheight
-
kind
private byte kind
-
avgwidth
private short avgwidth
-
maxwidth
private short maxwidth
-
firstchar
private int firstchar
-
lastchar
private int lastchar
-
defchar
private byte defchar
-
brkchar
private byte brkchar
-
widthby
private short widthby
-
device
private int device
-
face
private int face
-
bits
private int bits
-
bitoff
private int bitoff
-
extlen
private short extlen
-
psext
private int psext
-
chartab
private int chartab
-
res1
private int res1
-
kernpairs
private int kernpairs
-
res2
private int res2
-
fontname
private int fontname
-
capheight
private short capheight
-
xheight
private short xheight
-
ascender
private short ascender
-
descender
private short descender
-
isMono
private boolean isMono
-
Win2PSStd
private int[] Win2PSStd
Translate table from 1004 to psstd. 1004 is an extension of the Windows translate table used in PM.
-
WinClass
private int[] WinClass
Character class. This is a minor attempt to overcome the problem that in the pfm file, all unused characters are given the width of space. Note that this array isn't used in iText.
-
WinChars
private java.lang.String[] WinChars
Windows character names. Give a name to the used locations for when the all flag is specified.
-
-
Constructor Detail
-
Pfm2afm
private Pfm2afm(RandomAccessFileOrArray in, java.io.OutputStream out) throws java.io.IOException
Creates a new instance of Pfm2afm- Throws:
java.io.IOException
-
-
Method Detail
-
convert
public static void convert(RandomAccessFileOrArray in, java.io.OutputStream out) throws java.io.IOException
Converts a PFM file into an AFM file.- Parameters:
in- the PFM fileout- the AFM file- Throws:
java.io.IOException- on error
-
readString
private java.lang.String readString(int n) throws java.io.IOException- Throws:
java.io.IOException
-
readString
private java.lang.String readString() throws java.io.IOException- Throws:
java.io.IOException
-
outval
private void outval(int n)
-
outchar
private void outchar(int code, int width, java.lang.String name)
-
openpfm
private void openpfm() throws java.io.IOException- Throws:
java.io.IOException
-
putheader
private void putheader() throws java.io.IOException- Throws:
java.io.IOException
-
putchartab
private void putchartab() throws java.io.IOException- Throws:
java.io.IOException
-
putkerntab
private void putkerntab() throws java.io.IOException- Throws:
java.io.IOException
-
puttrailer
private void puttrailer()
-
-