[texhax] Weirdness with bold, italic and colored text and the fontspec package

Uwe Lueck uwe.lueck at web.de
Fri Nov 19 10:41:33 CET 2010


"Peter Davis" <pfd at pfdstudio.com>, 18.11.2010 22:41:38
> On Thu, Nov 18, 2010 at 4:35 PM, Philip Taylor (Webmaster, Ret'd) <[P.Taylor at rhul.ac.uk]> wrote:
>> Seems fine with additional braces :
>> {\textit {italic}}{\fontspec[Color=color13]{DejaVu Sans}\textit {red italic}} {\fontspec[Color=color13]{DejaVu Sans}\bfseries{\textit {red bold italic}}}{\bfseries{\textit {bold italic}}}
> 
> Aha!  My bad.  I should have used \itshape.  I guess \textit takes one argument ... either a character or group.

"The other way round" -- \textit takes an argument, \bfseries does not. To apply \bfseries locally: 

    {\bfseries ...}

But for having boldface words within a "medium" line, \mathbf{...} -- takes an argument! -- is said to be better, it inserts an "italic correction" (an analogue to the italic correction) to improve horizontal spacing.

Cheers, 

    Uwe.


More information about the texhax mailing list