%D \module
%D   [       file=type-xtx,
%D        version=2004.11.15, % prereleased earlier
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=\XETEX's font treasures,
%D         author=Adam T. Lindsay,
%D           date=\currentdate,
%D      copyright={Adam T. Lindsay / PRAGMA}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Here are some fonts definitions that can get you started with
%D \XETEX (for more details see Adam's MyWay documents).
%D
%D Most typescripts in this file are mostly independent of the other
%D typescript files. Generally, you can speed things up a lot by
%D eliminating all but one of \CONTEXT's typescript files:
%D
%D \starttyping
%D \usetypescriptfiles[reset]     % HH: watch out, new feature, since
%D \usetypescriptfiles[type-siz]  % I disliked the low level redef.
%D \stoptyping
%D
%D The exceptions are the \quotation {legacy} fonts Times, Palatino,
%D Courier, and Helvetica, which also depend on \type {type-syn}.
%D
%D These following six typescripts call the basic four variants on any
%D given font, given the name of the \quotation {Regular} variant in the
%D name slot. These typescripts default to a Unicode encoding,
%D accepts sizes \quotation {default} and \quotation {dtp}, and are
%D activated with the identifiers \quotation {Xserif}, \quotation {Xsans},
%D and \quotation {Xmono}. They can have relative scaling within the
%D typeface. Any of the following work:
%D
%D \starttyping
%D \definetypeface[basic][rm][Xserif][Baskerville]
%D \definetypeface[basic][ss][Xsans] [Optima Regular][default][encoding=uc,rscale=.87]
%D \definetypeface[basic][tt][Xmono] [Courier]       [default]
%D \stoptyping
%D
%D Activate the typeface with:
%D
%D \starttyping
%D \setupbodyfont[basic]
%D \stoptyping

\starttypescript[Xserif][all][name]

\definefontsynonym[Dummy]          ['\typescripttwo:mapping=tex-text']   [encoding=uc]
\definefontsynonym[DummyItalic]    ['\typescripttwo/I:mapping=tex-text'] [encoding=uc]
\definefontsynonym[DummyBold]      ['\typescripttwo/B:mapping=tex-text'] [encoding=uc]
\definefontsynonym[DummyBoldItalic]['\typescripttwo/BI:mapping=tex-text'][encoding=uc]

\definefontsynonym[Serif]           [Dummy]
\definefontsynonym[SerifBold]       [DummyBold]
\definefontsynonym[SerifItalic]     [DummyItalic]
\definefontsynonym[SerifBoldItalic] [DummyBoldItalic]
\definefontsynonym[SerifSlanted]    [DummyItalic]
\definefontsynonym[SerifBoldSlanted][DummyBoldItalic]
\definefontsynonym[SerifCaps]       [Dummy]

\stoptypescript

\starttypescript[Xsans][all][name]

\definefontsynonym[DummySans]          ['\typescripttwo:mapping=tex-text']   [encoding=uc]
\definefontsynonym[DummySansItalic]    ['\typescripttwo/I:mapping=tex-text'] [encoding=uc]
\definefontsynonym[DummySansBold]      ['\typescripttwo/B:mapping=tex-text'] [encoding=uc]
\definefontsynonym[DummySansBoldItalic]['\typescripttwo/BI:mapping=tex-text'][encoding=uc]

\definefontsynonym[Sans]           [DummySans]
\definefontsynonym[SansBold]       [DummySansBold]
\definefontsynonym[SansItalic]     [DummySansItalic]
\definefontsynonym[SansBoldItalic] [DummySansBoldItalic]
\definefontsynonym[SansSlanted]    [DummySansItalic]
\definefontsynonym[SansBoldSlanted][DummySansBoldItalic]
\definefontsynonym[SansCaps]       [DummySans]

\stoptypescript

\starttypescript[Xmono][all][name]

\definefontsynonym[DummyMono]          ['\typescripttwo']   [encoding=uc]
\definefontsynonym[DummyMonoItalic]    ['\typescripttwo/I'] [encoding=uc]
\definefontsynonym[DummyMonoBold]      ['\typescripttwo/B'] [encoding=uc]
\definefontsynonym[DummyMonoBoldItalic]['\typescripttwo/BI'][encoding=uc]

\definefontsynonym[Mono]           [DummyMono]
\definefontsynonym[MonoBold]       [DummyMonoBold]
\definefontsynonym[MonoItalic]     [DummyMonoItalic]
\definefontsynonym[MonoBoldItalic] [DummyMonoBoldItalic]
\definefontsynonym[MonoSlanted]    [DummyMonoItalic]
\definefontsynonym[MonoBoldSlanted][DummyMonoBoldItalic]
\definefontsynonym[MonoCaps]       [DummyMono]

\stoptypescript

\starttypescript[Xserif][default][size]
  \definebodyfont
    [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
    [rm] [default]
\stoptypescript

\starttypescript[Xsans][default][size]
  \definebodyfont
    [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
    [ss] [default]
\stoptypescript

\starttypescript [Xmono][default][size]
  \definebodyfont
    [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
    [tt] [default]
\stoptypescript

\starttypescript[Xserif][dtp][size]
  \definebodyfont
    [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
    [rm] [default]
\stoptypescript

\starttypescript[Xsans][dtp][size]
  \definebodyfont
    [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
    [ss] [default]
\stoptypescript

\starttypescript[Xmono][dtp][size]
  \definebodyfont
    [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
    [tt] [default]
\stoptypescript

%D The following are \quotation {legacy} named fonts. Times, Palatino,
%D and Helvetica are familiar to most users of modern \TEX\
%D systems. These versions are accessed via the Unicode encoding
%D enabled by \XETEX. There is no attempt to match metrics with
%D the actual legacy fonts. These are simply familiar names.

%D These typescripts, unlike others in this file, depend on those in
%D \type{type-pre}.

\starttypescript[serif][times][uc]

\definefontsynonym[Times-Roman]     ['Times Roman:mapping=tex-text']       [encoding=uc]
\definefontsynonym[Times-Italic]    ['Times Italic:mapping=tex-text']      [encoding=uc]
\definefontsynonym[Times-Bold]      ['Times Bold:mapping=tex-text']        [encoding=uc]
\definefontsynonym[Times-BoldItalic]['Times Bold Italic:mapping=tex-text;'][encoding=uc]

\stoptypescript

%D Book Antiqua is Mac OS X's Palatino clone.

\starttypescript[serif][palatino][uc]

\definefontsynonym[Palatino]            ['Book Antiqua:mapping=tex-text']            [encoding=uc]
\definefontsynonym[Palatino-Italic]     ['Book Antiqua Italic:mapping=tex-text']     [encoding=uc]
\definefontsynonym[Palatino-Bold]       ['Book Antiqua Bold:mapping=tex-text']       [encoding=uc]
\definefontsynonym[Palatino-BoldItalic] ['Book Antiqua Bold Italic:mapping=tex-text'][encoding=uc]

\definefontsynonym[Palatino-Slanted]    [Palatino-Italic]
\definefontsynonym[Palatino-BoldSlanted][Palatino-BoldItalic]
\definefontsynonym[Palatino-Caps]       [Palatino]

\stoptypescript

%D The default Helvetica doesn't have an oblique variant, so we'll
%D go ahead and name Helvertica Neue here.

\starttypescript[sans][helvetica][uc]

\definefontsynonym[Helvetica]            ['Helvetica Neue:mapping=tex-text']            [encoding=uc]
\definefontsynonym[Helvetica-Oblique]    ['Helvetica Neue Italic:mapping=tex-text']     [encoding=uc]
\definefontsynonym[Helvetica-Bold]       ['Helvetica Neue Bold:mapping=tex-text']       [encoding=uc]
\definefontsynonym[Helvetica-BoldOblique]['Helvetica Neue Bold Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

%D Courier, as delivered on MacOSX 10.3, doesn't have an oblique
%D variant, either. Unfortunately, none of the default Mono fonts in
%D MacOSX have oblique|/|italic versions!

\starttypescript[mono][courier][uc]

\definefontsynonym[Courier]            ['Courier:mapping=tex-text']     [encoding=uc]
\definefontsynonym[Courier-Oblique]    [Courier]
\definefontsynonym[Courier-Bold]       ['Courier Bold:mapping=tex-text'][encoding=uc]
\definefontsynonym[Courier-BoldOblique][Courier-Bold]

\stoptypescript

%D The following fonts go beyond the usual four variants that
%D are accessible via the above wildcard typescripts, so they
%D get a more expanded treatment here:

\starttypescript[serif][hoefler][uc]

\definefontsynonym[Hoefler]      ['Hoefler Text:mapping=tex-text;
                   Ligatures=Diphthongs']  [encoding=uc]
\definefontsynonym[HoeflerItalic]['Hoefler Text Italic:mapping=tex-text;
                   Ligatures=Diphthongs']  [encoding=uc]
\definefontsynonym[HoeflerBlack] ['Hoefler Text Black:mapping=tex-text;
                   Ligatures=Diphthongs']  [encoding=uc]
\definefontsynonym[HoeflerBlackItalic]['Hoefler Text Black Italic:mapping=tex-text;
                   Ligatures=Diphthongs']  [encoding=uc]
\definefontsynonym[HoeflerSmCap] ['Hoefler Text:mapping=tex-text;
                   Ligatures=Diphthongs;
                   Letter Case=Small Caps'][encoding=uc]
\stoptypescript

\starttypescript[serif][hoefler][name]

\definefontsynonym[Serif]           [Hoefler]
\definefontsynonym[SerifBold]       [HoeflerBlack]
\definefontsynonym[SerifItalic]     [HoeflerItalic]
\definefontsynonym[SerifBoldItalic] [HoeflerBlackItalic]
\definefontsynonym[SerifSlanted]    [HoeflerItalic]
\definefontsynonym[SerifBoldSlanted][HoeflerBlackItalic]
\definefontsynonym[SerifCaps]       [HoeflerSmCap]

\stoptypescript

\starttypescript[sans][lucidagrande][uc]

\definefontsynonym[LucidaGrande]    ['Lucida Grande:mapping=tex-text']     [encoding=uc]
\definefontsynonym[LucidaGrandeBold]['Lucida Grande Bold:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[sans][lucidagrande][name]

\definefontsynonym[Sans]           [LucidaGrande]
\definefontsynonym[SansBold]       [LucidaGrandeBold]
\definefontsynonym[SansItalic]     [LucidaGrande]
\definefontsynonym[SansBoldItalic] [LucidaGrandeBold]
\definefontsynonym[SansSlanted]    [LucidaGrande]
\definefontsynonym[SansBoldSlanted][LucidaGrandeBold]
\definefontsynonym[SansCaps]       [LucidaGrande]

\stoptypescript

\starttypescript[sans][optima][uc]
\definefontsynonym[Optima]          ['Optima Regular:mapping=tex-text']    [encoding=uc]
\definefontsynonym[OptimaItalic]    ['Optima Italic:mapping=tex-text']     [encoding=uc]
\definefontsynonym[OptimaBold]      ['Optima Bold:mapping=tex-text']       [encoding=uc]
\definefontsynonym[OptimaBoldItalic]['Optima Bold Italic:mapping=tex-text'][encoding=uc]
\definefontsynonym[OptimaBlack]     ['Optima ExtraBlack:mapping=tex-text'] [encoding=uc]
\stoptypescript

\starttypescript[sans][optima][name]

\definefontsynonym[Sans]           [Optima]
\definefontsynonym[SansBold]       [OptimaBold]
\definefontsynonym[SansItalic]     [OptimaItalic]
\definefontsynonym[SansBoldItalic] [OptimaBoldItalic]
\definefontsynonym[SansSlanted]    [OptimaItalic]
\definefontsynonym[SansBoldSlanted][OptimaBoldItalic]
\definefontsynonym[SansCaps]       [Optima]

\stoptypescript

\starttypescript[sans][gillsans,gillsanslt][uc]

\definefontsynonym[GillSans]           ['Gill Sans:mapping=tex-text']             [encoding=uc]
\definefontsynonym[GillSansItalic]     ['Gill Sans Italic:mapping=tex-text']      [encoding=uc]
\definefontsynonym[GillSansBold]       ['Gill Sans Bold:mapping=tex-text']        [encoding=uc]
\definefontsynonym[GillSansBoldItalic] ['Gill Sans Bold Italic:mapping=tex-text'] [encoding=uc]
\definefontsynonym[GillSansLight]      ['Gill Sans Light:mapping=tex-text']       [encoding=uc]
\definefontsynonym[GillSansLightItalic]['Gill Sans Light Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[sans][gillsans][name]

\definefontsynonym[Sans]           [GillSans]
\definefontsynonym[SansBold]       [GillSansBold]
\definefontsynonym[SansItalic]     [GillSansItalic]
\definefontsynonym[SansBoldItalic] [GillSansBoldItalic]
\definefontsynonym[SansSlanted]    [GillSansItalic]
\definefontsynonym[SansBoldSlanted][GillSansBoldItalic]
\definefontsynonym[SansCaps]       [GillSans]

\stoptypescript

\starttypescript[sans][gillsanslt][name]

\definefontsynonym[Sans]           [GillSansLight]
\definefontsynonym[SansBold]       [GillSans]
\definefontsynonym[SansItalic]     [GillSansLightItalic]
\definefontsynonym[SansBoldItalic] [GillSansItalic]
\definefontsynonym[SansSlanted]    [GillSansLightItalic]
\definefontsynonym[SansBoldSlanted][GillSansItalic]
\definefontsynonym[SansCaps]       [GillSansLight]

\stoptypescript

\starttypescript[serif,handwriting][zapfino][uc]

\definefontsynonym[ZapfinoOne]  ['Zapfino:mapping=tex-text']                  [encoding=uc]
\definefontsynonym[ZapfinoTwo]  ['Zapfino:mapping=tex-text;
                                 Stylistic Variants=First variant glyph set'] [encoding=uc]
\definefontsynonym[ZapfinoThree]['Zapfino:mapping=tex-text;
                                 Stylistic Variants=Second variant glyph set'][encoding=uc]
\definefontsynonym[ZapfinoFour] ['Zapfino:mapping=tex-text;
                                 Stylistic Variants=Third variant glyph set'] [encoding=uc]
\stoptypescript

\starttypescript[handwriting][zapfino][name]

\definefontsynonym[Handwriting][ZapfinoOne]

\stoptypescript

\starttypescript[serif][zapfino][name]

\definefontsynonym[Serif]           [ZapfinoOne]
\definefontsynonym[SerifBold]       [ZapfinoThree]
\definefontsynonym[SerifItalic]     [ZapfinoTwo]
\definefontsynonym[SerifBoldItalic] [ZapfinoTwo]
\definefontsynonym[SerifSlanted]    [ZapfinoThree]
\definefontsynonym[SerifBoldSlanted][ZapfinoThree]
\definefontsynonym[SerifCaps]       [ZapfinoOne]

\stoptypescript

\starttypescript[serif,calligraphy][applechancery][uc]

\definefontsynonym[AppleChanceryOne]    ['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles']                [encoding=uc]
\definefontsynonym[AppleChanceryTwo]    ['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles;
                   Design Complexity=Elegant Design Level'][encoding=uc]
\definefontsynonym[AppleChanceryThree]  ['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles;
                   Design Complexity=Flourishes Set A']    [encoding=uc]
\definefontsynonym[AppleChanceryFour]   ['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles;
                   Design Complexity=Flourishes Set B']    [encoding=uc]
\definefontsynonym[AppleChanceryCaps]   ['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles;
                   Letter Case=Small Caps']                [encoding=uc]
\definefontsynonym[AppleChanceryCapsTwo]['Apple Chancery:mapping=tex-text;
                   Number Case=Old Styles;
                   Letter Case=Small Caps;
                   Design Complexity=Flourishes Set B']    [encoding=uc]
\stoptypescript

\starttypescript[calligraphy][applechancery][name]

\definefontsynonym[Calligraphy][AppleChanceryOne]

\stoptypescript

\starttypescript[serif][applechancery][name]

\definefontsynonym[Serif]           [AppleChanceryOne]
\definefontsynonym[SerifBold]       [AppleChanceryThree]
\definefontsynonym[SerifItalic]     [AppleChanceryTwo]
\definefontsynonym[SerifBoldItalic] [AppleChanceryFour]
\definefontsynonym[SerifSlanted]    [AppleChanceryThree]
\definefontsynonym[SerifBoldSlanted][AppleChanceryFour]
\definefontsynonym[SerifCaps]       [AppleChanceryCaps]

\stoptypescript

% MS Office 2004 for Mac has impressive Unicode coverage in
% many of its fonts.

\starttypescript[serif][timesnewroman][uc]

\definefontsynonym[MSTimes]          ['Times New Roman:mapping=tex-text']            [encoding=uc]
\definefontsynonym[MSTimesItalic]    ['Times New Roman Italic:mapping=tex-text']     [encoding=uc]
\definefontsynonym[MSTimesBold]      ['Times New Roman Bold:mapping=tex-text']       [encoding=uc]
\definefontsynonym[MSTimesBoldItalic]['Times New Roman Bold Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[serif][timesnewroman][name]

\definefontsynonym[Serif]           [MSTimes]
\definefontsynonym[SerifBold]       [MSTimesBold]
\definefontsynonym[SerifItalic]     [MSTimesItalic]
\definefontsynonym[SerifBoldItalic] [MSTimesBoldItalic]
\definefontsynonym[SerifSlanted]    [MSTimesItalic]
\definefontsynonym[SerifBoldSlanted][MSTimesBoldItalic]
\definefontsynonym[SerifCaps]       [MSTimes]

\stoptypescript

\starttypescript[sans][arial][uc]

\definefontsynonym[Arial]          ['Arial:mapping=tex-text']            [encoding=uc]
\definefontsynonym[ArialItalic]    ['Arial Italic:mapping=tex-text']     [encoding=uc]
\definefontsynonym[ArialBold]      ['Arial Bold:mapping=tex-text']       [encoding=uc]
\definefontsynonym[ArialBoldItalic]['Arial Bold Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[sans][arial][name]

\definefontsynonym[Sans]           [Arial]
\definefontsynonym[SansBold]       [ArialBold]
\definefontsynonym[SansItalic]     [ArialItalic]
\definefontsynonym[SansBoldItalic] [ArialBoldItalic]
\definefontsynonym[SansSlanted]    [ArialItalic]
\definefontsynonym[SansBoldSlanted][ArialBoldItalic]
\definefontsynonym[SansCaps]       [Arial]

\stoptypescript

%D MS Office comes with an installation of the Lucida family in
%D TrueType form. It's nice, except\dots\ no math, no slanted, no caps
%D and some other auxiliary fonts.

\starttypescript [serif] [lucida] [uc]

  \definefontsynonym [LucidaBright]              ['Lucida Bright:mapping=tex-text']         [encoding=uc]
  \definefontsynonym [LucidaBright-Demi]         ['Lucida Bright Demibold:mapping=tex-text'][encoding=uc]
  \definefontsynonym [LucidaBright-DemiItalic]   ['Lucida Bright Demibold:mapping=tex-text'][encoding=uc]
  \definefontsynonym [LucidaBright-Italic]       ['Lucida Bright:mapping=tex-text']         [encoding=uc]

  \definefontsynonym [LucidaBrightSmallcaps]     [LucidaBright]
  \definefontsynonym [LucidaBrightSmallcaps-Demi][LucidaBright-Demi]
  \definefontsynonym [LucidaBright-Oblique]      [LucidaBright-Italic]

\stoptypescript

\starttypescript [sans] [lucida] [uc]
  \definefontsynonym [LucidaSans]           ['Lucida Sans Regular:mapping=tex-text']        [encoding=uc]
  \definefontsynonym [LucidaSans-Demi]      ['Lucida Sans Demibold Roman:mapping=tex-text'] [encoding=uc]
  \definefontsynonym [LucidaSans-DemiItalic]['Lucida Sans Demibold Italic:mapping=tex-text'][encoding=uc]
  \definefontsynonym [LucidaSans-Italic]    ['Lucida Sans Italic:mapping=tex-text']         [encoding=uc]

  \definefontsynonym [LucidaSans-Bold]      [LucidaSans-Demi]
  \definefontsynonym [LucidaSans-BoldItalic][LucidaSans-DemiItalic]

\stoptypescript

\starttypescript [mono] [lucida] [uc]

  \definefontsynonym [LucidaSans-Typewriter]           ['Lucida Sans Typewriter Regular']     [encoding=uc]
  \definefontsynonym [LucidaSans-TypewriterBold]       ['Lucida Sans Typewriter Bold']        [encoding=uc]
  \definefontsynonym [LucidaSans-TypewriterBoldOblique]['Lucida Sans Typewriter Bold Oblique'][encoding=uc]
  \definefontsynonym [LucidaSans-TypewriterOblique]    ['Lucida Sans Typewriter Oblique']     [encoding=uc]

\stoptypescript

\starttypescript [calligraphy] [lucida] [uc]

  \definefontsynonym[LucidaCalligraphy-Italic]['Lucida Calligraphy Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

% No casual that I know of

\starttypescript[handwriting][lucida][uc]

  \definefontsynonym[LucidaHandwriting-Italic]['Lucida Handwriting Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[fax][lucida][uc]

  \definefontsynonym[LucidaFax]           ['Lucida Fax Regular:mapping=tex-text']        [encoding=uc]
  \definefontsynonym[LucidaFax-Demi]      ['Lucida Fax Demibold:mapping=tex-text']       [encoding=uc]
  \definefontsynonym[LucidaFax-DemiItalic]['Lucida Fax Demibold Italic:mapping=tex-text'][encoding=uc]
  \definefontsynonym[LucidaFax-Italic]    ['Lucida Fax Italic:mapping=tex-text']         [encoding=uc]

\stoptypescript

%D Gentium is from SIL, the fine makers of \XETEX, and it's not only
%D very complete with Roman and Italic Unicode support, but very
%D attractive.

\starttypescript[serif][gentium][uc]

\definefontsynonym[Gentium]      ['Gentium:mapping=tex-text']       [encoding=uc]
\definefontsynonym[GentiumItalic]['Gentium Italic:mapping=tex-text'][encoding=uc]

\stoptypescript

\starttypescript[serif][gentium][name]

\definefontsynonym[Serif]           [Gentium]
\definefontsynonym[SerifBold]       [Gentium]
\definefontsynonym[SerifItalic]     [GentiumItalic]
\definefontsynonym[SerifBoldItalic] [GentiumItalic]
\definefontsynonym[SerifSlanted]    [GentiumItalic]
\definefontsynonym[SerifBoldSlanted][GentiumItalic]
\definefontsynonym[SerifCaps]       [Gentium]

\stoptypescript

\endinput
