* [Q] How to use new fonts in context
@ 2000-11-25 14:59 Han The Thanh
2000-11-25 15:49 ` Berend de Boer
2000-11-25 22:11 ` Frans Goddijn
0 siblings, 2 replies; 4+ messages in thread
From: Han The Thanh @ 2000-11-25 14:59 UTC (permalink / raw)
Dear all,
can someone please give me an example how to use a new font family in
context, given that I have the tfm + vf + pfb + map file ready.
Thanks,
Thanh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] How to use new fonts in context
2000-11-25 14:59 [Q] How to use new fonts in context Han The Thanh
@ 2000-11-25 15:49 ` Berend de Boer
2000-11-26 19:04 ` Hans Hagen
2000-11-25 22:11 ` Frans Goddijn
1 sibling, 1 reply; 4+ messages in thread
From: Berend de Boer @ 2000-11-25 15:49 UTC (permalink / raw)
Cc: ConTeXt List
Han The Thanh wrote:
>
> can someone please give me an example how to use a new font family in
> context, given that I have the tfm + vf + pfb + map file ready.
I thought you went for pure Tex??? :-)
Take a look at the font-*.tex files.
Here an example
------------------
\definefontsynonym [Serif] [AcanthusSSi]
\definefontsynonym [SerifBold] [AcanthusSSi-Bold]
\definefontsynonym [SerifItalic] [AcanthusSSi-Italic]
\definefontsynonym [SerifSlanted] [AcanthusSSi-Italic]
\definefontsynonym [SerifBoldItalic] [AcanthusSSi-BoldItalic]
\definefontsynonym [SerifBoldSlanted] [AcanthusSSi-BoldItalic]
\definefontsynonym [SerifCaps] [AcanthusSSi]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm] [default]
--------------------
AcanthusXXX can be defined through font synonyms as with:
\definefontsynonym[AcanthusSSi] [acans] [encoding=texnansi]
\definefontsynonym[AcanthusSSi-Bold] [acansb] [encoding=texnansi]
You don't need to define font synonyms if you use the font name.
A more eloborated example:
---------------------------------------------------
%D \module
%D [ file=font-trekts,
%D version=1998.11.6,
%D title=\CONTEXT\ Font Macros,
%D subtitle=TrekkieTitlesSSi,
%D author=Berend de Boer,
%D date=\currentdate,
%D This module defines the TrekkieTitlesSSi font. We use
%D the \YandY\ texnansi encoding vector.
\startcoding [texnansi]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
[tf=TrekkieTitlesSSi sa 1,
bf=TrekkieTitlesSSi-Bold sa 1,
bs=TrekkieTitlesSSi-Bold sa 1,
tfa=TrekkieTitlesSSi sa 1.200,
tfb=TrekkieTitlesSSi sa 1.440,
tfc=TrekkieTitlesSSi sa 1.728,
tfd=TrekkieTitlesSSi sa 2.074,
bfa=TrekkieTitlesSSi-Bold sa 1.200,
bfb=TrekkieTitlesSSi-Bold sa 1.440,
bfc=TrekkieTitlesSSi-Bold sa 1.728,
bfd=TrekkieTitlesSSi-Bold sa 2.074,
sc=TrekkieTitlesSSi sa 0.833]
\stopcoding
\endinput
-------------------------------------------------
Groetjes,
Berend. (-:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] How to use new fonts in context
2000-11-25 14:59 [Q] How to use new fonts in context Han The Thanh
2000-11-25 15:49 ` Berend de Boer
@ 2000-11-25 22:11 ` Frans Goddijn
1 sibling, 0 replies; 4+ messages in thread
From: Frans Goddijn @ 2000-11-25 22:11 UTC (permalink / raw)
Thanh (who gave a great presentation in Arnhem the other week,
thanks Thanh! and also thank Karel for me!) asked:
> can someone please give me an example how to use a new font
family in
> context, given that I have the tfm + vf + pfb + map file ready.
I'd say, ask Taco first, because "the" tfm et cetera could need
some jugling. When I tried to figure out how Taco had installed a
font for me, and Taco wasn't available to ask, I did some
archaeological research through my directories and documented for
myself this, for a given Times font including oldstyle/expert set
numbers/small caps:
-------- in \texmf\pdftex\config\
1 a file pdftex.cfg containing the line
+fg.map
2 a file fg.map containing lines like:
tnrexp TimesNRExpertMT <tnrexp.pfb
tnrexpi TimesNRExpertMT-Italic <tnrexpi.pfb
tnrexpu TimesNRExpertMT-Italic "-0.167 SlantFont" <tnrexpi.pfb
tnrexpo TimesNRExpertMT "0.167 SlantFont" <tnrexp.pfb
* TIMES in TeXnANSI encoding (ly1) for context.
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
...
...
--------
in \texmf\pdftex\base a number of .enc files that may have been
changed
(in a new setup these are in \tex\texmf\dvips\base )
texnansi.enc
ec.enc
textext.enc
--------
in my \mytex\fonts\type1\fg\
(in new setup in \tex\texmf.local\fonts\type1\fg\)
tnr*.pfb (times source files incl expert sets)
helv*.pfb (my helvetica's)
linoe*.pfb (special euro sylbol fonts)
--------
in my ..\fonts\afm\fg\
all *.afm and *.ofm and *.pfb files of my fonts
--------
in my ..\fonts\tfm\fg\
all *.tfm files of my fonts
--------
In the work directory of the tex-file on hand:
font-loc.tex
containing:
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
[bse=Times-Bold scaled \magstep5]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss]
[bfc=Helvetica-Bold sa 1.728,
bic=Helvetica-BoldOblique sa 1.728]
-------
in my ConTeXt .tex-file at least this:
\useencoding[ibm]
\stelkorpsin
[pos,fg,loc,9pt]
--------
in ..\texmf\tex\context\user\
the file
cont-sys.tex
containing lines like:
\definebodyfontenvironment[default][em=italic]
% FG
\runMPgraphicstrue
\setupbodyfont[ber,fg]
--------
also in ..\texmf\tex\context\user\
the file font-fg.tex
containing things like:
\definefontsynonym [Courier] [pcrr]
\definefontsynonym [Courier-Oblique] [pcrro]
\definefontsynonym [Courier-Bold] [pcrb]
\definefontsynonym [Courier-BoldOblique] [pcrbo]
\definefontsynonym [Helvetica] [helv2]
\definefontsynonym [Helvetica-Oblique] [helvi2]
\definefontsynonym [Helvetica-Italic] [helvi2]
\definefontsynonym [Helvetica-Bold] [helvb2]
\definefontsynonym [Helvetica-BoldOblique] [helvbi2]
\definefontsynonym [Helvetica-BoldItalic] [helvbi2]
\definefontsynonym [Times-Roman] [tnr2]
\definefontsynonym [Times-Italic] [tnri2]
\definefontsynonym [Times-Oblique] [tnro2]
\definefontsynonym [Times-Bold] [tnrb2]
\definefontsynonym [Times-BoldItalic] [tnrbi2]
\definefontsynonym [Times-BoldOblique] [tnrbo2]
\definefontsynonym [Times-RomanSC] [tnrexp]
\definefontsynonym [SerifCaps] [tnrexp]
\definefontsynonym [SerifCapsI] [tnrexpi]
\definefontsynonym [Times-RomanSCItalic] [tnrexpi]
\definefontsynonym [OldStyle] [Times-RomanSC]
\definefontsynonym [OldStyle] [Times-RomanSC]
\definefontsynonym [OldStyleIt] [Times-RomanSCItalic]
\definefont[osi] [OldStyleIt sa \currentfontscale]
\definefont[oldstyle] [OldStyle sa \currentfontscale]
\def\os{\groupedcommand{\oldstyle}{}}
\definefont[oldstyleitalic] [OldStyleIt sa \currentfontscale]
\def\osi{\groupedcommand{\oldstyleitalic}{}}
% in newe setup Serifcaps changed to OldStyle
\definefont[myownkaps] [SerifCaps sa \currentfontscale]
\definefont[myownkapsi] [SerifCapsI sa \currentfontscale]
\def\mykap{\groupedcommand{\myownkaps}{}}
\def\mykapi{\groupedcommand{\myownkapsi}{}}
\definefontsynonym [Symbol] [psyr]
\definefontsynonym [ZapfChancery] [pzcmi]
\definefontsynonym [ZapfDingbats] [pzdr]
--------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] How to use new fonts in context
2000-11-25 15:49 ` Berend de Boer
@ 2000-11-26 19:04 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2000-11-26 19:04 UTC (permalink / raw)
Cc: ConTeXt List
At 04:49 PM 11/25/00 +0100, Berend de Boer wrote:
Berend implement his star-trek fonts as follows:
>---------------------------------------------------
>%D \module
>%D [ file=font-trekts,
>%D version=1998.11.6,
>%D title=\CONTEXT\ Font Macros,
>%D subtitle=TrekkieTitlesSSi,
>%D author=Berend de Boer,
>%D date=\currentdate,
>
>%D This module defines the TrekkieTitlesSSi font. We use
>%D the \YandY\ texnansi encoding vector.
>
>\startcoding [texnansi]
>
>\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
> [tf=TrekkieTitlesSSi sa 1,
> bf=TrekkieTitlesSSi-Bold sa 1,
> bs=TrekkieTitlesSSi-Bold sa 1,
> tfa=TrekkieTitlesSSi sa 1.200,
> tfb=TrekkieTitlesSSi sa 1.440,
> tfc=TrekkieTitlesSSi sa 1.728,
> tfd=TrekkieTitlesSSi sa 2.074,
> bfa=TrekkieTitlesSSi-Bold sa 1.200,
> bfb=TrekkieTitlesSSi-Bold sa 1.440,
> bfc=TrekkieTitlesSSi-Bold sa 1.728,
> bfd=TrekkieTitlesSSi-Bold sa 2.074,
> sc=TrekkieTitlesSSi sa 0.833]
>
>\stopcoding
Here the \start..\stopcoding is not really needed. The font file specific
encoding happens when defining the filename, the only platform dependent
place. There can be coding specific things in a font file (lucida) for
instance because special chars are used [or math].
Another handy thing is that you can use
....=... sa a (or b,c,...) instead of those funny numbers.
If you use the font as your only sans, you can use an even simpler setup,
see font-ptm.tex for an example. Because font mapping is recursive, you can
map trekb onto TrekkieTitlesSSi-Bold onto SansBold [even mid document].
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-11-26 19:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-25 14:59 [Q] How to use new fonts in context Han The Thanh
2000-11-25 15:49 ` Berend de Boer
2000-11-26 19:04 ` Hans Hagen
2000-11-25 22:11 ` Frans Goddijn
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).