[dvipdfmx] Support of dvi generated by dvilua(la)tex?

Marcel Fabian Krüger tex at 2krueger.de
Fri Jan 8 19:04:54 CET 2021


Hi,

there is no such document right now, but the format is the following:

(Keywords used more or less according to RFC 8174)

In the following, the term "legacy font" is used to mean a classical TFM
based font with upto 256 codepoints. A "modern font" is a (TTF or PS
flavoured) Opentype font which does not have an associated TFM file.

There are no new operators added to the DVI format. All "modern font"s
are defined with fnt_def instructions exactly like "legacy font"s.
A fnt_def defines a "modern font" iff the checksum is equal to
0x556E6946 ("LuaF" encoded in ASCII) and the first character of the font
name is `[`. Every other fnt_def should define a "legacy font".

The fontname of a "modern font" consists of two parts: The filename
surrounded by `[` and `]` and a (potentially empty) (`;`-separated)
set of key-value pairs, each pair separated by `=`. (The list of
key-value pairs will never contain a `]`, therefore a reader which wants
to support filenames containing `]` can look for the last such
character. Alternativly such filenames can be considered a user error.)
While the filename will normally consist of a absolute path, it's
recommended to apply regular kpse lookup rules if only filename is
provided.
The key-value list can currently contain:

  index: Used for TTC font collections. 0-based index of the used font.
         Should default to 0 if not specified.
  embolden/slant/extend: The same meaning and units as the corrsponding
         field in XDV native font declarations. That is:
  embolden: The font should be drawn with in fill and outline mode
         with linewidth of <value>/65536
  slant: Font shoud be slanted with factor <value>/65536
  extend: font should be horizontally scaled by factor <value>/65536

Example font names would look like this (without the surrounding
quotes):

"[./lmroman10-regular.otf]"
"[/home/god/fonts/Optima.ttc]:index=1;slant=65536;embolden=6554"

Unknown keys in the key-value list should be ignored but trigger a
warning. The value of unknown keys might contain any character except
for `;` and `]`. The key might contain any characters except for `;`,
`=` and `]`.

The actual text is set with regular set_char/set1/set2 instructions
where the character number represents the glyph Id (GID) of the
glyph in the specified font.

If there are any further questions, please let me know. 

Best regards,
Marcel


More information about the dvipdfmx mailing list.