[XeTeX] Polyglossia+KOMA: Wrong font for localized chapter names

Ulrike Fischer news2 at nililand.de
Wed Oct 8 11:59:59 CEST 2008


Am Tue, 07 Oct 2008 21:19:02 +0200 schrieb François Charette:

>> Btw: Another problem is that polyglossia resets the font to \normalfont
>> even when the script doesn't need a change:
>>
>> \documentclass[paper=a4,11pt,]{scrreprt}
>>
>> \usepackage{xltxtra}
>> \usepackage{polyglossia}
>> \setdefaultlanguage{english}
>> \setotherlanguage{german}
>> \begin{document}
>>
>> \sffamily\Huge abc
>> \selectlanguage{german}
>> abc
>>
>> \selectlanguage{english}
>> abc
>>
>> \end{document}
>>
>>   
> 
> I am aware of that too, but it is useful that you remind me! Resetting 
> to \normalfont is needed when one uses multiple scripts. I certainly 
> need to find a more elegant solution...

The problem is that currently there is no longer a useful setting of the
\fontencoding (or an extension of the encoding concept). The LaTeX
fontencodings are a bit restricted, but at least they did give you an
idea about the character set, the script used. 

Probably you shouldn't bound the font to the language but to a "script
family" and declare for each language to which "script family" it
belongs. Then font changes are only needed when the current script
family changes. 

If additionally there were a list of the scripts the current fontfamily
support, you could even test against this list and switch only if the
fontfamily doesn't support the new script. (could get a bit messy, if
you have a full font set-up with various families).

-- 
Ulrike Fischer 



More information about the XeTeX mailing list