Typescript for Helvetica - what's wrong?
Hi all! I tried to write a typescript to use the Helvetica PDF base 14 fonts. Yet, the example below uses the (default) Computer Modern Roman fonts. I wrote the typescript along the lines of the excellent help document at (http://home.salamander.com/~wmcclain/context-help.html). Thanks for your attention, --Stefan \enableregime[il1] \setupoutput[pdftex] \setuppapersize[A4][A4] \setuplayout[leftmargindistance=0cm] \setupheadertexts[] \starttypescript [sans] [helvetica] [texnansi] \definefontsynonym [Helvetica] [hv] [encoding=texnansi] \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] \stoptypescript \starttypescript [sans] [helvetica] [name] \definefontsynonym [Sans] [Helvetica] \definefontsynonym [SansBold] [Helvetica-Bold] \definefontsynonym [SansItalic] [Helvetica-Oblique] \definefontsynonym [SansSlanted] [Helvetica-Oblique] \definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique] \definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique] \definefontsynonym [SansCaps] [Helvetica] \stoptypescript \starttypescript [pdf] \definetypeface [MyHelvetica] [ss] [sans] [helvetica] [default] [encoding=texnansi] \stoptypescript \usetypescript[pdf] \setupbodyfont[MyHelvetica] \starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext
Try this: \enableregime[il1] \setupoutput[pdftex] \setuppapersize[A4][A4] \setuplayout[leftmargindistance=0cm] \setupheadertexts[] \usetypescriptfile [adobekb] \usetypescript[adobekb][\defaultencoding] \setupbodyfont[pos,11pt] \starttext {\ss This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}.} \stoptext On Mar 30, 2004, at 4:54 PM, Stefan Wachter wrote:
\enableregime[il1] \setupoutput[pdftex] \setuppapersize[A4][A4] \setuplayout[leftmargindistance=0cm] \setupheadertexts[]
\starttypescript [sans] [helvetica] [texnansi] \definefontsynonym [Helvetica] [hv] [encoding=texnansi] \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] \stoptypescript
\starttypescript [sans] [helvetica] [name] \definefontsynonym [Sans] [Helvetica] \definefontsynonym [SansBold] [Helvetica-Bold] \definefontsynonym [SansItalic] [Helvetica-Oblique] \definefontsynonym [SansSlanted] [Helvetica-Oblique] \definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique] \definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique] \definefontsynonym [SansCaps] [Helvetica] \stoptypescript
\starttypescript [pdf] \definetypeface [MyHelvetica] [ss] [sans] [helvetica] [default] [encoding=texnansi] \stoptypescript
\usetypescript[pdf] \setupbodyfont[MyHelvetica]
\starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext
On 30 Mar 2004 at 16:54, Stefan Wachter wrote:
Hi all!
I tried to write a typescript to use the Helvetica PDF base 14 fonts.
What on earth is wrong with \setupencoding [default=8r] \usetypescript [berry][8r] \setupbodyfont [pos,12pt] Christopher --------------------------------o00o-------------------------------- "Since light travels faster than sound, isn't that why some people appear bright until you hear them speak" - Steve Wright
Christopher G D Tipper wrote:
On 30 Mar 2004 at 16:54, Stefan Wachter wrote:
Hi all!
I tried to write a typescript to use the Helvetica PDF base 14 fonts.
What on earth is wrong with
\setupencoding [default=8r] \usetypescript [berry][8r]
\setupbodyfont [pos,12pt]
Christopher --------------------------------o00o-------------------------------- "Since light travels faster than sound, isn't that why some people appear bright until you hear them speak" - Steve Wright Hi Christopher,
using the commands you propose the PDF documents that are generated contain the NimbusRomNo9L or NimbusSansL fonts and not Times-Roman or Helvetica! I want to use Helvetica because I configured PDFTeX in such a way that the 14 PDF base fonts (Helvetica, Times, Courier) are not embedded. --Stefan
Stefan Wachter said this at Tue, 30 Mar 2004 16:54:27 +0200:
I tried to write a typescript to use the Helvetica PDF base 14 fonts.
Interesting problem. I haven't dealt with it, but it seems like a worthy goal. I thought Patrick Grundlach (?) did some work with this, but I'm not sure. Check the archives.
Yet, the example below uses the (default) Computer Modern Roman fonts. I wrote the typescript along the lines of the excellent help document at (http://home.salamander.com/~wmcclain/context-help.html).
Thanks for your attention, --Stefan
\enableregime[il1] \setupoutput[pdftex] \setuppapersize[A4][A4] \setuplayout[leftmargindistance=0cm] \setupheadertexts[]
Okay, put the following typescripts into a separate file (type-hv.tex):
\starttypescript [sans] [helvetica] [texnansi] \definefontsynonym [Helvetica] [hv] [encoding=texnansi] \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] \stoptypescript
\starttypescript [sans] [helvetica] [name] \definefontsynonym [Sans] [Helvetica] \definefontsynonym [SansBold] [Helvetica-Bold] \definefontsynonym [SansItalic] [Helvetica-Oblique] \definefontsynonym [SansSlanted] [Helvetica-Oblique] \definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique] \definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique] \definefontsynonym [SansCaps] [Helvetica] \stoptypescript
\starttypescript [pdf] \definetypeface [MyHelvetica] [ss] [sans] [helvetica] [default] [encoding=texnansi] \stoptypescript
...and replace them in your source file with: \usetypescriptfile[type-hv]
\usetypescript[pdf] \setupbodyfont[MyHelvetica]
\setupbodyfont[MyHelvetica,ss]
\starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext
After I got my pdftex.map pointing to pdftex_ndl14.map (the hardest part of all this), I was able to generate the PDFs with the correct, unembedded fonts. Hope that helps... you were pretty close! adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
Stefan Wachter said this at Tue, 30 Mar 2004 16:54:27 +0200:
I tried to write a typescript to use the Helvetica PDF base 14 fonts.
Interesting problem. I haven't dealt with it, but it seems like a worthy goal. I thought Patrick Grundlach (?) did some work with this, but I'm not sure. Check the archives.
Yet, the example below uses the (default) Computer Modern Roman fonts. I wrote the typescript along the lines of the excellent help document at (http://home.salamander.com/~wmcclain/context-help.html).
Thanks for your attention, --Stefan
\enableregime[il1] \setupoutput[pdftex] \setuppapersize[A4][A4] \setuplayout[leftmargindistance=0cm] \setupheadertexts[]
Okay, put the following typescripts into a separate file (type-hv.tex):
\starttypescript [sans] [helvetica] [texnansi] \definefontsynonym [Helvetica] [hv] [encoding=texnansi] \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] \stoptypescript
\starttypescript [sans] [helvetica] [name] \definefontsynonym [Sans] [Helvetica] \definefontsynonym [SansBold] [Helvetica-Bold] \definefontsynonym [SansItalic] [Helvetica-Oblique] \definefontsynonym [SansSlanted] [Helvetica-Oblique] \definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique] \definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique] \definefontsynonym [SansCaps] [Helvetica] \stoptypescript
\starttypescript [pdf] \definetypeface [MyHelvetica] [ss] [sans] [helvetica] [default] [encoding=texnansi] \stoptypescript
...and replace them in your source file with:
\usetypescriptfile[type-hv]
\usetypescript[pdf] \setupbodyfont[MyHelvetica]
\setupbodyfont[MyHelvetica,ss]
\starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext
After I got my pdftex.map pointing to pdftex_ndl14.map (the hardest part of all this), I was able to generate the PDFs with the correct, unembedded fonts.
Hope that helps... you were pretty close! adam Hi Adam,
thanks for the help. After extracting the typescript code into a seperate typescript file everything works fine! --Stefan
Stefan Wachter said this at Wed, 31 Mar 2004 18:17:29 +0200:
thanks for the help. After extracting the typescript code into a seperate typescript file everything works fine!
Ah, I remembered what Patrick did, now: \usetypescript[adobekb][texnansi] \usetypescript[times][texnansi] \setupbodyfont[times,ss] \starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext This minimal version worked for me. The typescripts are already there in ConTeXt... adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
Stefan Wachter said this at Wed, 31 Mar 2004 18:17:29 +0200:
thanks for the help. After extracting the typescript code into a seperate typescript file everything works fine!
Ah, I remembered what Patrick did, now: \usetypescript[adobekb][texnansi] \usetypescript[times][texnansi] \setupbodyfont[times,ss] \starttext This is Helvetica, {\bf bold}, {\it italic}, {\bi bold-italic}, {\tfa bigger} and {\tfx smaller}. \stoptext
This minimal version worked for me. The typescripts are already there in ConTeXt... adam Hi Adam,
I tried the code of Patrick. It works for Times and Helvetica. Yet, if I switch to monospace using \tt then Computer Modern fonts are used / embedded. In addition, all this typescripts stuff is so confusing for me that I prefer to use my own simple typescript. Now I wonder how to integrate the PDF base 14 ZapfDingbats and Symbols font. Do you have a clue? Additionally, it would be great to have the math mode work, too (with embedding of course). Thanks again, --Stefan PS: Here is the complete typescript: \starttypescript [sans] [helvetica] [texnansi] \definefontsynonym [Helvetica] [hv] [encoding=texnansi] \definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi] \definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi] \definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi] \stoptypescript \starttypescript [sans] [helvetica] [name] \definefontsynonym [Sans] [Helvetica] \definefontsynonym [SansBold] [Helvetica-Bold] \definefontsynonym [SansItalic] [Helvetica-Oblique] \definefontsynonym [SansSlanted] [Helvetica-Oblique] \definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique] \definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique] \definefontsynonym [SansCaps] [Helvetica] \stoptypescript \starttypescript [serif] [times] [texnansi] \definefontsynonym [Times-Roman] [tir] [encoding=texnansi] \definefontsynonym [Times-Bold] [tib] [encoding=texnansi] \definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi] \definefontsynonym [Times-Italic] [tii] [encoding=texnansi] \stoptypescript \starttypescript [serif] [times] [name] \definefontsynonym [Serif] [Times] \definefontsynonym [SerifBold] [Times-Bold] \definefontsynonym [SerifItalic] [Times-Italic] \definefontsynonym [SerifSlanted] [Times-Italic] \definefontsynonym [SerifBoldItalic] [Times-BoldItalic] \definefontsynonym [SerifBoldSlanted] [Times-BoldItalic] \definefontsynonym [SerifCaps] [Times] \stoptypescript \starttypescript [mono] [courier] [texnansi] \definefontsynonym [Courier] [com] [encoding=texnansi] \definefontsynonym [Courier-Bold] [cob] [encoding=texnansi] \definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi] \definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi] \stoptypescript \starttypescript [mono] [courier] [name] \definefontsynonym [Mono] [Courier] \definefontsynonym [MonoBold] [Courier-Bold] \definefontsynonym [MonoItalic] [Courier-Oblique] \definefontsynonym [MonoSlanted] [Courier-Oblique] \definefontsynonym [MonoBoldItalic] [Courier-BoldOblique] \definefontsynonym [MonoBoldSlanted] [Courier-BoldOblique] \definefontsynonym [MonoCaps] [Courier] \stoptypescript \starttypescript [pdf] \definetypeface [pdf] [ss] [sans] [helvetica] [default] [encoding=texnansi] \definetypeface [pdf] [rm] [serif] [times] [default] [encoding=texnansi] \definetypeface [pdf] [tt] [mono] [courier] [default] [encoding=texnansi] \stoptypescript
Stefan Wachter said this at Thu, 1 Apr 2004 11:20:52 +0200:
I tried the code of Patrick. It works for Times and Helvetica. Yet, if I switch to monospace using \tt then Computer Modern fonts are used / embedded. In addition, all this typescripts stuff is so confusing for me that I prefer to use my own simple typescript.
Sorry. My mistake. I thought you were only interested in Helvetica as a text font, so I didn't worry about the rest of the picture. The pre- defined typescript is therefore: \usetypescript[postscript][texnansi] Courier is in there. (I usually think about the times typescript because I really don't like how light URW's Courier is. The native one doesn't look so bad.) The math mode is also in there, with the times math clone. You can look in type-exa.tex for the prototype: \starttypescript [postscript] [texnansi,ec,8r] \definetypeface [postscript] [rm] [serif] [times] [default] [encoding=\typescripttwo] \definetypeface [postscript] [mm] [math] [times] [default] \definetypeface [postscript] [ss] [sans] [helvetica] [default] [rscale=.9,encoding=\typescripttwo] \definetypeface [postscript] [tt] [mono] [courier] [default] [rscale=1.1,encoding=\typescripttwo] \stoptypescript [Note the rscale= lines in there. It's a really nice feature for equalising x-heights, so that the fonts work together better. You can test it out with \showfontstrip .]
Additionally, it would be great to have the math mode work, too (with embedding of course).
You can copy the [math] line into your [pdf] typescript, and be done with it. If you *really* want to be a font wizard, you can track the different levels of abstraction through type-pre, type-siz, and type-enc. (type-siz is especially strange--I'm still not sure if *anyone* understands it fully!) I get what you're doing now, and I respect it. In fact, I learned the most about typescripts by doing what you're doing: tearing them apart and building up by scratch. Eventually I've learned (with Bill, Patrick, Hans, and the list's help) just how much is made available by default.
Now I wonder how to integrate the PDF base 14 ZapfDingbats and Symbols font. Do you have a clue?
Ah, it depends what you mean by "integrate." When I do \showfont[sy], I see a bunch of greek and math symbols, but nothing sufficient for a full math mode. When I do \showfont[zd], however, I see something resembling Unicode vector 0x27nn. All it would take is a re-encoding to put the glyphs in the right place. For more details, see: http://homepage.mac.com/atl/tex/UnicodeSymbol.pdf and especially the part following \startsymbolset[Unicode Dingbats] in symb-uni.tex in: http://homepage.mac.com/atl/tex/symb-uni.zip Email me off-list if you want a head-start integrating ZapfDingbats... adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay said this at Thu, 1 Apr 2004 11:52:54 +0100:
When I do \showfont[zd], however, I see something resembling Unicode vector 0x27nn. All it would take is a re-encoding to put the glyphs in the right place.
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font. Looks like another "My Way" is on its way. Email me off list if you'd like to contribute as a tester. \usesymbols[uni] \definefontsynonym[UnicodeRegular27][zduni] \showsymbolset[Unicode Dingbats][n=4] -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Am Donnerstag, 01.04.04, um 19:07 Uhr (Europe/Zurich) schrieb Adam Lindsay:
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font.
It works on MacOS X 10.2 with Acrobat 5.05, Reader 6.0, Preview and TeXshop. MacGhostviewX 1.6 fails, but it never works here (can't find any fonts). Grüßlis vom Hraban! -- http://www.fiee.net/texnique/
It works on a PC with Windows XP and AcrobatReader 6.0, looks great. Willi Henning Hraban Ramm wrote:
Am Donnerstag, 01.04.04, um 19:07 Uhr (Europe/Zurich) schrieb Adam Lindsay:
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font.
It works on MacOS X 10.2 with Acrobat 5.05, Reader 6.0, Preview and TeXshop. MacGhostviewX 1.6 fails, but it never works here (can't find any fonts).
Grüßlis vom Hraban!
Hey, thanks for the quick feedback, guys... So the package is in the usual place. This time the watchword is "minimal" so it can work on as many systems as possible. 23kb for the documentation/demo, 7.2kb for the zip file itself... http://homepage.mac.com/atl/tex/ This is a cut-down version of the below Unicode Symbols package, designed to be simple and usable with any pdfTeX-centric ConTeXt installation. Little installation, minimal usage effort, and you gain over a hundred symbols for use in ConTeXt. The PDF file documents how to use the PDF native ZapfDingbats font along with a catalogue of the available symbols, and the zip file includes all that's necessary for an installation, including a modified encoding, a tfm file, and a ConTeXt support file. No Unicode knowledge necessary. Lemme know if it doesn't work... adam Willi Egger said this at Thu, 1 Apr 2004 20:25:44 +0200:
It works on a PC with Windows XP and AcrobatReader 6.0, looks great.
Willi
Henning Hraban Ramm wrote:
Am Donnerstag, 01.04.04, um 19:07 Uhr (Europe/Zurich) schrieb Adam Lindsay:
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font.
It works on MacOS X 10.2 with Acrobat 5.05, Reader 6.0, Preview and TeXshop. MacGhostviewX 1.6 fails, but it never works here (can't find any fonts).
Grüßlis vom Hraban!
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
At 06:07 pm +0100 1/04/04, Adam Lindsay wrote:
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font.
Hi Adam, Your PDF file works fine on Mac OS X 10.3.3 with: Acrobat 5.0.5, Adobe Reader 6.0 TeXShop 1.34 ghostscript under X11 (the command is gs) Preview It is also viewable in the body of your message in Eudora 6.1, and with PDFplugin 2.0 under Safari. Cheers: OK
Adam Lindsay wrote:
Adam Lindsay said this at Thu, 1 Apr 2004 11:52:54 +0100:
When I do \showfont[zd], however, I see something resembling Unicode vector 0x27nn. All it would take is a re-encoding to put the glyphs in the right place.
Hey, does this PDF file work for everyone? No fonts are embedded in its 19Kb, but it gives a good outline of what's available in the PDF-native ZapfDingbats font.
Looks like another "My Way" is on its way. Email me off list if you'd like to contribute as a tester.
\usesymbols[uni] \definefontsynonym[UnicodeRegular27][zduni] \showsymbolset[Unicode Dingbats][n=4]
It also works on Linux with Acrobat Reader 5.0.5. --Stefan
participants (7)
-
Adam Lindsay
-
Christopher G D Tipper
-
Henning Hraban Ramm
-
Otared Kavian
-
Stefan Wachter
-
Thomas A.Schmitz
-
Willi Egger