[XeTeX] section styling breaks with sections, intercharclasses and fontspec

Will Robertson wspr81 at gmail.com
Sat Nov 14 03:36:56 CET 2009


On 2009-11-14 09:55:36 +1030, Peter Dyballa 
<Peter_Dyballa at Web.DE> said:

> Am 13.11.2009 um 23:03 schrieb Peter Dyballa:
> 
>> It's not possible to select the all variants inside a \cjkfont  
>> environment... (Bold-Italic is missing)
> 
> Because there is a bug in fontspec! This
> 
> 	\setmainfont[ItalicFont=HiraKakuPro-W3,ItalicFeatures={RawFeature= 
> +ital},BoldItalicFont=HiraKakuPro-W6,ItalicFeatures={RawFeature= 
> +ital},BoldFont=HiraMinPro-W6]{HiraMinPro-W3}
> 
> does not work, but these two do:
> 
> 	\setmainfont[ItalicFont={HiraKakuPro-W3:+ital},BoldItalicFont= 
> {HiraKakuPro-W6:+ital},BoldFont=HiraMinPro-W6]{HiraMinPro-W3}
> 	\setmainfont[ItalicFont=HiraKakuPro-W3,ItalicFeatures={RawFeature= 
> +ital},BoldItalicFont=HiraKakuPro-W6:+ital,BoldFont=HiraMinPro-W6] 
> {HiraMinPro-W3}

Can you post an example of the bug? This works fine for me:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont[
  ItalicFont=HiraKakuPro-W3,
  ItalicFeatures={Style=Italic},
  BoldItalicFont=HiraKakuPro-W6,
  BoldItalicFeatures={Style=Italic},
  BoldFont=HiraMinPro-W6
    ]{HiraMinPro-W3}
test\itshape test\bfseries test\upshape test
\end{document}

Putting the feature into the font name (such as "HiraKakuPro-W3:+ital") 
is bound to cause problems. I highly discourage such practice, even if 
it works some of the time at the moment.

(By the way. I know it's not easy from the fontspec manual to know that 
+ital corresponds to the "Style=Italic" font feature. To be improved 
when I do the big re-write (with proper LuaTeX support) after my 
thesis.)

Will




More information about the XeTeX mailing list