pub enum PacketCommand {
Font(usize),
FontId(u32),
Char(u32),
Rule {
height: i32,
width: i32,
},
Right(i32),
Down(i32),
Push,
Pop,
Special(Vec<u8>),
Pdf(u8, Vec<u8>),
Lua(i32),
Node(NodeRef),
}Expand description
One command of a virtual character’s packet: the DVI commands of a VF
file, or the commands of a character in a font table from Lua
(LuaTeX manual, “Virtual fonts”), which can also run Lua code.
Variants§
Font(usize)
Selects local font n (an index into VirtualFont::fonts).
FontId(u32)
Selects the engine font with this id (vf.fontid).
Char(u32)
Sets a character of the current font and moves right by its width.
Rule
Sets a rule (lower left corner at the current point) and moves right by its width.
Right(i32)
Moves right.
Down(i32)
Moves down.
Push
Saves the position.
Pop
Restores the position saved last.
Special(Vec<u8>)
A \special.
Pdf(u8, Vec<u8>)
A PDF literal in a mode of crate::pdfext::literal_mode.
Lua(i32)
Lua code or a Lua function, which the host keeps under this
reference number (observed: each lua command takes one, as
node data does): the code is run, the function called with the
font id and the character, when the character is output.
Node(NodeRef)
A node list, output at the current point; moves right by its width. The list belongs to the font.