[XeTeX] sting manipulation macros

Ulrike Fischer news2 at nililand.de
Mon Oct 20 15:52:46 CEST 2008


Am Sun, 19 Oct 2008 03:35:07 -0700 schrieb Michiel Kamermans:


> Would there be animo for having access to actual string manipulation 
> functions, wrapped by macros, in the xetex engine? I am thinking 
> primarily common things like string lenths, substring selecting, a 
> string-per-character macro call, glyph string to bytecode string and 
> vice versa (for glyph comparison and generation)..

I doubt a bit that this is easy in a unicode environment as there is no
simple character <-> glyph relation. What is the length of a string that
contains some of the "joiners" chars etc?

> 
> I mainly ask because right now the fontwrap package I wrote is 
> implemented in perl, and relies on perltex, which is a wonderfully 
> "clever" way to mix technologies, but isn't without its own problems 
> (like... having to rely on perl). The only reason I did this was because 
> I needed to compare individual glyphs in sections of text to unicode 
> block start and end markers, so that I could insert tex macros between 
> characters of different unicode blocks (if the font definitions for 
> those blocks were different). 

I looked at the documentation of your package (btw. is it correct that
is says "\usepackage{autfont}" instead of "\usepackage{fontwrap}"?). 

I would say you don't need a substring command but a method to set up a
virtual font which gets its glyphs from different real fonts. Then you
wouldn't have to setup your command for all sorts of environments. 




-- 
Ulrike Fischer 



More information about the XeTeX mailing list