[XeTeX] fontspec and kpfonts

Ulrike Fischer news2 at nililand.de
Fri Jun 6 10:37:29 CEST 2008


Am Fri, 6 Jun 2008 17:20:54 +0930 schrieb Will Robertson:

> Hi Ulrike,
> 
> Thanks for clearing up these points. To be honest, I basically never  
> mix fontspec-loaded fonts with other fonts of other encodings so I'm  
> glad you're around to give good advice. If there's any changes I can  
> make to fontspec to make things like this easier please let me know.

I don't think that there is much you can do. Switching between encodings
and families is the standard way to do such things and fontspec can not
offer an interface to all font packages around.

But perhaps you could add some help to switch back to the fonts loaded
through fontspec. \fontencoding{EU1} is easy, but getting the family
names used by fontspec to issue the correct \fontfamily-command can be a
bit difficult. 

E.g. to declare an additional Shape for the Latin Modern fonts one has
to use

\DeclareFontShape {EU1}{LatinModernRoman(0)}{m}{sl}
  {<->"Latin\space Modern\space Roman\space Slanted"}{}

It would be fine, if there were a command to get the
"LatinModernRoman(0)".

>> \setmainfont{[jkpmn8a.pfb]}
> 
> Careful with this...it will generally work if you're not trying to use  
> any fontspec font-options (not that you would for a .pfb font anyway)  
> but as soon as you try something like
>    \fontspec[Numbers=OldStyle]{[xyz.otf]}
> you'll run into problems.
> 
> I'm thinking of adding some parsing code to fontspec so that the above  
> is equivalent to
>    \fontspec[ExternalLocation,Numbers=OldStyle]{xyz.otf}
> (or, even easier, recognising the .otf suffix in the font name and  
> implicitly applying ExternalLocation) but for now it's best to stick  
> to the explicit syntax shown here.

Sorry I didn't look in the documentation how you should load fonts
through the external location syntax, I couldn't load the font through a
font name and simply tried if it works with the filename and the
[]-braces. 




-- 
Ulrike Fischer 



More information about the XeTeX mailing list