[XeTeX] \newfontface and small caps

Martijn Storck martijn at lico.nl
Fri Jan 22 07:11:41 CET 2010


Thanks a lot Gareth and Michiel, somehow I've overlooked this, it's working now.

Kind regards,

Martijn Storck

On 22 Jan 2010, at 00:26, Gareth Hughes wrote:

> Martijn Storck wrote:
>> Hi,
> 
> Hi!
> 
>> I?m relatively new to XeTeX and I?m a bit puzzled by the usage of fontspec
>> and \newfontface. Take this example:
>> 
>> \documentclass[11pt,a4paper]{article}
>> 
>> \usepackage{fontspec}
>> \usepackage{xunicode}
>> \usepackage{xltxtra}
>> 
>> \begin{document}
>> 
>> {\fontspec{Adobe Caslon Pro}\scshape Adobe Caslon Pro}
>> 
>> \newfontface\myfont{Adobe Caslon Pro}
>> 
>> {\myfont\scshape Adobe Caslon Pro}
>> 
>> \end{document}
>> 
>> The first line has nice text with small caps from the font. 
> 
> That means that Adobe Caslon Pro has small caps and keeps them in an
> obvious place where fontspec finds them
> 
>> However, the second
>> line does not have small caps. 
> 
> The \newfontface command loads just one font rather than the whole
> family, and, in this case, just the regular face. So, try using:
> 
> \newfontfamily\myfont{Adobe Caslon Pro}
> 
> This will create the \myfont command as a font-changing command.
> However, if you want to use this as the main font in a document, you can
> make it the default font by using:
> 
> \setmainfont{Adobe Caslon Pro}
> 
> 
>> I cannot find anything that would explain this
>> behavior. I also tried setting SmallCapsFeatures={Letters=SmallCaps} in the
>> newfontface options, but that didn?t help either.
> 
> SmallCapsFeatures doesn't set the small caps but defines features for
> the small caps, like making them all blue.
> 
> Gareth.
> 
> 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex




More information about the XeTeX mailing list