[XeTeX] Egyptian hieroglyphs in XeTeX

David Perry hospes.primus at verizon.net
Thu Aug 27 05:27:05 CEST 2009


Robert,

It would be helpful for those of us who don't know hieroglyphics (and 
perhaps also for you, as you approach this project) to define precisely 
what you need done.  Based on the example you sent, I think you need:
1. glyphs next to each other in a line
2. glyphs sometimes mirrored
3. one glyph sometimes stacked on top of another
4. three glyphs sometimes stacked vertically
5. any number of glyphs placed inside an oval (a cartouche, if I recall 
that term correctly from somewhere)
This is probably not a complete list, but you get the idea.

Then clarify what technology you wish to use and what level of expertise 
you have.  It sounds like you are familiar with Graphite but don't wish 
to use it.  As Gareth pointed out, a font using OpenType (or Graphite, I 
think -- I don't know much about the latter) could do some of the things 
on my little list, such as mirrored glyphs, very easily.

Another issue is how many combinations of glyphs there are.  Do only 
certain glyphs stack one atop the other, or can any combination of 
glyphs do this, if the scribe felt like it?  If the former, OpenType 
substitution tables would be a good solution; you could define a 
sequence such as A ZWJ B to be replaced by a glyph with B stacked above 
A.  Creating such substitutions is not difficult, but keeping track of a 
large number of them can get tricky; you also have to create the 
combination glyph for each substitution you define.  If the number of 
combinations is very large, you may need a different solution, or else 
be prepared to create very large lookups.

How good are your TeX programming skills?  I myself have never learned 
to do real low-level TeX programming, but I think that you could create 
a command such as \stack{} that would take two characters inside 
brackets, compare the widths, put the second one atop fhe first, scaling 
the glyphs as needed . . . but that's way beyond me!  LIkewise, you 
probably could put an oval around a group of characters, if you have the 
skill.  (I'm not a mathematician; I wonder if any of the TeX commands 
for mathematical typesetting might be used or adapted for glyph 
positioning such as you need in hieroglyphics.)  The effort in TeX 
programming might be worth it if it avoided the need to create a font 
with hundreds of substitutions.

You say that the font exists, but it's not clear whether it's a Unicode 
font (I'm guessing not).  So you would need to:
a) modify the font, if you are allowed to do so, to put the glyphs at 
the appropriate Unicode codepoints.  This is not at all difficult for 
someone experienced with fonts, just a nuisance to do 1000 glyphs!
b) create features with OpenType (or Graphite), if your needs can be 
addressed that way
or
c) do some TeX programming, maybe create a new package with commands to 
group and position glyphs as required for hieroglyphics; look at the 
existing hieroglyphics package for some ideas, perhaps

Good luck -- you are on the cutting edge here!

David




More information about the XeTeX mailing list