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

Uwe Lueck uwe.lueck at web.de
Fri Nov 19 15:14:10 CET 2010


I wrote wrong:
> But for having boldface words within a "medium" line, 
> \mathbf{...} -- takes an argument! -- is said to be better, [...]
must read:

    \textbf{...} ...

sorry, I was so much concerned with math fonts in recent weeks. 

Cheers, 

    Uwe.


-----Ursprüngliche Nachricht-----
Von: "Uwe Lueck" <uwe.lueck at web.de>
Gesendet: 19.11.2010 10:41:33
An: "Philip Taylor (Webmaster, Ret'd)" <P.Taylor at rhul.ac.uk>, "Peter Davis" <pfd at pfdstudio.com>
Betreff: Re: [texhax] Weirdness with bold, italic and colored text and the fontspec package

"Peter Davis" , 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