ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* It works
@ 2002-02-26 17:36 Frans Goddijn
  2002-02-26 23:53 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Frans Goddijn @ 2002-02-26 17:36 UTC (permalink / raw)


Well, after some turbulencies my Times font really and perfectly works,
including my coveted Oldstyle / Expert Set.

It really is all very simple, as a few people have told me on this list. For
me, the best solution was to ask Taco to have a look into it, and when even
he got into a tangle over it, I was comforted that I wouldn't have easily
pulled it off even if I had his expertise :-)

Taco sent me the new working  files and to complete the story (so far, who
knows what might happen if the font setup gets upgraded again...) I provide
these successful files as example:

%%%%%%% start of file itworks.tex %%%%%%%%%
\steluitvoerin[pdftex]

\usetypescriptfile[type-fgtimes]
\usetypescript[xtimes][MyTimes]
\setupbodyfont[MyTimes]

\defineconversion[o][\oldstylenumerals]
\defineconversion[n][\oldstylenumerals]

\stelvoetnotenin[conversie=o]

\starttekst

De kat krabt de krullen van de trap in Times roman, {\bf bold}, {\it
italic}, {\bi bold-italic},
{\tfa groter} en {\tfx kleiner}

Dit is een normale hoog\hoog{12345}||test

Dit is een oldstyle hoog\hoog{\os{12345}}||test

enkele accenten: \"{e} \"{\i}

oldstyle os: \os{1234567890 ivx}

kap: \kap{dit is in kap, ivx 123456789}

em plus kap is geen goed idee: {\em\kap{dit is in em kap, ivx 123456789}}

osi heeft wel cijfers, geen letters: \osi{123456789}

\startopsomming[o,opelkaar]
\som 1 test\voetnoot{Does this look old enough?}
\som 2 test\voetnoot{Does this look old enough?}
\som 3 test\voetnoot{Does this look old enough?}
\som 4 test\voetnoot{Does this look old enough?}
\som 5 test\voetnoot{Does this look old enough?}
\som 6 test\voetnoot{Does this look old enough?}
\som 7 test\voetnoot{Does this look old enough?}
\som 8 test\voetnoot{Does this look old enough?}
\som 9 test\voetnoot{Does this look old enough?}
\som 10 test\voetnoot{Does this look old enough?}
\stopopsomming

\stoptekst
%%%%%%% end of file itworks.tex %%%%%%%%%

%%%%%%% start of type-fgtimes.tex
\starttypescript [serif] [xtimes]  [texnansi]
   \definefontsynonym [Times-Roman]         [tnr2]
[encoding=\defaultencoding]
   \definefontsynonym [Times-Italic]        [tnri2]
[encoding=\defaultencoding]
   \definefontsynonym [Times-Bold]          [tnrb2]
[encoding=\defaultencoding]
   \definefontsynonym [Times-BoldItalic]    [tnrbi2]
[encoding=\defaultencoding]
   \definefontsynonym [Times-RomanSC]       [tnrexp]
   \definefontsynonym [Times-RomanSCItalic] [tnrexpi]
\stoptypescript

\starttypescript [serif] [xtimes]  [name]
   \definefontsynonym [Serif]           [Times-Roman]
   \definefontsynonym [SerifBold]       [Times-Bold]
   \definefontsynonym [SerifItalic]     [Times-Italic]
   \definefontsynonym [SerifBoldItalic] [Times-BoldItalic]
   \definefontsynonym [SerifCaps]       [Times-RomanSC]
   \definefontsynonym [SerifCapsItalic] [Times-RomanSCItalic]
\stoptypescript

\starttypescript [xtimes] [MyTimes]
  \definetypeface [MyTimes] [rm] [serif] [xtimes] [default]
[encoding=texnansi]
\stoptypescript

\definefont[Oldstyle][tnrexp]
\def\oldstylenumerals#1{{\Oldstyle #1}}
\def\os#1{{\Oldstyle #1}}

\definefont[OldstyleItalic][tnrexpi]
\def\oldstyleitnumerals#1{{\OldstyleItalic #1}}
\def\osi#1{{\OldstyleItalic #1}}

%\let\os\Oldstyle
%\let\osi\OldstyleItalic
%%%%%%% end of type-fgtimes.tex %%%%%%

%%%%%%% start of fg.map %%%%%%%%%%
%% Note: I'm not sure if this file is actually necessary nowadays
tnrexp    TimesNRExpertMT        <tnrexp.pfb
tnrexpi   TimesNRExpertMT-Italic <tnrexpi.pfb
tnrexpu   TimesNRExpertMT-Italic "-0.167 SlantFont" <tnrexpi.pfb
tnrexpo   TimesNRExpertMT        "0.167 SlantFont" <tnrexp.pfb
tnr2       TimesNewRoman            "TeXnANSIEncoding ReEncodeFont"
<texnansi.enc <tnr.pfb
tnri2      TimesNewRoman-Italic     "TeXnANSIEncoding ReEncodeFont"
<texnansi.enc <tnri.pfb
tnru2      TimesNewRoman-Italic     "-0.167 SlantFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnri.pfb
tnro2      TimesNewRoman            " 0.167 SlantFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnr.pfb
tnrb2      TimesNewRoman-Bold       "TeXnANSIEncoding ReEncodeFont"
<texnansi.enc <tnrb.pfb
tnrbi2     TimesNewRoman-BoldItalic "TeXnANSIEncoding ReEncodeFont"
<texnansi.enc <tnrbi.pfb
tnrbu2     TimesNewRoman-BoldItalic "-0.167 SlantFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnrbi.pfb
tnrbo2     TimesNewRoman-Bold       " 0.167 SlantFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnrb.pfb
tnrbx2     TimesNewRoman-Bold       "1.2 ExtendFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnrb.pfb
tnrbix2    TimesNewRoman-BoldItalic "1.2 ExtendFont TeXnANSIEncoding
ReEncodeFont" <texnansi.enc <tnrbi.pfb
tnrbux2    TimesNewRoman-BoldItalic "-0.167 SlantFont 1.2 ExtendFont
TeXnANSIEncoding ReEncodeFont" <texnansi.enc <tnrbi.pfb
tnrbox2    TimesNewRoman-Bold       " 0.167 SlantFont 1.2 ExtendFont
TeXnANSIEncoding ReEncodeFont" <texnansi.enc <tnrb.pfb
%%%%%%% end of fg.map %%%%%%%%%%%

