[XeTeX] XeTeX 0.8 available -- now with OpenType support :-)
Jonathan Kew
jonathan_kew at sil.org
Wed Jun 2 12:41:13 CEST 2004
On 2 Jun 2004, at 11:15 am, Somadevah at aol.com wrote:
> Yes that much is clear to me, and it works fine for Unicode fonts
> with many glyphs (such as your Gentium). However it would be nice if I
> were able to use Adobe OT fonts which do not have all of the composite
> diacritic characters used for transliterating Indian languages ready
> made. In my old Textures setup this was easy, once I had generated the
> metrics of various Adobe type 1 fonts with edmetrics it was possible
> to do some simple catcode redefinitions such as:
>
> \catcode`\†=\active\def†{\d{t}} %typed option t becomes t with
> underdot
>
> and then use a screen font that used these conventions. These would
> then be aplied to any type 1 font. The same was possible with LaTeX
> inputenc. Thanks to your examples it seems to me now that it should be
> possible to do this again *provided* that XeTeX permits this catcode
> redefinition.
XeTeX permits such definitions; you can set the \catcode for any
Unicode character code, just as you used to be able to set it for any
8-bit code in standard TeX. (Actually, strictly speaking this is not
true. XeTeX can only assign \catcode or other similar values such as
\lccode for characters in the Basic Multilingual Plane; that is,
Unicode characters in the range U+0000 .. U+FFFF. But that should be
adequate for most users.)
However, making accents like this work may not be as easy as you hope,
in that when you use your installed OpenType (or AAT) fonts through
XeTeX, without .tfm files, TeX does not have complete character metrics
available during typesetting. In particular, it does not have the
character height and depth information that is used to correctly
position accents. This detail is normally found in .tfm files, but
can't be accurately derived from the OT fonts, and XeTeX doesn't
attempt it.
This means that you'd have to do extra work at the TeX macro level if
you want to try and "compose" accented characters for which the font
does not really have support. Of course, if you obtain or create a
suitable .tfm file, you can use the font in "TFM mode" instead of
directly as a Unicode font, and get accents to work nicely; but then
you lose access to the extended Unicode character set, optional font
features, etc. One way or another, it's a trade-off! The real answer is
for font developers/vendors to support a more complete Unicode
character repertoire.
> It seems that the AAT tables in the font don't actually access this
> glyph. There's a font feature "Conjuncts=Additional Conjuncts" that
> you
> can turn on in Devanagari MT, but when I try this I *still* don't get
> that ligature. This would be a question for the font people at Apple,
> I
> guess.
>
I just discovered an additional point. The version of Devanagari MT
that Apple shipped with Mac OS 9 *did* include this conjunct in the AAT
tables. That version of the font is numbered "3.5d3e1" (at least that's
what I have in my Classic system folder). But the version shipped with
OS X 10.3, numbered "4.1d4e4", does *not* support it.
So if you have the older font around, and can disable the new one and
use that instead, you'll get this form.
>
> To my surprise I now see that an OT font called "Sanskrit 2003" does
> produce this ligature if you add :script=deva. It is a fairly ugly
> typeface however (is it utf-16?).
UTF-16 isn't relevant to how the typeface looks; that's a question of
how the Unicode text in a file is represented in bits and bytes.
Yes, to use a Devanagari OpenType font you need to specify
"script=deva" as an option to the \font command; without this, you
won't get proper conjunct formation, repositioning of the i-matra
before the consonant, etc. The exact repertoire of conjuncts that
you'll get is dependent on the font; not all OT fonts necessarily
support the same collection.
Jonathan
More information about the XeTeX
mailing list