|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.extex.font.type.vf.command.VFCommand
de.dante.extex.font.type.vf.command.VFCommandCharacterPackets
VFCommand: character packets
The preamble is followed by zero or more character packets, where each character packet begins with a byte that is <<243. Character packets have two formats, one long and one short:
long_char 242 pl[4] cc[4] tfm[4] dvi[pl]
This long form specifies a virtual character in the general case.
short_char 0..241=pl[1] cc[1] tfm[3] dvi[pl]
This short form specifies a virtual character in the common case when 0 <= pl <242 and 0 <= cc <256 and 0 < <= tfm < 2^24. The ccode is pl!
Here pl
denotes the packet length following
the tfm
value; cc
is the character code;
and tfm
is the character width copied from the
TFM file for this virtual font. There should be at most one character
packet having any given cc
code.
The dvi
bytes are a sequence of complete DVI commands, properly
nested with respect to push
and pop
.
All DVI operations are permitted except bop
, eop
,
and commands with opcodes >=243.
Font selection commands (fnt_num0
through fnt4
)
must refer to fonts defined in the preamble.
Dimensions that appear in the DVI instructions are analogous to
fix_word
quantities; i.e., they are integer multiples
of 2^-20 times the design size of the virtual font.
For example, if the virtual font has design size 10pt, the DVI command
to move down 5pt would be a down
instruction with
parameter 2^19. The virtual font itself might be used at a different size,
say 12pt; then that down
instruction would move down
6pt instead. Each dimension must be less than 2^24 in absolute value.
Device drivers processing VF files treat the sequences of dvi
bytes
as subroutines or macros, implicitly enclosing them with push
and pop
.
Each subroutine begins with w=x=y=z=0
, and with current
font f
the number of the first-defined in the preamble
(undefined if there's no such font). After the dvi
commands
have been performed, the h
and v
position registers
of DVI format and the current font f
are restored to their
former values; then, if the subroutine has been invoked by
a set_char
or set
command, h
is
increased by the TFM width (properly scaled) - just as if a simple character
had been typeset.
Field Summary |
Fields inherited from class de.dante.extex.font.type.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 | |
VFCommandCharacterPackets(RandomAccessR rar,
int ccode,
FontFactory fontfac,
java.util.Map fontm,
TFMFont mtfm)
Create e new object. |
Method Summary | |
void |
addGlyph(org.jdom.Element element)
Add glyph to the element |
int |
getCharactercode()
Returns the charactercode. |
byte[] |
getDvi()
Returns the dvi. |
int |
getPacketlength()
Returns the packetlength. |
TFMFixWord |
getWidth()
Returns the width. |
void |
toPL(PlWriter out)
Print all information (jn PL-format) to the writer. |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
Methods inherited from class de.dante.extex.font.type.vf.command.VFCommand |
getCommandCode, getInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VFCommandCharacterPackets(RandomAccessR rar, int ccode, FontFactory fontfac, java.util.Map fontm, TFMFont mtfm) throws java.io.IOException, FontException
rar
- the inputccode
- the command codefontfac
- the font factoryfontm
- the fontmapmtfm
- the master tfm
java.io.IOException
- if a IO-error occured
FontException
- if a error reading the font.Method Detail |
public int getCharactercode()
public byte[] getDvi()
public int getPacketlength()
public TFMFixWord getWidth()
public void writeXML(XMLStreamWriter writer) throws java.io.IOException
XMLWriterConvertible
writeXML
in interface XMLWriterConvertible
writer
- the XML-Writer
java.io.IOException
- if an IO-error occurs.XMLWriterConvertible.writeXML(de.dante.util.xml.XMLStreamWriter)
public void toPL(PlWriter out) throws java.io.IOException, FontException
PlFormat
toPL
in interface PlFormat
out
- the plwriter
java.io.IOException
- if an IO-error occurs.
FontException
- if a font-error occurs.PlFormat.toPL(
de.dante.extex.font.type.PlWriter)
public void addGlyph(org.jdom.Element element) throws FontException
element
- the element
FontException
- if a font-error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |