[XeTeX] sting manipulation macros

Peter Dyballa Peter_Dyballa at Web.DE
Mon Oct 20 23:27:57 CEST 2008


Am 20.10.2008 um 18:11 schrieb Michiel Kamermans:

> I am not very familiar with virtual fonts, or how
> to use them in TeX: would that allow me to change which real font is
> being mapped to for certain glyphs or ranges "on the fly" in the
> document, or would it be static once declared?

Virtual Font files are searched first, as so many other components of  
TeX, in the directory where the TeX master file lies. It's probably  
best to create an ASCII version of the VF file, a so-called Virtual  
Property List or VPL file. This can be turned into a VF file by  
running vpltovf. With Perl you might be able to take other routes.  
The VF file is connected to TFM files. The TFM files record TeX font  
names. A MAP file maps the TeX font name to a file name and an  
optional ENCoding (file). So "on the fly" means that you first  
reserve a standard series of TeX font names, font file names, and  
optional encodings and their file names. Then you're free to juggle  
with the momentary contents of these file( name)s in the TeX file's  
directory ...

Inside the VPL file you can define with the MAPFONT statement a  
FONTNAME and its ordinal number (you can also choose a different font  
size, for faked small caps for example). When you later describe what  
is mapped into a particular slot in the virtual font, you can add a  
SELECTFONT statement that chooses one of the numbers greater 0 from  
the MAPFONT statements.

A virtual font has 256 slots. You can look into the VPL files in /usr/ 
local/texlive/2008/texmf-dist/source/latex/amsfonts/cyr-alt.

--
Greetings

   Pete

There's no sense in being precise when you don't even know what  
you're talking about.
				– John von Neumann





More information about the XeTeX mailing list