Hi Paul. You almost got it. You slightly misunderstood the use of the definetypface line... Paul Hoffman wrote:
But that's a hack. So I create a file "type-bembo.tex":
\starttypescript[bembo][uc]
not quite. try: \starttypescript[serif][bembo][uc]
\definetypeface [bembo] [rm] [serif] [Bembo Std] [default] [encoding=uc] \definefontsynonym[BemboRegular]["Bembo Std:mapping=tex-text"] [encoding=uc] \definefontsynonym[BemboItalic] ["Bembo Std-Italic:mapping=tex-text"][encoding=uc] \definefontsynonym[BemboBold] ["Bembo Std-Bold:mapping=tex-text"] [encoding=uc] \definefontsynonym[BemboCaps] ["Bembo Std:mapping=tex-text;+smcp"] [encoding=uc] \stoptypescript
Okay, you just need to take the "definetypeface" line out of the above definition. We'll rewrite it and re-place it below.
\starttypescript[serif][bembo][name] \definefontsynonym[Serif] [BemboRegular] \definefontsynonym[SerifItalic] [BemboItalic] \definefontsynonym[SerifBold] [BemboBold] \definefontsynonym[SerifCaps] [BemboCaps] \definefontsynonym[SerifSlanted] [BemboItalic] \definefontsynonym[SerifBoldItalic] [BemboBold] \definefontsynonym[SerifBoldSlanted][BemboBold] \stoptypescript
These lines look pretty good (although I suspect you could be defining Bold Italic as well). You want a third typescript that creates the typeface definition. It's this thing that calls the other two: \starttypescript[bembo][uc] \definetypeface [bembo] [rm] [serif] [bembo] [default] [encoding=uc] \stoptypescript
And a test file in the same directory as the typescript file:
\usetypescriptfile[type-bembo] \usetypescript[bembo][uc] \setupbodyfont[bembo,11pt] \starttext Bembo {\bf Bembo} {\it Bembo} {\sc Bembo} Bembo. \stoptext
Now I get small caps all right, but everything's in Computer Modern. :-( What am I doing wrong?
You're just missing some of the magic in the definetypeface line. To show the arbitrariness of some of the names, you can change the last definition and how you call it: \starttypescript[OpenTypeBembo] \definetypeface [BooBoo] [rm] [serif] [bembo] [default] [encoding=uc] \stoptypescript \usetypescriptfile[type-bembo] \usetypescript[OpenTypeBembo] \setupbodyfont[BooBoo,11pt] And when you call the "BooBoo" typeface, it knows that definition and calls the following definitions when using the \rm family: \starttypescript[serif][bembo] [uc] \starttypescript[serif][bembo] [name] \starttypescript[serif][default][size] (and some other, special definitions that 98% of the time you don't need to worry about.) Does that work? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-