Am 2008-04-19 um 13:06 schrieb Antoine Junod: > \starttypescript[serif][garamondpp] > \definefontsynonym [GaramondPP-Roman] [GaramondPremrPro] > \definefontsynonym [GaramondPP-Bold] [GaramondPremrPro-Bd] > \definefontsynonym [GaramondPP-Italic] [GaramondPremrPro-It] > \definefontsynonym [GaramondPP-Bold-Italic][GaramondPremrPro-BdIt] > \stoptypescript > > If I've understood what I did in that part, I've simply defined alias > for the font file names. What I do not catch is the \starttypescript > line. Is it right to say that the second parameter is the name of the > 'class' to which the definitions that follow are linked? Second > question on that part: Is the first argument (serif) a reserved > keyword or not? What's the point of that argument? Third and last > question for that part, in the case, as in here, where the font file > names are easy to remember, is it still needed to create that synonyms > for any reason? Only answering your third question: You mentioned later other faces of that font, e.g. Medium. You can (and should) map *all* faces in that first typescript if you intend to use them later. (With big families that may be around 50 faces.) Beware, if you write typescripts for XeTeX/luaTeX, you must define if your "font name" is the "screen name" (aka PostScript name) or the file name: [file:GaramondPremrPro] vs. [name:Garamond Premier Pro] If you write typescripts for pdfTeX (mkII), you should give a third argument that defines the encodings that the font supports, like: \starttypescript [serif] [urw-antiqua] [ec,texnansi,qx,t5] \definefontsynonym [URWAntiquaT-Regu] [\typescriptthree-u003003t] [encoding=\typescriptthree] The file name is here in fact the name of the tfm file! (I hope I don't tell you something deprecated here...) > Then, I wrote the [name] part of the typescript, as the following: > > \starttypescript[serif][garamondpp][name] > \definefontsynonym [Serif] [GaramondPP-Roman] > \definefontsynonym [SerifBold] [GaramondPP-Bold] > \definefontsynonym [SerifItalic] [GaramondPP-Italic] > \definefontsynonym [SerifSlanted] [SerifItalic] > \definefontsynonym [SerifBoldItalic] [GaramondPP-Bold- > Italic] > \stoptypescript > > If I caught the point of the last argument, it is here to indicate > that what follows links font files to the pre-defined font concept > that are Serif, SerifBold, SerifItalic and so on and so on). Here are > my questions: I've seen in the sources that there were 7 predefined > types in the Serif family: Serif, SerifBold, SerifItalic, > SerifSlanted, SerifBoldItalic and SerifBoldSlanted. What if I have a > font that not only have a Bold face but also a Medium face and a > SemiBold face? Second question: my font do not have a slanted face and > I do not want to have pieces of computer modern in the text because, > by mistake, I typed an \sl switch or something related. To avoid that, > you can see I declared SerifSlanted to be a synonym for > SerifItalic. Is it the way to do that or is it better to directly > define SerifSlanted as a synonym to GaramondPP-Italic (in my case)? There are some more keywords: SerifOldstyle (numbers only), SerifCaps, SerifBoldCaps You can also define your own variants like this: \definefontvariant [Serif] [shadow] [Shadow] % use with \Var[shadow] If you defined a big family in your first typescript you can use this setup for different four-member sub-families: % serif urw-antiqua (normal) \starttypescript [serif] [urw-antiqua] [name] %\usetypescript [serif] [urw-antiqua] [\defaultencoding] \definefontsynonym [Serif] [URWAntiquaT-Regu] \definefontsynonym [SerifSlanted] [URWAntiquaT-ReguObli] \definefontsynonym [SerifItalic] [URWAntiquaT-ReguObli] \definefontsynonym [SerifBold] [URWAntiquaT-Bold] \definefontsynonym [SerifBoldSlanted] [URWAntiquaT-BoldObli] \definefontsynonym [SerifBoldItalic] [URWAntiquaT-BoldObli] \stoptypescript % serif urw-antiqua (normal bold) \starttypescript [serif] [urw-antiqua-bold] [name] \usetypescript [serif] [urw-antiqua] [\defaultencoding] % different name, so you must load it explicitely! % or: % \setups [font:fallback:serif] \definefontsynonym [Serif] [URWAntiquaT-Medi] \definefontsynonym [SerifSlanted] [URWAntiquaT-MediObli] \definefontsynonym [SerifItalic] [URWAntiquaT-MediObli] \definefontsynonym [SerifBold] [URWAntiquaT-ExtrBold] \definefontsynonym [SerifBoldSlanted] [URWAntiquaT-ExtrBoldObli] \definefontsynonym [SerifBoldItalic] [URWAntiquaT-ExtrBoldObli] \stoptypescript I.e. such a "name" typescript defines the related faces for the simple style commands (\tf, \bf, \it, \sl etc.) I mostly map slanted and italic to the same italic face. But it's a matter of taste. You can also do it this way: \definefontsynonym [SerifSlanted] [SerifItalic] \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] For families with "unusual" faces like plain/shadow/outline or regular/sketchy/mixedcase I "abuse" these predefined styles to access all available faces. Find a sample attached. > And for the last part of my little type script: > > \starttypescript [GaramondPP] > \definetypeface [GaramondPP][rm][serif][garamondpp][default] > \stoptypescript > > That part is for me a beautiful piece of ununderstanding :) First > question: the first argument is the name we will use with the > \usetypescript command. Right? Second question: the first argument of > the \definetypescript is the name that will be used with the > \setupbodyfont call. Is it right? Isn't there any conflict with the > GaramondPP of the \starttypescript and the one of the \definetypeface? > Or do they need to be the same? Other question: how are related the > three following parameters (rm, serif and garamondpp)? And finally, > what's the point of the 'default' argument? In this last step you define your "font clan" to map \rm, \ss and \tt (and math) together. Even if I provide a sample in my typescripts, I nearly always define a new "clan" in my environment file. E.g. \usetypescriptfile [type-enc] \usetypescriptfile [type-klein-delitsch] \loadmapfile [\defaultencoding-klein-delitsch.map] \starttypescript[fiee][liederheft] \usetypescript [serif] [schoolbook] [\defaultencoding] \usetypescript [handwriting] [delitsch] [\defaultencoding] \usetypescript [handwriting] [delitsch] [name] \definetypeface [liederheft] [rm] [serif] [schoolbook] [default] [encoding=\defaultencoding] \definetypeface [liederheft] [ss] [sans] [default][default] [encoding=ec] \definetypeface [liederheft] [tt] [mono] [default][default] [encoding=ec] \definetypeface [liederheft] [hw] [handwriting] [delitsch][default] [encoding=\defaultencoding] \stoptypescript Perhaps not a good example, because I don't need sans, mono and math here. But it shows how to define the additional handwriting (hw) or calligraphy (cg) fonts. The third argument of \definetypeface takes different setups, often a relative scaling factor to make the different fonts appear at the same size like here: \definetypeface [postscript] [tt] [mono] [courier] [default] [rscale=1.1] Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)