[XeTeX] a bug of xltxtra.sty
Ulrike Fischer
news2 at nililand.de
Sun Oct 12 14:47:53 CEST 2008
Am Sun, 12 Oct 2008 11:50:35 +1100 schrieb Ross Moore:
>> There is no simple solution to this problem: with xetex it is easy to
>> use fonts and -- as it relies on unicode -- you no longer have to
>> bother with all the encoding stuff but the price is that there
>> aren't good fall-backs if glyphs are missing.
>
> Yes, this is correct to some extent: if you use fonts that don't have
> the Unicode characters that you want, then you have to do something
> about it.
> But giving up "all the encoding stuff" is quite wrong.
I didn't suggest to "give up" something. I only try to describe the
situation: The standard LaTeX encodings describe concrete character sets
and their order. And if you load a T1-font you can be quite sure that it
contain all the glyphs of the T1-encoding. But with fontspec all fonts
that you load through its interface are encoded in "EU1" encoding --
regardless of the glyphs you provide. So you no longer can use the
current setting of the encoding to decide if a glyph is in the font or
if you should switch to an appropriate accent command or even to another
font.
>> "You can try to define other commands to get the accents also with
>> fonts which don't have the actual chars e.g. (the code isn't
>> perfect, it should only show you some possibilities):
>
> Sorry, but going down this path just creates even more
> incompatibilities.
> You will surely regret this some time in the future, when you try to
> reuse older documents that have been prepared this way.
I'm certainly not happy with the code. But I don't see why defining new
accent commands can lead to incompatibilities. I do find it more
dangerous to redefining or disable existing commands as this can affect
fonts where the original accents commands work without proble.
Also what are currently the alternatives? I have seen this question in
the past weeks three or four times. In each case another font and
another accent command was involved. Font A has glyphs with accent a but
not with accent b, Font B has glyphs with accent b but not with accent
a.
Your code is certainly better that my crude versions, but it doesn't
solve the fundamental problem: That you have to correct individual fonts
in a quite specific way. If you add or correct accent commands with my
simple commands or your more sophisticated ones and then decide to use
another font you problably have to check all the corrections and change
some of them.
It also doesn't solve all problems to attach the changes to a font
command like \rmfamily. At first you can't rely on users or packages to
really use this command to switch to the font, and second it could also
be that the correction are e.g. needed only for the small caps shape or
the bold series.
In the long run it will probably be necessary to do font specific
corrections, e.g. throught some configuration file for each font or font
family.
--
Ulrike Fischer
More information about the XeTeX
mailing list