[XeTeX] misplaced combining diacritical marks

Ross Moore ross at maths.mq.edu.au
Sun Aug 29 02:41:41 CEST 2004


Hi Jonathan,

On 29/08/2004, at 6:07 AM, Jonathan Kew wrote:

>>>
>>> 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".
>>
>> 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:
>>
>> \DeclareFontShape{U}{trebuchet}{bx}{n}%
>>   {<-> "Trebuchet\space MS\space Bold"}{}
>> \DeclareFontShape{U}{trebuchet}{b}{n}%
>>   {<-> ssub * trebuchet/bx/n}{}
>
> 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.)
>

The problem lies with the  \fontname  primitive, as you can see from
these snippets from a .log file, which show the name associated with
the current font, as referenced by \font :

 > \this=macro:
->cmr10 at 10.95pt.
l.35 \edef\this{\fontname\font}\show\this


 > \this=macro:
->Trebuchet MS at 10.95pt.
l.49 \edef\this{\fontname\font}\show\this



 > \this=macro:
->Trebuchet MS Bold at 10.95pt.
<argument> ...\this {\fontname \font }\show \this
                                                   will use the 
non-extended ...
l.54 will use the non-extended bold shape,}


 > \this=macro:
->nullfont.
<argument> ...\this {\fontname \font }\show \this
                                                   will use the 
non-extended ...
l.60  will use the non-extended bold shape,}


THe latter (nullfont)  arose from a bad  ssub  as discussed in this 
thread.



Notice how (Xe)TeX  does not include the "s around names containing 
spaces.
It shouldn't be hard to patch that primitive to check for the need for 
"...".


When LaTeX first uses a font declared with an  ssub  declaration,
it tries to generate a new \font command, by constructing the name
from the  \fontname  of the font being substituted.
You can see now how that strategy fails when there is a space in the 
name.

Using  "\fontname"  will *not* work, as this would result in:
   "Trebuchet MS Bold at 10.95pt"
instead of
   "Trebuchet MS Bold" at 10.95pt


I think it will be easier to patch  \fontname  in the TeX application 
(i.e. XeTeX),
rather than try to parse the syntax of font names within (La)TeX macro 
code.

If this is done, then the existing LaTeX coding should  ssub  fine.



> If you try it this way, I believe you'll see a similar failure as soon 
> as you use Bold.


Hope this helps,

	Ross


>
> Jonathan
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------



More information about the XeTeX mailing list