[NTG-context] using different font faces and sizes in same document

Mohamed Bana m.bana.lists at gmail.com
Fri Oct 10 02:01:04 CEST 2008


hi guys,

\definetypeface[adobe][rm][serif][minionpro][default]
%\definetypeface[adobe][rm][serif][agaramondpro][default]
\definetypeface[adobe][ss][sans][myriadpro][default]
%\definetypeface[adobe][ss][sans][cronospro][default]
\setupbodyfont[adobe,11pt]

Given the above, the document will be typeset only in minion pro, I'd 
like to know how to typeset parts of the document in different faces and 
sizes.  For instance, I'd like the first section in minionpro 11pt, then 
say, any other arbitrary section (I choose manually), to be typeset in 
minionpro 12pt.

So;

section1; minionpro 11pt as serif, minionpro as sans
section2; minionpro 12pt as serif, minionpro as sans
section3; garamondpro 11pt as serif, cronospro as sans
section4; garamondpro 12pt as serif, cronospro as sans

etc.

I hope that was clear, the typescripts are defined as;

% SANS

\starttypescript [sans] [cronospro]
   \definefontsynonym [CronosPro-Regular]    [name:cronosproregular]
   \definefontsynonym [CronosPro-Bold]       [name:cronosprobold]
   \definefontsynonym [CronosPro-Italic]     [name:cronosproitalic]
   \definefontsynonym [CronosPro-BoldItalic] [name:cronosproboldit]
\stoptypescript

\starttypescript [sans] [cronospro]
   \definefontsynonym [Sans]             [CronosPro-Regular] 
[features=historic]
   \definefontsynonym [SansBold]         [CronosPro-Bold] 
[features=historic]
   \definefontsynonym [SansItalic]       [CronosPro-Italic] 
[features=historic]
   \definefontsynonym [SansBoldItalic]   [CronosPro-BoldItalic] 
[features=historic]
   \definefontsynonym [SansCaps]			[Sans]					[features=smallcaps]
\stoptypescript

\starttypescript [sans] [myriadpro]
   \setups[font:fallback:sans]
   % \definefontsynonym [MyriadPro-Regular]    [name:MyriadPro-Regular] 
    [features=default]
   % \definefontsynonym [MyriadPro-Bold]       [name:MyriadPro-Bold] 
    [features=default]
   % \definefontsynonym [MyriadPro-Italic]     [name:MyriadPro-It] 
    [features=default]
   % \definefontsynonym [MyriadPro-BoldItalic] [name:MyriadPro-BoldIt] 
    [features=default]
   \definefontsynonym [MyriadPro-Regular]    [name:myriadproregular]
   \definefontsynonym [MyriadPro-Bold]       [name:myriadprobold]
   \definefontsynonym [MyriadPro-Italic]     [name:myriadproit]
   \definefontsynonym [MyriadPro-BoldItalic] [name:myriadproboldit]
\stoptypescript

\starttypescript [sans] [myriadpro]
   \definefontsynonym [Sans]             [MyriadPro-Regular] 
[features=historic]
   \definefontsynonym [SansBold]         [MyriadPro-Bold] 
[features=historic]
   \definefontsynonym [SansItalic]       [MyriadPro-Italic] 
[features=historic]
   \definefontsynonym [SansBoldItalic]   [MyriadPro-BoldItalic] 
[features=historic]
   \definefontsynonym [SansCaps]         [Sans] 
[features=latin-smallcaps]
\stoptypescript


% SERIFS

\starttypescript [serif] [agaramondpro]
   % \definefontsynonym [AGaramondPro-Regular] 
[name:acaslonproregular]     [features=default]
   % \definefontsynonym [AGaramondPro-Bold]       [name:acaslonprobold] 
        [features=default]
   % \definefontsynonym [AGaramondPro-Italic] 
[name:acaslonproitalic]      [features=default]
   % \definefontsynonym [AGaramondPro-BoldItalic] 
[name:acaslonprobolditalic]  [features=default]
   \definefontsynonym [AGaramondPro-Regular] 
[name:agaramondproregular]
   \definefontsynonym [AGaramondPro-Bold] 
[name:adobegaramondproboldbold]
   \definefontsynonym [AGaramondPro-Italic] 
[name:agaramondproitalic]
   \definefontsynonym [AGaramondPro-BoldItalic] 
[name:agaramondprobolditalic]
\stoptypescript

\starttypescript [serif] [agaramondpro]
   \definefontsynonym [Serif]           [AGaramondPro-Regular] 
[features=historic]
   \definefontsynonym [SerifBold]       [AGaramondPro-Bold] 
[features=historic]
   \definefontsynonym [SerifItalic]     [AGaramondPro-Italic] 
[features=historic]
   \definefontsynonym [SerifBoldItalic] [AGaramondPro-BoldItalic] 
[features=historic]
   \definefontsynonym [SerifCaps]       [Serif] 
[features=latin-smallcaps]
\stoptypescript


\starttypescript [serif] [minionpro]
   \definefontsynonym [MinionPro-Regular]    [name:minionproregular]
   \definefontsynonym [MinionPro-Bold]       [name:minionprobold]
   \definefontsynonym [MinionPro-Italic]     [name:minionproit]
   \definefontsynonym [MinionPro-BoldItalic] [name:minionproboldit]
\stoptypescript

\starttypescript [serif] [minionpro]
   \definefontsynonym [Serif]           [MinionPro-Regular] 
[features=default]
   \definefontsynonym [SerifBold]       [MinionPro-Bold] 
[features=default]
   \definefontsynonym [SerifItalic]     [MinionPro-Italic] 
[features=default]
   \definefontsynonym [SerifBoldItalic] [MinionPro-BoldItalic] 
[features=default]
   %\definefontsynonym [SerifSlanted]	   [SerifItalic] 
[features=default]
   \definefontsynonym [SerifCaps]       [Serif] 
[features=latin-smallcaps]
\stoptypescript



Mohamed



More information about the ntg-context mailing list