Hi Stefan, Stefan Wachter wrote:
Hi all!
Fonts are driving my crazy! I have the following document that clearly states that the font encoding should be "ec". Yet, somewhere behind the scenes the ec-encoded font uhvr8t is mapped into the 8r-encoded font uhvr8r.
Can someone reveal this deep secret?
The uhvr8t font is a virtual font, probably created by fontinst. (A virtual font is a font built up from other fonts to create something that looks like a single font to TeX. This allows the font package creator to fill holes in the original font and add extra accented characters etc. You can think of it as an unexpanded macro) A 'normal' TeX that outputs DVI really would only use the font metrics uhvr8t.tfm, and later, dvips expands the font into it's constituent parts while creating the PostScript output. At that time, dvips will read psfonts.map, which should have lines for all of the possible constituent fonts so that the actual fonts can be embedded in the PS file for printing. If you would have run Context in a DVI-creating mode, this is what would have happened. For pdftex, that font de-virtualization step has to be done right away because there is no separate 'dvipdf' program, so pdtex is a somewhat like a two-stage rocket: tex -> dvi -> pdf, combined in one executable. It is that second (post-processing) step that uses the uhvr8r font (and the mapline associated with it), but while typesetting ConTeXt *does* use the requested 8t font. You can be verify that by running \showfont[Sans]. Greetings, Taco
Best regards, --Stefan
PS: The pdfmapline instruction cause the uhvr8r font not to be embedded. Doing so proves that Context really uses the uhvr8r font and not the uhvr8t font.
\enableregime[il1] \setupencoding[default=ec] \setupoutput[pdftex] \usetypescriptfile[pdf-typescript.tex] \usetypescript[pdf] \setupbodyfont[MyHelvetica,sans,20pt] \setupheadertexts[] \pdfoptionpdfminorversion 4 \starttext \pdfmapline{=uhvr8r Helvetica "TeXBase1Encoding ReEncodeFont" <8r.enc} This is a test. \stoptext
With the typescriptfile pdf-typescript.tex:
\starttypescript [sans] [xhelvetica] [name] \writestatus{x}{y} \definefontsynonym [Sans] [uhvr8t] [encoding=ec] \definefontsynonym [SansBold] [uhvb8t] [encoding=ec] \definefontsynonym [SansItalic] [uhvro8t] [encoding=ec] \definefontsynonym [SansSlanted] [uhvro8t] [encoding=ec] \definefontsynonym [SansBoldItalic] [uhvbo8t] [encoding=ec] \definefontsynonym [SansBoldSlanted] [uhvbo8t] [encoding=ec] \definefontsynonym [SansCaps] [uhvr8t] [encoding=ec] \stoptypescript
\starttypescript [pdf] \definetypeface [MyHelvetica] [ss] [sans] [xhelvetica] [default] [encoding=ec] \stoptypescript
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context