Hello, List! Follownig your recommendations while playing with fonts, I've started to write one. It's actually very basic but I already have a few questions. Here is the basic, working stuff I did until now: \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? 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)? 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? I'm aware that's a huge load of questions. Nothing is urgent but every replies are welcome, and that will allow me to help others. More questions will certainly occurs later (certainly related to sizes) but at first I'll try to better understand all what is above. Thanks a lot for everything! A+ -AJ
Antoine Junod wrote:
Hello, List!
Follownig your recommendations while playing with fonts, I've started to write one. It's actually very basic but I already have a few questions. Here is the basic, working stuff I did until now:
\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?
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)?
in principle you can use any name you want, however in practice typescripts are called in sequence, so at some point SerifBold is used to define a font and in order to resolve someplace else then also SerifBold has to be used the serif, mono, etc are all related to predefined prescripts (just grep for them) and defining a typeface (see type-ini.tex) just calls up certain typescripts; consider the arguments to starttypescript as a filer: \starttypescript[a][b][c] permits if not(a) and inset(a) and (not(b) or inset(b)) or (not(a) or inset(c) then ... instead of medium .. just define another combination ... see definitions of iwona cum suis and fonts in type-buy/ghz
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
indeed
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?
no, they're independent
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?
rm: internal tex collections (rm, ss, tt, mm), also related to sizes serif: just a filter (refers to generic serif typescripts) default: also a filter, this time for size
I'm aware that's a huge load of questions. Nothing is urgent but every replies are welcome, and that will allow me to help others. More questions will certainly occurs later (certainly related to sizes) but at first I'll try to better understand all what is above.
so, most of typescripts deal with filtering and sequences of name resolving ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Antonie, I am not a font expert, but this is what I understand. On Sat, 19 Apr 2008, Antoine Junod wrote:
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?
Yes
Second question: the first argument of the \definetypescript is the name that will be used with the \setupbodyfont call. Is it right?
Yes
Isn't there any conflict with the GaramondPP of the \starttypescript and the one of the \definetypeface?
No. Context is extremely clever in this respect.
Or do they need to be the same?
No. Some of the old typescripts did use different names.
Other question: how are related the three following parameters (rm, serif and garamondpp)?
rm is the font that gets activated by default with \setupbodyfont. You can get the ss font by saying \setupbodyfont[GaramondPP,ss]. I do not know why serif and sans (the third argument of \definetypescript are needed, it seems to be reduntant.
And finally, what's the point of the 'default' argument?
You can create variants of fonts. For example, for math fonts, one has to occasionally use ams instead of default, this loads some of the definitions from \definemathcollection[ams]. I don't know what is loaded for non-math fonts. Aditya
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)
participants (4)
-
Aditya Mahajan
-
Antoine Junod
-
Hans Hagen
-
Henning Hraban Ramm