[XeTeX] misplaced combining diacritical marks
Bruno Voisin
bvoisin at mac.com
Sun Aug 29 01:00:33 CEST 2004
Hi Jonathan and Yves,
You were right in every respect:
Le 28 août 04, à 22:07, Jonathan Kew a écrit :
> On 28 Aug 2004, at 3:44 pm, Bruno Voisin wrote:
>
>> I don't think there are any problems with font substitution (in
>> LaTeX's NFSS sense) when the original font name contains a space. For
>> example I use customarily now:
>>
>> \DeclareFontFamily{U}{trebuchet}{}
>> \DeclareFontShape{U}{trebuchet}{m}{n}%
>> {<-> "Trebuchet\space MS"}{}
>> \DeclareFontShape{U}{trebuchet}{m}{it}%
>> {<-> "Trebuchet\space MS\space Italic"}{}
>> \DeclareFontShape{U}{trebuchet}{bx}{n}%
>> {<-> "Trebuchet\space MS\space Bold"}{}
>> \DeclareFontShape{U}{trebuchet}{b}{n}%
>> {<-> ssub * trebuchet/bx/n}{}
>> \DeclareFontShape{U}{trebuchet}{bx}{it}%
>> {<-> "Trebuchet\space MS\space Bold\space Italic"}{}
>> \DeclareFontShape{U}{trebuchet}{b}{it}%
>> {<-> ssub * trebuchet/bx/it}{}
>
> The only "ssub" entries here are for the 'b' (not 'bx') shape, and I'm
> guessing you haven't actually exercised those cases. With these
> declarations, it works fine for me to say:
>
> ... normal text ... \textbf{bold text} ... more normal text ...
>
> but if I insert before this:
>
> \renewcommand{\bfdefault}{b}
>
> so that \textbf will use the non-extended bold shape, then I get a
> failure. (Don't know if that's the right LaTeX way to do it, but it
> should work.)
Confirmed. ssub doesn't like spaces or ", and I had actually never used
it really with XeTeX-accessed fonts. I tried the solution given on this
list earlier (on 15 April) by Ross Moore, namely something like:
{\catcode`\"=11\obeyspaces\gdef\TrebBold{"Trebuchet MS Bold"}}
\DeclareFontShape{U}{trebuchet}{bx}{n}%
{<-> \TrebBold}{}
but it works no better re. substitution. I've tried replacing spaces by
\char"0020 or " by \char"0022, to no avail.
I looked at the way font substitution is performed in latex.ltx, but
it's getting far too technical for me: commands calling commands
calling commands, each involving plenty of \expandafter \noexpand
\csname \endcsname. In particular, the internal font name in LaTeX (for
every encoding/family/series/shape) is defined through a \csname, which
I think is the source of the problem when combined with substitution. I
went as far as linking "ssub" with:
\def\sub at sfcnt#1{%
\edef\mandatory at arg{\f at encoding/\mandatory at arg}%
\begingroup
\expandafter\split at name\mandatory at arg/\@nil
\try at load@fontshape
\endgroup
\let\f at user@size\f at size
\expandafter
\ifx\csname\mandatory at arg\endcsname\relax
\errmessage{No\space declaration\space for\space
shape\space \mandatory at arg}%
\error at fontshape
\else
#1{Font\space shape\space `\curr at fontshape'\space in\space
size\space <\f at size>\space not\space available\MessageBreak
Font\space shape\space `\mandatory at arg'\space tried\space
instead}%
\expandafter\split at name\mandatory at arg/\@nil
\fi
\edef\f at size{\f at user@size}%
\get at external@font
\do at subst@correction
}
and looking at the various commands it calls, but I must admit it's
beyond my expertise and I have to give up.
Le 28 août 04, à 13:16, Jonathan Kew a écrit :
> "Doulos SIL" is the correct name (as verified by a simple Plain TeX
> test); this corresponds to the "Display Name" shown by Font Book.
>
> It looks to me as though substitution specifications such as
>
> \DeclareFontShape{U}{DoulosSIL}{bx}{n}%
> {<-> ssub * DoulosSIL/m/n}{}
>
> fail when the original font name included spaces. The quotes from the
> original declaration
>
> \DeclareFontShape{U}{DoulosSIL}{m}{n}%
> {<-> "Doulos\space SIL"}{}
>
> are getting lost somewhere, so that the underlying \font command
> generated when you use bold (or italic, etc) uses the name "Doulos
> SIL" but without the quotes. That, of course, looks to XeTeX like a
> request for a font just called "Doulos".
>
> A workaround would be to give the actual font name for all shapes,
> instead of using "ssub".
Confirmed in every respect.
Thus it turns out I'm no helpful at all. Sorry.
Maybe this kind of relatively generic LaTeX question (proper access to
fonts, specified with syntax "Font with spaces in its name and name
inside quotes", from LaTeX) would interest the LaTeX developers/experts
hanging around at comp.text.tex, and get answered there. I've never had
any luck with comp.text.tex myself, but you might be luckier.
Bruno
More information about the XeTeX
mailing list