ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Why uses Context 8r encoding used instead of the specified ec encoding?
@ 2005-02-08 19:55 Stefan Wachter
  2005-02-09 14:11 ` Taco Hoekwater
  2005-02-09 17:23 ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Wachter @ 2005-02-08 19:55 UTC (permalink / raw)


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?

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 14:11 ` Taco Hoekwater
@ 2005-02-09  9:27   ` Hans Hagen
  2005-02-09 11:54   ` Stefan Wachter
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2005-02-09  9:27 UTC (permalink / raw)


Taco Hoekwater wrote:

>> Can someone reveal this deep secret?
> 
> 
> The uhvr8t font is a virtual font, probably created by fontinst.

....

Can we create a section in the wiki where such nice explanations can go into? 
Something: "some details about how tex works"

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 14:11 ` Taco Hoekwater
  2005-02-09  9:27   ` Hans Hagen
@ 2005-02-09 11:54   ` Stefan Wachter
  2005-02-09 12:12     ` Hans Hagen
  2005-02-09 12:24     ` Thomas A.Schmitz
  1 sibling, 2 replies; 10+ messages in thread
From: Stefan Wachter @ 2005-02-09 11:54 UTC (permalink / raw)


Hi Taco,

thank you very much for your answer that reveals so many secrets ;-).

How can I distinguish normal fonts from virtual ones? I would like to 
understand all these font issues but didn't find suitable readings. Is 
there a "Beginners Guide the to Secrets of Fonts"? Can you recomend some 
material?

Thanks again,
--Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 11:54   ` Stefan Wachter
@ 2005-02-09 12:12     ` Hans Hagen
  2005-02-09 12:24     ` Thomas A.Schmitz
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2005-02-09 12:12 UTC (permalink / raw)


Stefan Wachter wrote:
> Hi Taco,
> 
> thank you very much for your answer that reveals so many secrets ;-).
> 
> How can I distinguish normal fonts from virtual ones? I would like to 
> understand all these font issues but didn't find suitable readings. Is 
> there a "Beginners Guide the to Secrets of Fonts"? Can you recomend some 
> material?

when

   kpsewhich fontname.vf

reports something, you're in a virtual world

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 11:54   ` Stefan Wachter
  2005-02-09 12:12     ` Hans Hagen
@ 2005-02-09 12:24     ` Thomas A.Schmitz
  2005-02-15  8:27       ` Stefan Wachter
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas A.Schmitz @ 2005-02-09 12:24 UTC (permalink / raw)


Playing around with fonts is one of my favorite (and immensely 
time-consuming) hobbies. Here's a couple of links where I learned many 
useful things. Some of them are a bit LaTeX-centric, but most of the 
stuff is still applicable to ConTeXt:

http://home.salamander.com/~wmcclain/context-help.html [that should be 
your first stop, immensely useful]

http://www.cl.cam.ac.uk/users/rf/pstex/index.htm [clear and helpful]

http://homepage.mac.com/bkerstetter/tex/fonttutorial-current.html [for 
LaTeX  and OS X, but useful even for other distros]

http://zoonek.free.fr/LaTeX/Fontes/fontes.html [a wealth of 
information, in French]

http://www.radamir.com/tex/ttf-tex.htm [a classic: somewhat outdated, 
but still useful]

I assume that you have looked at the ConTeXt manuals about fonts: 
mfonts.pdf, mtexfont.pdf. Finally, for the somewhat advanced user, have 
a look at Adam's MyWays: http://homepage.mac.com/atl/tex/ which also 
contain a wealth of information.

HTH

Thomas

On Feb 9, 2005, at 12:54 PM, Stefan Wachter wrote:

> Hi Taco,
>
> thank you very much for your answer that reveals so many secrets ;-).
>
> How can I distinguish normal fonts from virtual ones? I would like to 
> understand all these font issues but didn't find suitable readings. Is 
> there a "Beginners Guide the to Secrets of Fonts"? Can you recomend 
> some material?
>
> Thanks again,
> --Stefan
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-08 19:55 Why uses Context 8r encoding used instead of the specified ec encoding? Stefan Wachter
@ 2005-02-09 14:11 ` Taco Hoekwater
  2005-02-09  9:27   ` Hans Hagen
  2005-02-09 11:54   ` Stefan Wachter
  2005-02-09 17:23 ` Hans Hagen
  1 sibling, 2 replies; 10+ messages in thread
From: Taco Hoekwater @ 2005-02-09 14:11 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-08 19:55 Why uses Context 8r encoding used instead of the specified ec encoding? Stefan Wachter
  2005-02-09 14:11 ` Taco Hoekwater
@ 2005-02-09 17:23 ` Hans Hagen
  2005-02-10 12:56   ` Christopher Creutzig
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2005-02-09 17:23 UTC (permalink / raw)


Stefan Wachter wrote:

> 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.

> \starttext

\def\loadmapline
   {\dodoubleempty\loadmapline}

\def\loadmapline[#1][#2]%
   {\loadallfontmapfiles % ! ! !
    \doloadmapline{#1}{#2}}

> \loadmapline[uhvr8r Helvetica "TeXBase1Encoding ReEncodeFont" <8r.enc]

the map files are flushed at certain moments, and in your case after th 
emapline; has to do with older pdftex's and prefered places of flushing;

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 17:23 ` Hans Hagen
@ 2005-02-10 12:56   ` Christopher Creutzig
  2005-02-10 14:02     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Creutzig @ 2005-02-10 12:56 UTC (permalink / raw)


Hans Hagen wrote:

> \def\loadmapline
>   {\dodoubleempty\loadmapline}
> 
> \def\loadmapline[#1][#2]%
>   {\loadallfontmapfiles % ! ! !
>    \doloadmapline{#1}{#2}}

  I'd be surprised if that worked.  The second \def overwrites the first.

Christopher

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-10 12:56   ` Christopher Creutzig
@ 2005-02-10 14:02     ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2005-02-10 14:02 UTC (permalink / raw)


Christopher Creutzig wrote:
> Hans Hagen wrote:
> 
>> \def\loadmapline
>>   {\dodoubleempty\loadmapline}
>>
>> \def\loadmapline[#1][#2]%
>>   {\loadallfontmapfiles % ! ! !
>>    \doloadmapline{#1}{#2}}
> 
> 
>  I'd be surprised if that worked.  The second \def overwrites the first.

it did when i tested it with two args -)

\def\loadmapline
   {\dodoubleempty\dodoloadmapline}

\def\dodoloadmapline[#1][#2]%
   {\loadallfontmapfiles % ! ! !
    \doloadmapline{#1}{#2}} % special

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Why uses Context 8r encoding used instead of the specified ec encoding?
  2005-02-09 12:24     ` Thomas A.Schmitz
@ 2005-02-15  8:27       ` Stefan Wachter
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Wachter @ 2005-02-15  8:27 UTC (permalink / raw)


Hi Thomas,

thanks for the wealth of information. I see much clearer now.

--Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-02-15  8:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08 19:55 Why uses Context 8r encoding used instead of the specified ec encoding? Stefan Wachter
2005-02-09 14:11 ` Taco Hoekwater
2005-02-09  9:27   ` Hans Hagen
2005-02-09 11:54   ` Stefan Wachter
2005-02-09 12:12     ` Hans Hagen
2005-02-09 12:24     ` Thomas A.Schmitz
2005-02-15  8:27       ` Stefan Wachter
2005-02-09 17:23 ` Hans Hagen
2005-02-10 12:56   ` Christopher Creutzig
2005-02-10 14:02     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).