Hi all! I'm new into context an I'm trying to write a user-manual for my company. For some strange reasons I have to use a font names Adobe Avenir. I managed to install the TTF-Files with texfont but now I'm lost in the creation of a typescript. Maybe there is someone who can give me a little help! My map file looks like this (texnansi-adobe-avenir.map): texnansi-AVENI17 Avenir-Heavy 4 < AVENI17.ttf texnansi.enc texnansi-AVENI18 Avenir-HeavyOblique 4 < AVENI18.ttf texnansi.enc texnansi-AVENI23 Avenir-Oblique 4 < AVENI23.ttf texnansi.enc texnansi-AVENI24 Avenir-Roman 4 < AVENI24.ttf texnansi.enc And my typescript looks like this (type-adobe-avenir.tex): \starttypescript [map] [avenir] [textansi] \loadmapfile [texnansi-adobe-avenir.map] \stoptypescript \starttypescript [sans] [avenir] [texnansi] \definefontsynonym [Avenir-Heavy] [texnansi-AVENI17] [encoding=texnansi] \definefontsynonym [Avenir-HeavyOblique] [texnansi-AVENI18] [encoding=texnansi] \definefontsynonym [Avenir-Oblique] [texnansi-AVENI23] [encoding=texnansi] \definefontsynonym [Avenir-Roman] [texnansi-AVENI24] [encoding=texnansi] \stoptypescript \starttypescript [sans] [avenir] [name] \definefontsynonym [Sans] [Avenir-Roman] \definefontsynonym [SansItalic] [Avenir-Oblique] \definefontsynonym [SansBold] [Avenir-Heavy] \definefontsynonym [SansBoldItalic] [Avenir-HeavyOblique] \stoptypescript \starttypescript [Avenir] \definetypeface [Avenir] [rm] [sans] [avenir] [default] \stoptypescript When I try to use my typescript in my environment file like this: \usetypescriptfile[type-adobe-avenir] \usetypescript[Avenir] \setupbodyfont[Avenir,10pt] ... simply nothing happens ... I get the same font as before. Arrgh! In the logging messages of texexec I see a message that my typescript-file is loaded! Hopefully someone can give my a hand, Markus -- -------------------"it's like this"------ even samurai have teddy bears and even teddy bears get drunk
Hi Markus, you're on the right track; just two or three small corrections, and you should be in business: On Mar 25, 2009, at 8:21 PM, Markus Hubig wrote:
My map file looks like this (texnansi-adobe-avenir.map):
texnansi-AVENI17 Avenir-Heavy 4 < AVENI17.ttf texnansi.enc texnansi-AVENI18 Avenir-HeavyOblique 4 < AVENI18.ttf texnansi.enc texnansi-AVENI23 Avenir-Oblique 4 < AVENI23.ttf texnansi.enc texnansi-AVENI24 Avenir-Roman 4 < AVENI24.ttf texnansi.enc
I'm not sure if you can have a space after the <
\starttypescript [map] [avenir] [textansi] \loadmapfile [texnansi-adobe-avenir.map] \stoptypescript
\starttypescript [sans] [avenir] [texnansi] \definefontsynonym [Avenir-Heavy] [texnansi-AVENI17] [encoding=texnansi] \definefontsynonym [Avenir-HeavyOblique] [texnansi-AVENI18] [encoding=texnansi] \definefontsynonym [Avenir-Oblique] [texnansi-AVENI23] [encoding=texnansi] \definefontsynonym [Avenir-Roman] [texnansi-AVENI24] [encoding=texnansi] \stoptypescript
\starttypescript [sans] [avenir] [name] \definefontsynonym [Sans] [Avenir-Roman] \definefontsynonym [SansItalic] [Avenir-Oblique] \definefontsynonym [SansBold] [Avenir-Heavy] \definefontsynonym [SansBoldItalic] [Avenir-HeavyOblique] \stoptypescript
\starttypescript [Avenir] \definetypeface [Avenir] [rm] [sans] [avenir] [default] \stoptypescript
Two things here: you're defining a sans font, so change [rm] into [ss]. And for mkii (old-fashioned pdftex), I think you'll need to add the encoding to the typescript: \starttypescript [Avenir] [texnansi] \definetypeface [Avenir] [ss] [sans] [avenir] [default] [encoding=texnansi] \stoptypescript
When I try to use my typescript in my environment file like this:
\usetypescriptfile[type-adobe-avenir] \usetypescript[Avenir] \setupbodyfont[Avenir,10pt]
Yes, you have defined a sans font, but you're not setting sans as your bodyfont. ConTeXt defaults to serif (i.e. rm), and since your typescript doesn't define a rm font, it defaults to latin modern. So simply write: \setupbodyfont[Avenir,ss,10pt] HTH Thomas
Thank you very much! It finally works! Markus -- --------"it's like this"------ even samurai have teddy bears and even teddy bears get drunk
participants (2)
-
Markus Hubig
-
Thomas A. Schmitz