[XeTeX] fontspec: loading different shapes/scales of one font as different font instances?

Alan Munn amunn at gmx.com
Sun Aug 1 22:29:41 CEST 2010


On Aug 1, 2010, at 4:08 PM, BPJ wrote:

> 2010-08-01 20:11, Khaled Hosny skrev:
>> On Sun, Aug 01, 2010 at 07:53:58PM +0200, BPJ wrote:
>>> 2010-07-30 06:25, Will Robertson skrev:
>>>> \newfontfamily\foo[<options>]{<font name>}
>>>
>>> The ability to say
>>>
>>>     \newfontfamily\foo{Foo Bold} Bar baz
>>>
>>> or rather
>>>
>>>     \newfontfamily\foo[Style=Bold]{Foo} Bar baz
>>>
>>>     % Where "Bold" could be Bold/Italic/BoldItalic/SmallCaps/Normal
>>>
>>> and get the equivalent of
>>>
>>>     \newfontfamily\foo{Foo} \bfseries Bar baz
>>>
>>> Though I guess providing a Style option for the user
>>> and insert \bfseries etc. / define commands including
>>> them will actually be necessary anyway...
>>
>> If you want a specific style, then use \newfontface not  
>> \newfontfamily.
>>
>>
>
> D'oh, thats what i MEANT, but the fact remains:
> I still need to put in the \bfseries etc.
>

If the font has separate Bold, Italic etc., then no.

e.g. \newfontface{\bold}{TeX Gyre Heros Bold}

then \bold foo

will produce 'foo' in the bold version of the font.

Alan


-- 
Alan Munn
amunn at gmx.com






More information about the XeTeX mailing list