global vf
The vf
library can be used when Lua code, as defined in the commands
of the font, is executed. The functions provided are similar as the
commands: char
, down
, fontid
, image
, node
, nop
, pop
, push
, right
, rule
, special
and pdf
. This library has been present for a while but not been
advertised and tested much, if only because it's easy to define an invalid font
(or mess up the PDF stream). Keep in mind that the Lua snippets are executed
each time when a character is output.
π± Types incomplete or incorrect? π Please contribute!
methods
vf.char
Typeset a character from the current font, and move right by the characterβs width.
Reference:
- Corresponding C source code: lfontlib.c#L327-L352
vf.down
Move down on the page.
vf.fontid
Reference:
- Corresponding C source code: lfontlib.c#L369-L376
vf.image
Output an image (the argument can be either an image
variable or an image_spec
table)
Reference:
- Corresponding C source code: lfontlib.c#L378-L387
vf.node
function vf.node(list: Node {
next = Node?,
prev = Node?,
id = integer,
subtype = integer,
head = Node?,
attr = Node,
})
Output this node (list), and move right by the width of this list.
Reference:
- Corresponding C source code: lfontlib.c#L389-L398
vf.nop
Do nothing.
Reference:
- Corresponding C source code: lfontlib.c#L400-L406
π± Types incomplete or incorrect? π Please contribute!
vf.pop
Pop position.
Reference:
- Corresponding C source code: lfontlib.c#L408-L420
π± Types incomplete or incorrect? π Please contribute!
vf.push
Save the current position.
Reference:
- Corresponding C source code: lfontlib.c#L422-L435
π± Types incomplete or incorrect? π Please contribute!
vf.right
Move right on the page.
vf.rule
Output a rule (height * width) and move right.
Reference:
- Corresponding C source code: lfontlib.c#L455-L475
vf.special
Output a \special
command.
vf.pdf
Output a pdf literal.
The first string is one of origin
,
page
, text
, font
, direct
or raw
Reference:
- Corresponding C source code: lfontlib.c#L491-L499
- Corresponding C source code: lpdflib.c#L25-L87
vf.pdf
Output a pdf literal.
If you have one string
only origin
is assumed.
Reference:
- Corresponding C source code: lfontlib.c#L491-L499
- Corresponding C source code: lpdflib.c#L25-L87