![](https://secure.gravatar.com/avatar/d0e94fb08d4620cfbd2f8f59a7868637.jpg?s=120&d=mm&r=g)
On Nov 17, 2008, at 9:39 PM, Bart C. Wise wrote:
I am having difficulties writing a typescript for the Caslon font that's on my system.
The following works:
\definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy] \definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic] \definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman]
\starttext Testing \switchtobodyfont[Caslon-Regular] Testing \switchtobodyfont[Caslon-Bold] Testing \switchtobodyfont[Caslon-Italic] Testing \stoptext
However, I tried to write a simple typescript for the same font. I came up with the following:
\starttypescript[serif][caslon][uc] \definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc] \definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc] \definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc] \stoptypescript
\starttypescript[serif][caslon][name] \definefontsynonym [Serif] [CaslonRegular] \definefontsynonym [SerifItalic] [CaslonItalic] \definefontsynonym [SerifBold] [CaslonBold] \stoptypescript
\starttypescript[caslon][uc] \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] \stoptypescript
\usetypescript[caslon][uc] \setupbodyfont[caslon, 12pt]
\starttext Testing {\bf Testing} {\it Testing} \stoptext
It fails to compile on the \setupbodyfont line.
I know I'm doing something wrong, but every variation I've tried ends up with a compile error, or the caslon font is never loaded and it reverts back to the default font.
Fonts in XeTeX are still a mystery to me, but from what I've learned in the last months, it seems that the syntax for luatex typescripts can and should also be used for XeTeX. This works on my system (latest beta): file: type-caslon.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \starttypescript [serif] [caslon] \definefontsynonym [Caslon-Roman] [file:ACaslonPro- Regular] [features=default] \definefontsynonym [Caslon-Bold] [file:ACaslonPro-Bold] [features=default] \definefontsynonym [Caslon-Italic] [file:ACaslonPro- Italic] [features=default] \definefontsynonym [Caslon-Bold-Italic] [file:ACaslonPro- BoldItalic] [features=default] \definefontsynonym [Caslon-SmallCaps] [file:ACaslonPro- Regular] [features=smallcaps] \stoptypescript \starttypescript [serif] [caslon] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Caslon-Roman] [features=default] \definefontsynonym [SerifItalic] [Caslon-Italic] [features=default] \definefontsynonym [SerifBold] [Caslon-Bold] [features=default] \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic] [features=default] \definefontsynonym [SerifCaps] [Caslon-SmallCaps] [features=smallcaps] \stoptypescript \starttypescript [Caslon] \definetypeface [Caslon] [rm] [serif] [caslon] [default] \stoptypescript %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% and then: \usetypescriptfile[type-caslon] \usetypescript[Caslon] \setupbodyfont[Caslon,12pt] \starttext Hello World! \stoptext HTH Thomas