|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.vf.command.VfCommand
org.extex.font.format.vf.command.VfCommandFontDef
public class VfCommandFontDef
VfCommand: fnt_def.
After the pre command, the preamble continues with font
definitions; every font needed to specify 'actual' characters in later
set_char commands is defined here. The font definitions are
exactly the same in VF files as they are in DVI files, except that the scaled
size s is relative and the design size d is
absolute:
fnt_def1 243 k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]
Define font k, where 0 <= k < 256.
fnt_def2 244 k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]
Define font k, where 0 <= k < 65536.
fnt_def3 245 k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]
Define font k, where 0 <= k < 2^24
fnt_def4 246 k[4] c[4] s[4] d[4] a[1] l[1] n[a+l]
Define font k, where -2^31 <= k <= 2^31.
These font numbers k are 'local'; they have no relation to
font numbers defined in the DVI file that uses this virtual font. The
dimension s, which represents the scaled size of the local
font being defined, is a fix_word relative to the design size
of the virtual font. Thus if the local font is to be used at the same size as
the design size of the virtual font itself, s will be the
integer value 2^20. The value of s must be positive and less
than 2^24 (thus less than 16 when considered as a fix_word).
The dimension d is a fix_word in units of
printer's points; hence it is identical to the design size found in the
corresponding TFM file.
The four-byte value c is the check sum.
Parameter s contains a fixed-point scale factor that is
applied to the character widths in font k; font dimensions in
TFM files and other font files are relative to this quantity, which is always
positive and less than 227. It is given in the same units as the other
dimensions of the DVI file.
Parameter d is similar to s; it is the design
size, and (like s) it is given in DVI units. Thus, font
k is to be used at mag s/1000d times its
normal size.
The remaining part of a font definition gives the external name of the font,
which is an ASCII string of length a + l. The
number a is the length of the area or directory, and l is the
length of the font name itself; the standard local system font area is
supposed to be used when a = 0. The n field contains the area in its first a
bytes.
| Field Summary |
|---|
| Fields inherited from class org.extex.font.format.vf.command.VfCommand |
|---|
FNT_DEF_1, FNT_DEF_2, FNT_DEF_3, FNT_DEF_4, MAX_CHARACTER, MIN_CHARACTER, POST, PRE, SHIFT16, SHIFT8 |
| Constructor Summary | |
|---|---|
VfCommandFontDef(Localizer localizer,
RandomAccessR rar,
int ccode)
Create e new object. |
|
| Method Summary | |
|---|---|
int |
getChecksum()
Getter for checksum. |
TfmFixWord |
getDesignsize()
Getter for designsize. |
FixedDimen |
getDesignsizeAsDimen()
Returns the designsize as Dimen. |
java.lang.String |
getFontname()
Getter for fontname. |
int |
getFontnumbers()
Getter for fontnumbers. |
TfmFixWord |
getScalefactor()
Getter for scalefactor. |
FixedCount |
getScalefactorAsCount()
Return the scalefactor as Count. |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
| Methods inherited from class org.extex.font.format.vf.command.VfCommand |
|---|
getCommandCode, getInstance, getLocalizer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VfCommandFontDef(Localizer localizer,
RandomAccessR rar,
int ccode)
throws java.io.IOException,
FontException
localizer - The localizer for the messages.rar - the input.ccode - the command code.
java.io.IOException - if a IO-error occurred.
FontException - if a error reading the font.| Method Detail |
|---|
public int getChecksum()
public TfmFixWord getDesignsize()
public FixedDimen getDesignsizeAsDimen()
Dimen.
Dimen.public java.lang.String getFontname()
public int getFontnumbers()
public TfmFixWord getScalefactor()
public FixedCount getScalefactorAsCount()
Count.
Count.
public void writeXML(XMLStreamWriter writer)
throws java.io.IOException
writer - the XML-Writer
java.io.IOException - if an IO-error occurs.XMLWriterConvertible.writeXML(org.extex.util.xml.XMLStreamWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||