%%%%%%% list of my afm/pfb's for times %%%%
TNR.AFM
TNR.OFM
TNR.PFB
TNR.PFM
TNRB.AFM
TNRB.OFM
TNRB.PFB
TNRB.PFM
TNRBI.AFM
TNRBI.OFM
TNRBI.PFB
TNRBI.PFM
TNRBO.AFM
TNRBO.OFM
TNRBO.PFB
TNRBO.PFM
TNREXP.AFM
TNREXP.INF
TNREXP.PFB
TNREXP.PFM
TNREXPI.AFM
TNREXPI.INF
TNREXPI.PFB
TNREXPI.PFM
TNRI.AFM
TNRI.OFM
TNRI.PFB
TNRI.PFM
%%%%%%% end of list of afm/pfb files %%%%


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

* Re: It works
  2002-02-26 17:36 It works Frans Goddijn
@ 2002-02-26 23:53 ` Hans Hagen
  2002-03-15 16:33   ` Oliver Mihatsch
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2002-02-26 23:53 UTC (permalink / raw)
  Cc: NTG-ConTeXt mailing list

At 06:36 PM 2/26/2002 +0100, Frans Goddijn wrote:

>knows what might happen if the font setup gets upgraded again...) I provide

one reason for introducing typescripts was that i wanted as less files as 
possibl eand the old way would lead to many many files (as well as 
potential conflicts in names); so consider typescripts kind of stable

given that you have:

   \definefontsynonym [Times-RomanSC]       [tnrexp]

you can now say:

>\definefont[Oldstyle][tnrexp]

\definefont[OldStyle][Times-RomanSC]

[you can also decide to put this within the typescipt itself

>\def\oldstylenumerals#1{{\Oldstyle #1}}
>\def\os#1{{\Oldstyle #1}}
>
>\definefont[OldstyleItalic][tnrexpi]
>\def\oldstyleitnumerals#1{{\OldstyleItalic #1}}
>\def\osi#1{{\OldstyleItalic #1}}
>
>%\let\os\Oldstyle
>%\let\osi\OldstyleItalic

Remind me that i provide you a better solution for this, something:

\definefontsynonym [OldStyleSerif]       [....]
\definefontsynonym [OldStyleSerifItalic] [....]
\define....

\def\oldstylenumerals#1{{\getglyph{OldStyle}{#1}}}

will give you a cleaner interface to this as well automatically adapt 
itself to the styles.

Some day i will buy a couple of those fonts and give them a try

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-pod.nl
-------------------------------------------------------------------------


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

* Re: It works
  2002-02-26 23:53 ` Hans Hagen
@ 2002-03-15 16:33   ` Oliver Mihatsch
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Mihatsch @ 2002-03-15 16:33 UTC (permalink / raw)


On Wednesday 27 February 2002 00:53, Hans Hagen wrote:
> At 06:36 PM 2/26/2002 +0100, Frans Goddijn wrote:
> > ...
>
> Remind me that i provide you a better solution for this, something:
>
> \definefontsynonym [OldStyleSerif]       [....]
> \definefontsynonym [OldStyleSerifItalic] [....]
> \define....
>
> \def\oldstylenumerals#1{{\getglyph{OldStyle}{#1}}}
>
> will give you a cleaner interface to this as well automatically adapt
> itself to the styles.
>
> Some day i will buy a couple of those fonts and give them a try

Is this feature already supposed to work somehow?  I tried the following

\starttypescript [serif] [...] [name]
  \definefontsynonym [Serif]              [...]
  \definefontsynonym [SerifBold]        [...]
   ...
  \definefontsynonym [OldStyleSerif]            [..]
  \definefontsynonym [OldStyleSerifBold]       [...]
   ...
\stoptypescript

While experimenting with this, I made the experience that

\def\oldstylenumerals#1{{\getglyph{OldStyle}{#1}}}

does not lead to any oldstyle numbers, whereas 

\def\oldstylenumerals#1{{\getglyph{\fontclass OldStyle}{#1}}}

does. The results seem ok. \oldstylenumerals adpts to the font family and 
shape. Does this mean that I am on the right track??

Moreover, I discovered a pitfall (bug?). The oldstyle numerals I get this way 
have the wrong size, if the typeface has been defined using the 
rscale=<number>  feature.  In other words, my numbers aren't "rscaled."
What is needed to circumvent this?

Oliver


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

end of thread, other threads:[~2002-03-15 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-26 17:36 It works Frans Goddijn
2002-02-26 23:53 ` Hans Hagen
2002-03-15 16:33   ` Oliver Mihatsch

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