[XeTeX] sting manipulation macros

Michiel Kamermans pomax at nihongoresources.com
Mon Oct 20 18:11:40 CEST 2008


Ulrike Fischer wrote:
> 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?
>   
Good point. For full conformance it would be quite a task (although I 
would be very surprised if proper unicode 5.0 handling string 
manipulation GPL libraries haven't already been written and extensively 
debugged by 2008). That said though, I would frankly be willing to live 
with an addition of less than perfect macros if it meant I had access to 
at least predictable-for-singleton-glyph-string string manipulation 
macros like length, substring and string replacement. It would make 
writing as-of-yet unimagined packages later on less of a hassle most of 
the time, or just as hard as it is now because the additional macros 
cannot be relied upon. A no loss/potential gain situation always looks good.

> I looked at the documentation of your package (btw. is it correct that
> is says "\usepackage{autfont}" instead of "\usepackage{fontwrap}"?). 
>   
No... no, it's not... it was intially called "autofont" but was renamed 
after initial submission to CTAN because the word is used in TMF 
generation. I'll correct that and send up to CTAN again as soon as I get 
a chance (probably thursday)

> 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. 
Hmm, that might work. 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? If the first: excellent! 
(no more need for fontwrap then), if the second: not so excellent... I 
kind of rely on being able to change fonts constantly due to what the 
fonts mean to readers (textbook lettering vs. handwritten lettering vs. 
caligraphy lettering, etc.).

Regards,

- Mike


More information about the XeTeX mailing list