summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/fontinst/base
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/fontinst/base')
-rw-r--r--Master/texmf-dist/tex/fontinst/base/cfntinst.sty230
-rw-r--r--Master/texmf-dist/tex/fontinst/base/finstmsc.sty70
-rw-r--r--Master/texmf-dist/tex/fontinst/base/fontinst.sty230
-rw-r--r--Master/texmf-dist/tex/fontinst/base/multislot.sty234
-rw-r--r--Master/texmf-dist/tex/fontinst/base/xfntinst.sty230
5 files changed, 879 insertions, 115 deletions
diff --git a/Master/texmf-dist/tex/fontinst/base/cfntinst.sty b/Master/texmf-dist/tex/fontinst/base/cfntinst.sty
index ec2ee057ba1..033e21175d7 100644
--- a/Master/texmf-dist/tex/fontinst/base/cfntinst.sty
+++ b/Master/texmf-dist/tex/fontinst/base/cfntinst.sty
@@ -7,6 +7,7 @@
%% fibasics.dtx (with options: `pkg')
%% ficommon.dtx (with options: `pkg')
%% fimain.dtx (with options: `pkg,boundaryCompability')
+%% fitrig.dtx (with options: `pkg')
%% ficonv.dtx (with options: `pkg')
%% filtfam.dtx (with options: `pkg,textcomp,debug')
%% fimapgen.dtx (with options: `pkg')
@@ -32,13 +33,13 @@
\catcode`\}=2
\catcode`\#=6
\catcode`\^=7
-\def\fontinstversion{1.929}
+\def\fontinstversion{1.933}
\ifx\ProvidesPackage\undefined
\def\NeedsTeXFormat#1{}
\def\ProvidesPackage#1[#2]{}
\fi
\ProvidesPackage{fontinst}
-[2005/02/05 v\fontinstversion\space
+[2007/01/23 v\fontinstversion\space
fontinst installation package]
\def\a_macro#1{\catcode\number`#1=\the\catcode`#1 }
\edef\normalcc{%
@@ -82,9 +83,6 @@
\mathchardef\max_mathchardef="7FFF
\mathchardef\two_thousand=2000
\newdimen\half_point \half_point=0.5pt
-\let\@tempdima\a_dimen
-\let\@tempdimb\b_dimen
-\input trig.sty
\def\x_cs#1#2{\expandafter#1\csname#2\endcsname}
\let\x_relax=\relax
\def\g_let{\global\let}
@@ -1190,12 +1188,17 @@
\moveup{#3}
\glyph{\glyph_name_modifier{#1}}{\one_thousand}
\pop
+ \else\ifisglyph{\glyph_name_modifier{#1}-not}\then
+ \fontinstwarning{\string\glyphpcc}{
+ Base~glyph~`\glyph_name_modifier{#1}'~not~appended,\messagebreak
+ because~it~is~so~far~unencoded~in~the~glyph~base
+ }
\else
\fontinsterror{\string\glyphpcc}{
- Base~glyph~not~set.\messagebreak
- This~could~be~a~sign~that~the~AFM~file~is~buggy
+ Base~glyph~not~set.\messagebreak
+ This~could~be~a~sign~that~the~AFM~file~is~buggy
}\error_help_a
- \fi
+ \fi\fi
}
\def\glyphbboxright{\max\glyph_width\glyph_maxhpos}
\def\samesize#1{
@@ -1992,14 +1995,18 @@
\fi
\fi
}
-\def\substitutesilent#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{ssub}
-}
-\def\substitutenoisy#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{sub}
+\def\substitute_generic#1#2#3{
+ \edef\a_macro{#2}
+ \edef\b_macro{#3}
+ \ifx \a_macro \b_macro
+ \x_cs\let{sub-#3}\undefined_command
+ \else
+ \x_cs\let{sub-#3}\a_macro
+ \x_cs\def{typ-#3}{#1}
+ \fi
}
+\def\substitutesilent{\substitute_generic{ssub}}
+\def\substitutenoisy{\substitute_generic{sub}}
\substitutesilent{bx}{b}
\substitutesilent{b}{bx}
\substitutesilent{b}{sb}
@@ -2064,6 +2071,89 @@
\out_line{\percent_char~Created~whilst~debugging~fontinst.}
\close_out{Test~file}
}
+%%% From file: fitrig.dtx
+\chardef\nin@ty=90
+\chardef\@clxxx=180
+\chardef\@lxxi=71
+\mathchardef\@mmmmlxviii=4068
+\chardef\@coeffz=72
+\chardef\@coefb=42
+\mathchardef\@coefc=840
+\mathchardef\@coefd=5040
+\def\TG@rem@pt#1{\expandafter\lose_measure\the#1\space}
+\def\TG@term#1{
+ \dimen@\@tempb\dimen@
+ \advance\dimen@ #1\p@
+}
+\def\TG@series{
+ \dimen@\@lxxi\dimen@
+ \divide \dimen@ \@mmmmlxviii
+ \edef\@tempa{\TG@rem@pt\dimen@}
+ \dimen@\@tempa\dimen@
+ \edef\@tempb{\TG@rem@pt\dimen@}
+ \divide\dimen@\@coeffz
+ \advance\dimen@\m@ne\p@
+ \TG@term\@coefb
+ \TG@term{-\@coefc}%
+ \TG@term\@coefd
+ \dimen@\@tempa\dimen@
+ \divide\dimen@ \@coefd
+}
+\def\CalculateSin#1{{%
+ \if_undefined{sin(\number#1)}\then
+ \dimen@=#1\p@
+ \TG@@sin
+ \x_cs\xdef{sin(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\CalculateCos#1{{%
+ \if_undefined{cos(\number#1)}\then
+ \dimen@=\nin@ty\p@
+ \advance \dimen@ -#1\p@
+ \TG@@sin
+ \x_cs\xdef{cos(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\TG@@sin{%
+ \ifdim\TG@reduce>+%
+ \else\ifdim\TG@reduce<-%
+ \else\TG@series\fi\fi
+}
+\def\TG@reduce#1#2{
+ \dimen@#1#2\nin@ty\p@
+ \advance\dimen@#2-\@clxxx\p@
+ \dimen@-\dimen@
+ \TG@@sin
+}
+\def\UseSin#1{\csname sin(\number#1)\endcsname}
+\def\UseCos#1{\csname cos(\number#1)\endcsname}
+\chardef\z@num\z@
+\x_cs\let{sin(0)} \z@num
+\x_cs\let{cos(0)} \@ne
+\x_cs\let{sin(90)} \@ne
+\x_cs\let{cos(90)} \z@num
+\x_cs\let{sin(-90)}\m@ne
+\x_cs\let{cos(-90)}\z@num
+\x_cs\let{sin(180)}\z@num
+\x_cs\let{cos(180)}\m@ne
+\def\CalculateTan#1{{%
+ \if_undefined{tan(\number#1)}\then
+ \CalculateSin{#1}%
+ \CalculateCos{#1}%
+ \a_dimen\UseCos{#1}\p@
+ \divide \a_dimen \@iv
+ \b_dimen\UseSin{#1}\p@
+ \b_dimen\two@fourteen\b_dimen
+ \divide\b_dimen\a_dimen
+ \x_cs\xdef{tan(\number#1)}{\TG@rem@pt\b_dimen}
+ \fi
+}}
+\def\UseTan#1{\csname tan(\number#1)\endcsname}
+\mathchardef\two@fourteen=16384
+\chardef\@iv=4
+\x_cs\def{tan(90)}{\errmessage{Infinite tan !}}
+\expandafter\let
+ \csname tan(-90)\expandafter\endcsname \csname tan(90)\endcsname
%%% From file: ficonv.dtx
\def\afmtomtx#1#2{{
\let\setsomething_global=\x_relax
@@ -2117,8 +2207,9 @@
\def\afm_command#1~{\csname~afm-#1\endcsname\gobble_one_line}
\def\gobble_one_line#1\end_of_line{}
\x_cs\def{afm-EndFontMetrics}#1\afm_line{\endinput}
-\def\afm_def#1(#2)#3{\x_cs\def{afm-#1}
- \gobble_one_line#2\end_of_line{#3}}
+\def\afm_def#1(#2)#3{
+ \x_cs\def{afm-#1}\gobble_one_line#2\end_of_line{#3}
+}
\def\afm_let#1#2{
\expandafter\let \csname afm-#1\expandafter\endcsname
\csname afm-#2\endcsname
@@ -2162,15 +2253,16 @@
\if\first_char#2=.\else
\afm_length\a_count{#3}
\ifnum \a_count>\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\else\ifnum \a_count<-\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\fi\fi
\fi\fi
}
\afm_let{KPX}{KP}
+\def\afm_write_setkern#1#2#3{\out_line{\string\setkern{#1}{#2}{#3}}}
\afm_def{C}(#1~;#2){\init_afm{#1}\do_list[#2]\afm_char}
-\afm_let{CH}{C}
+\afm_def{CH}(<#1>~;#2){\uppercase{\init_afm{"#1}}\do_list[#2]\afm_char}
\afm_def{CC}(#1~#2~;#3){\init_cc{#1}\do_list[#3]\cc_char}
\newcount\char_slot
\newcount\char_x_width
@@ -2190,7 +2282,6 @@
\let\char_name=\empty_command
}
\def\afm_char{
- \a_count=-\bbox_lly
\eval_expr{
\italcorr_expression\x_width\bbox_llx\bbox_urx\bbox_lly\bbox_ury
}
@@ -2206,7 +2297,7 @@
{\the\char_slot}
{\the\x_width}
{\the\bbox_ury}
- {\the\a_count}
+ {\number -\bbox_lly}
{\the\result}
}
}
@@ -2257,6 +2348,76 @@
\afm_length\b_count{#3}
\out_lline{\string\glyphpcc{#1}{\the\a_count}{\the\b_count}}
}
+\def\definealias#1#2#3{
+ \expandafter\def \csname GN-#1 \expandafter\endcsname
+ \expandafter{ \csname g-#2 \expandafter\endcsname
+ \csname i-#3\endcsname}
+}
+\def\glyph_alias#1{
+ \expandafter\expandafter \expandafter\glyph_alias_i
+ \csname GN-#1\endcsname
+}
+\def\glyph_alias_i#1#2{
+ \expandafter\gobble_three \string#1
+}
+\let\charnameprefix\empty
+\def\charnamealias#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \glyph_alias{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \glyph_alias{#1}
+ \else
+ #1
+ \fi\fi
+}
+\def\alias_incr#1{
+ \expandafter\expandafter \expandafter\alias_incr_i
+ \csname GN-#1\endcsname
+}
+\def\alias_incr_i#1#2{
+ \ifx#2\x_relax
+ \mathchardef#2=\@ne
+ \else
+ \a_count=#2
+ \advance\a_count\@ne
+ \mathchardef#2=\a_count
+ \fi
+}
+\def\alias_char_name#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{\charnameprefix#1}}
+ }
+ \alias_incr{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{#1}}
+ }
+ \alias_incr{#1}
+ \else
+ \edef\char_name{#1}
+ \fi\fi
+}
+\def\autoaliasafm{
+ \begingroup
+ \list_def{N}(##1){\alias_char_name{##1}}
+ \def\afm_write_setkern##1##2##3{
+ \out_line{
+ \string\setkern{\charnamealias{##1}}{\charnamealias{##2}}{##3}
+ }
+ }
+ \def\init_cc##1{%
+ \edef\char_name{\charnamealias{##1}}
+ \out_line{\string\setglyph{\char_name}}
+ }
+ \list_def{PCC}(##1~##2~##3){
+ \afm_length\a_count{##2}
+ \afm_length\b_count{##3}
+ \out_lline{\string\glyphpcc
+ {\charnamealias{##1}}{\the\a_count}{\the\b_count}}
+ }
+}
+\def\endautoaliasafm{\endgroup}
\def\generalpltomtx#1#2#3#4{{
\let\setsomething_global=\x_relax
\let\setfontdimen=\pl_setfontdimen
@@ -2645,14 +2806,7 @@
\resetstr{etx-name}{#1}
}
\def\mtxtomtx#1#2{{
- \ifisstr{etx-name}\then
- \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
- \directfalse
- \inputetx{\str{etx-name}}
- \edef\a_macro{\string\reencodefont{\str{etx-name}}}
- \else
- \let\a_macro=\empty_command
- \fi
+ \let\a_macro=\empty_command
\_a_true
\ifnum \int{x-scale}=\int{y-scale}
\ifnum \int{slant-scale}=\z@
@@ -2682,6 +2836,20 @@
\out_line{}
\out_line{\string\needsfontinstversion{\fontinstversion}}
\out_line{}
+ \ifisstr{etx-name}\then
+ \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
+ \def\declarepsencoding##1##2##3{
+ \a_toks={{##1}{##2}{##3}}
+ \out_line{\string\providepsencoding\the\a_toks}
+ \ifnum \transform_record_file=\closed_stream \else
+ \pout_line\transform_record_file
+ {\string\providepsencoding\the\a_toks}
+ \fi
+ }
+ \directfalse
+ \inputetx{\str{etx-name}}
+ \edef\a_macro{\a_macro\string\reencodefont{\str{etx-name}}}
+ \fi
\record_transform{#2}{\string\frommtx{#1}}{\a_macro}\iftrue
\out_line{}
\mtxtomtx_redefinitions
@@ -3494,6 +3662,8 @@
\pout_line\transform_record_file{\string\makemapentry{#1}}
\fi
}
+\let\declarepsencoding=\gobble_three
+\let\providepsencoding=\gobble_three
%%% From file: fibasics.dtx
\def\needsfontinstversion#1{{
\a_dimen=#1pt
diff --git a/Master/texmf-dist/tex/fontinst/base/finstmsc.sty b/Master/texmf-dist/tex/fontinst/base/finstmsc.sty
index 170464cd0e9..d2fd613cef0 100644
--- a/Master/texmf-dist/tex/fontinst/base/finstmsc.sty
+++ b/Master/texmf-dist/tex/fontinst/base/finstmsc.sty
@@ -31,13 +31,13 @@
\catcode`\}=2
\catcode`\#=6
\catcode`\^=7
-\def\fontinstversion{1.929}
+\def\fontinstversion{1.933}
\ifx\ProvidesPackage\undefined
\def\NeedsTeXFormat#1{}
\def\ProvidesPackage#1[#2]{}
\fi
\ProvidesPackage{fontinst}
-[2005/02/05 v\fontinstversion\space
+[2007/01/23 v\fontinstversion\space
fontinst installation package]
\def\a_macro#1{\catcode\number`#1=\the\catcode`#1 }
\edef\normalcc{%
@@ -81,9 +81,6 @@
\mathchardef\max_mathchardef="7FFF
\mathchardef\two_thousand=2000
\newdimen\half_point \half_point=0.5pt
-\let\@tempdima\a_dimen
-\let\@tempdimb\b_dimen
-\input trig.sty
\def\x_cs#1#2{\expandafter#1\csname#2\endcsname}
\let\x_relax=\relax
\def\g_let{\global\let}
@@ -806,25 +803,33 @@
\catcode`\/=\active
\catcode`\]=\active
\def/##1[{
+ \encname_to_etx ##1~{#1}{#2}
\a_count=0
\global\missingslotsfalse
- \def/####1~{
- \csname~o-####1\endcsname{
- \ifmissingslots
- \out_line{\string\nextslot{\the\a_count}}
- \fi
- \global\missingslotsfalse
- \out_line{\string\setslot{####1}}
- \out_line{\string\endsetslot}
- \out_line{}
- }
- \advance\a_count by 1
- }
+ \let/=\encslot_to_etx
}
\def]~def{}
\make_etx{#1}{#2}
}}
}
+\def\encname_to_etx#1~#2#3{
+ \out_line{\percent_char\space REMOVE~THE~FOLLOWING~LINE~IF~
+ THIS~FILE~IS~MODIFIED~OR~RENAMED.}
+ \out_line{\string\declarepsencoding{#3}{#1}{\string\download{#2.enc}}}
+ \out_line{}
+}
+\def\encslot_to_etx#1~{
+ \csname o-#1\endcsname{
+ \ifmissingslots
+ \out_line{\string\nextslot{\the\a_count}}
+ \fi
+ \global\missingslotsfalse
+ \out_line{\string\setslot{#1}}
+ \out_line{\string\endsetslot}
+ \out_line{}
+ }
+ \advance\a_count by 1
+}
\def\make_etx#1#2{
\open_out{\temp_prefix#2.etx}
\out_line{\percent_char~Filename:~#2.etx}
@@ -841,13 +846,13 @@
\out_line{\string\relax}
\out_line{}
\out_line{\string\documentclass[twocolumn]{article}}
- \out_line{\string\usepackage{fontdoc}}
+ \out_line{\string\usepackage{fontdoc}[2005/05/13]}
\out_line{}
\out_line{\string\begin{document}}
\out_line{}
\out_line{This~document~describes~the~#1~encoding.}
\out_line{It~was~automatically~generated~by~the}
- \out_line{{\string\tt\space~fontinst}~package.}
+ \out_line{\string\texttt{fontinst}~package.}
\out_line{}
\out_line{\string\encoding}
\out_line{}
@@ -858,7 +863,7 @@
\out_line{\string\end encoding}
\out_line{}
\out_line{\string\end{document}}
- \close_out{Encoding~vector}
+ \close_out{Encoding}
}
\def\notdef_name{.notdef}
\def\etxtoenc#1#2{\begingroup
@@ -1231,9 +1236,15 @@
Check~the~output~file(s)--some~data~was~considered~uncertain}
}
\def\declarepsencoding#1#2#3{\x_cs\gdef{pse-#1}{{#2}{#3}}}
+\def\providepsencoding#1#2#3{
+ \if_undefined{pse-#1}\then
+ \declarepsencoding{#1}{#2}{#3}
+ \fi
+}
\let\download=\gobble_one
\def\fulldownload#1{\download{#1}}
-\declarepsencoding{8r}{TeXBase1Encoding}{\download{8r.enc}}
+\def\encodingdownload#1{\download{#1}}
+\declarepsencoding{8r}{TeXBase1Encoding}{\encodingdownload{8r.enc}}
\declarepsencoding{8a}{StandardEncoding}{}
\def\specifypsfont#1#2{\x_cs\def{psf-#1}{#2}}
\def\AssumeLWFN{\let\get_PS_font_file\LWFN_get_PS_font_file}
@@ -1322,13 +1333,20 @@
\let\debug_values_hook\empty_command
\debugvalue{PS_font_name}
\newtoks\downloads_list
-\def\append_download#1{
- \downloads_list=\expandafter{ \the\downloads_list \download{#1} }
+\def\append_download#1#2{
+ \edef\a_macro{
+ \downloads_list =
+ \noexpand\expandafter{ \noexpand\the \downloads_list
+ \noexpand#1 {#2} }
+ }
+ \a_macro
}
\def\make_dvips{
\downloads_list={}
\let\postscript_code\empty_command
- \let\download\append_download
+ \def\download{\append_download\download}
+ \def\fulldownload{\append_download\fulldownload}
+ \def\encodingdownload{\append_download\encodingdownload}
\ifx \reencode_etx\empty_command \else
\if_undefined{pse-\reencode_etx}\then
\etxtoenc{\reencode_etx}{\reencode_etx}
@@ -1366,12 +1384,14 @@
\fi\fi
\if_a_
\ifx \PS_font_file\unknown_str \get_PS_font_file \fi
- \append_download{\PS_font_file}
+ \append_download\download{\PS_font_file}
\ifx \PS_font_file\clueless_str
\includewarning\warn_undecided_data
\fi
\fi
\def\download##1{~<##1}
+ \def\fulldownload##1{~<<##1}
+ \def\encodingdownload##1{~<[##1}
\pout_line\output_dvips{
\TeX_font_name\space\PS_font_name
\expandafter\empty_command \the\downloads_list
diff --git a/Master/texmf-dist/tex/fontinst/base/fontinst.sty b/Master/texmf-dist/tex/fontinst/base/fontinst.sty
index a15f50fb7c6..c19adcf8386 100644
--- a/Master/texmf-dist/tex/fontinst/base/fontinst.sty
+++ b/Master/texmf-dist/tex/fontinst/base/fontinst.sty
@@ -7,6 +7,7 @@
%% fibasics.dtx (with options: `pkg')
%% ficommon.dtx (with options: `pkg')
%% fimain.dtx (with options: `pkg')
+%% fitrig.dtx (with options: `pkg')
%% ficonv.dtx (with options: `pkg')
%% filtfam.dtx (with options: `pkg,textcomp,debug')
%% fimapgen.dtx (with options: `pkg')
@@ -32,13 +33,13 @@
\catcode`\}=2
\catcode`\#=6
\catcode`\^=7
-\def\fontinstversion{1.929}
+\def\fontinstversion{1.933}
\ifx\ProvidesPackage\undefined
\def\NeedsTeXFormat#1{}
\def\ProvidesPackage#1[#2]{}
\fi
\ProvidesPackage{fontinst}
-[2005/02/05 v\fontinstversion\space
+[2007/01/23 v\fontinstversion\space
fontinst installation package]
\def\a_macro#1{\catcode\number`#1=\the\catcode`#1 }
\edef\normalcc{%
@@ -82,9 +83,6 @@
\mathchardef\max_mathchardef="7FFF
\mathchardef\two_thousand=2000
\newdimen\half_point \half_point=0.5pt
-\let\@tempdima\a_dimen
-\let\@tempdimb\b_dimen
-\input trig.sty
\def\x_cs#1#2{\expandafter#1\csname#2\endcsname}
\let\x_relax=\relax
\def\g_let{\global\let}
@@ -1190,12 +1188,17 @@
\moveup{#3}
\glyph{\glyph_name_modifier{#1}}{\one_thousand}
\pop
+ \else\ifisglyph{\glyph_name_modifier{#1}-not}\then
+ \fontinstwarning{\string\glyphpcc}{
+ Base~glyph~`\glyph_name_modifier{#1}'~not~appended,\messagebreak
+ because~it~is~so~far~unencoded~in~the~glyph~base
+ }
\else
\fontinsterror{\string\glyphpcc}{
- Base~glyph~not~set.\messagebreak
- This~could~be~a~sign~that~the~AFM~file~is~buggy
+ Base~glyph~not~set.\messagebreak
+ This~could~be~a~sign~that~the~AFM~file~is~buggy
}\error_help_a
- \fi
+ \fi\fi
}
\def\glyphbboxright{\max\glyph_width\glyph_maxhpos}
\def\samesize#1{
@@ -1980,14 +1983,18 @@
\fi
\fi
}
-\def\substitutesilent#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{ssub}
-}
-\def\substitutenoisy#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{sub}
+\def\substitute_generic#1#2#3{
+ \edef\a_macro{#2}
+ \edef\b_macro{#3}
+ \ifx \a_macro \b_macro
+ \x_cs\let{sub-#3}\undefined_command
+ \else
+ \x_cs\let{sub-#3}\a_macro
+ \x_cs\def{typ-#3}{#1}
+ \fi
}
+\def\substitutesilent{\substitute_generic{ssub}}
+\def\substitutenoisy{\substitute_generic{sub}}
\substitutesilent{bx}{b}
\substitutesilent{b}{bx}
\substitutesilent{b}{sb}
@@ -2052,6 +2059,89 @@
\out_line{\percent_char~Created~whilst~debugging~fontinst.}
\close_out{Test~file}
}
+%%% From file: fitrig.dtx
+\chardef\nin@ty=90
+\chardef\@clxxx=180
+\chardef\@lxxi=71
+\mathchardef\@mmmmlxviii=4068
+\chardef\@coeffz=72
+\chardef\@coefb=42
+\mathchardef\@coefc=840
+\mathchardef\@coefd=5040
+\def\TG@rem@pt#1{\expandafter\lose_measure\the#1\space}
+\def\TG@term#1{
+ \dimen@\@tempb\dimen@
+ \advance\dimen@ #1\p@
+}
+\def\TG@series{
+ \dimen@\@lxxi\dimen@
+ \divide \dimen@ \@mmmmlxviii
+ \edef\@tempa{\TG@rem@pt\dimen@}
+ \dimen@\@tempa\dimen@
+ \edef\@tempb{\TG@rem@pt\dimen@}
+ \divide\dimen@\@coeffz
+ \advance\dimen@\m@ne\p@
+ \TG@term\@coefb
+ \TG@term{-\@coefc}%
+ \TG@term\@coefd
+ \dimen@\@tempa\dimen@
+ \divide\dimen@ \@coefd
+}
+\def\CalculateSin#1{{%
+ \if_undefined{sin(\number#1)}\then
+ \dimen@=#1\p@
+ \TG@@sin
+ \x_cs\xdef{sin(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\CalculateCos#1{{%
+ \if_undefined{cos(\number#1)}\then
+ \dimen@=\nin@ty\p@
+ \advance \dimen@ -#1\p@
+ \TG@@sin
+ \x_cs\xdef{cos(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\TG@@sin{%
+ \ifdim\TG@reduce>+%
+ \else\ifdim\TG@reduce<-%
+ \else\TG@series\fi\fi
+}
+\def\TG@reduce#1#2{
+ \dimen@#1#2\nin@ty\p@
+ \advance\dimen@#2-\@clxxx\p@
+ \dimen@-\dimen@
+ \TG@@sin
+}
+\def\UseSin#1{\csname sin(\number#1)\endcsname}
+\def\UseCos#1{\csname cos(\number#1)\endcsname}
+\chardef\z@num\z@
+\x_cs\let{sin(0)} \z@num
+\x_cs\let{cos(0)} \@ne
+\x_cs\let{sin(90)} \@ne
+\x_cs\let{cos(90)} \z@num
+\x_cs\let{sin(-90)}\m@ne
+\x_cs\let{cos(-90)}\z@num
+\x_cs\let{sin(180)}\z@num
+\x_cs\let{cos(180)}\m@ne
+\def\CalculateTan#1{{%
+ \if_undefined{tan(\number#1)}\then
+ \CalculateSin{#1}%
+ \CalculateCos{#1}%
+ \a_dimen\UseCos{#1}\p@
+ \divide \a_dimen \@iv
+ \b_dimen\UseSin{#1}\p@
+ \b_dimen\two@fourteen\b_dimen
+ \divide\b_dimen\a_dimen
+ \x_cs\xdef{tan(\number#1)}{\TG@rem@pt\b_dimen}
+ \fi
+}}
+\def\UseTan#1{\csname tan(\number#1)\endcsname}
+\mathchardef\two@fourteen=16384
+\chardef\@iv=4
+\x_cs\def{tan(90)}{\errmessage{Infinite tan !}}
+\expandafter\let
+ \csname tan(-90)\expandafter\endcsname \csname tan(90)\endcsname
%%% From file: ficonv.dtx
\def\afmtomtx#1#2{{
\let\setsomething_global=\x_relax
@@ -2105,8 +2195,9 @@
\def\afm_command#1~{\csname~afm-#1\endcsname\gobble_one_line}
\def\gobble_one_line#1\end_of_line{}
\x_cs\def{afm-EndFontMetrics}#1\afm_line{\endinput}
-\def\afm_def#1(#2)#3{\x_cs\def{afm-#1}
- \gobble_one_line#2\end_of_line{#3}}
+\def\afm_def#1(#2)#3{
+ \x_cs\def{afm-#1}\gobble_one_line#2\end_of_line{#3}
+}
\def\afm_let#1#2{
\expandafter\let \csname afm-#1\expandafter\endcsname
\csname afm-#2\endcsname
@@ -2150,15 +2241,16 @@
\if\first_char#2=.\else
\afm_length\a_count{#3}
\ifnum \a_count>\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\else\ifnum \a_count<-\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\fi\fi
\fi\fi
}
\afm_let{KPX}{KP}
+\def\afm_write_setkern#1#2#3{\out_line{\string\setkern{#1}{#2}{#3}}}
\afm_def{C}(#1~;#2){\init_afm{#1}\do_list[#2]\afm_char}
-\afm_let{CH}{C}
+\afm_def{CH}(<#1>~;#2){\uppercase{\init_afm{"#1}}\do_list[#2]\afm_char}
\afm_def{CC}(#1~#2~;#3){\init_cc{#1}\do_list[#3]\cc_char}
\newcount\char_slot
\newcount\char_x_width
@@ -2178,7 +2270,6 @@
\let\char_name=\empty_command
}
\def\afm_char{
- \a_count=-\bbox_lly
\eval_expr{
\italcorr_expression\x_width\bbox_llx\bbox_urx\bbox_lly\bbox_ury
}
@@ -2194,7 +2285,7 @@
{\the\char_slot}
{\the\x_width}
{\the\bbox_ury}
- {\the\a_count}
+ {\number -\bbox_lly}
{\the\result}
}
}
@@ -2245,6 +2336,76 @@
\afm_length\b_count{#3}
\out_lline{\string\glyphpcc{#1}{\the\a_count}{\the\b_count}}
}
+\def\definealias#1#2#3{
+ \expandafter\def \csname GN-#1 \expandafter\endcsname
+ \expandafter{ \csname g-#2 \expandafter\endcsname
+ \csname i-#3\endcsname}
+}
+\def\glyph_alias#1{
+ \expandafter\expandafter \expandafter\glyph_alias_i
+ \csname GN-#1\endcsname
+}
+\def\glyph_alias_i#1#2{
+ \expandafter\gobble_three \string#1
+}
+\let\charnameprefix\empty
+\def\charnamealias#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \glyph_alias{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \glyph_alias{#1}
+ \else
+ #1
+ \fi\fi
+}
+\def\alias_incr#1{
+ \expandafter\expandafter \expandafter\alias_incr_i
+ \csname GN-#1\endcsname
+}
+\def\alias_incr_i#1#2{
+ \ifx#2\x_relax
+ \mathchardef#2=\@ne
+ \else
+ \a_count=#2
+ \advance\a_count\@ne
+ \mathchardef#2=\a_count
+ \fi
+}
+\def\alias_char_name#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{\charnameprefix#1}}
+ }
+ \alias_incr{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{#1}}
+ }
+ \alias_incr{#1}
+ \else
+ \edef\char_name{#1}
+ \fi\fi
+}
+\def\autoaliasafm{
+ \begingroup
+ \list_def{N}(##1){\alias_char_name{##1}}
+ \def\afm_write_setkern##1##2##3{
+ \out_line{
+ \string\setkern{\charnamealias{##1}}{\charnamealias{##2}}{##3}
+ }
+ }
+ \def\init_cc##1{%
+ \edef\char_name{\charnamealias{##1}}
+ \out_line{\string\setglyph{\char_name}}
+ }
+ \list_def{PCC}(##1~##2~##3){
+ \afm_length\a_count{##2}
+ \afm_length\b_count{##3}
+ \out_lline{\string\glyphpcc
+ {\charnamealias{##1}}{\the\a_count}{\the\b_count}}
+ }
+}
+\def\endautoaliasafm{\endgroup}
\def\generalpltomtx#1#2#3#4{{
\let\setsomething_global=\x_relax
\let\setfontdimen=\pl_setfontdimen
@@ -2633,14 +2794,7 @@
\resetstr{etx-name}{#1}
}
\def\mtxtomtx#1#2{{
- \ifisstr{etx-name}\then
- \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
- \directfalse
- \inputetx{\str{etx-name}}
- \edef\a_macro{\string\reencodefont{\str{etx-name}}}
- \else
- \let\a_macro=\empty_command
- \fi
+ \let\a_macro=\empty_command
\_a_true
\ifnum \int{x-scale}=\int{y-scale}
\ifnum \int{slant-scale}=\z@
@@ -2670,6 +2824,20 @@
\out_line{}
\out_line{\string\needsfontinstversion{\fontinstversion}}
\out_line{}
+ \ifisstr{etx-name}\then
+ \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
+ \def\declarepsencoding##1##2##3{
+ \a_toks={{##1}{##2}{##3}}
+ \out_line{\string\providepsencoding\the\a_toks}
+ \ifnum \transform_record_file=\closed_stream \else
+ \pout_line\transform_record_file
+ {\string\providepsencoding\the\a_toks}
+ \fi
+ }
+ \directfalse
+ \inputetx{\str{etx-name}}
+ \edef\a_macro{\a_macro\string\reencodefont{\str{etx-name}}}
+ \fi
\record_transform{#2}{\string\frommtx{#1}}{\a_macro}\iftrue
\out_line{}
\mtxtomtx_redefinitions
@@ -3482,6 +3650,8 @@
\pout_line\transform_record_file{\string\makemapentry{#1}}
\fi
}
+\let\declarepsencoding=\gobble_three
+\let\providepsencoding=\gobble_three
%%% From file: fibasics.dtx
\def\needsfontinstversion#1{{
\a_dimen=#1pt
diff --git a/Master/texmf-dist/tex/fontinst/base/multislot.sty b/Master/texmf-dist/tex/fontinst/base/multislot.sty
new file mode 100644
index 00000000000..fac72144059
--- /dev/null
+++ b/Master/texmf-dist/tex/fontinst/base/multislot.sty
@@ -0,0 +1,234 @@
+% multislot.sty
+%
+% Second version
+
+
+\needsfontinstversion{1.900}
+% Relies heavily on _etx_pass_hook commands.
+
+
+%%%%%%%%%%%%%%% RESOURCES USED %%%%%%%%%%%%%%%
+%
+% The following classes of control sequences are used by the multislot
+% routines, in addition to the ones defined below and the ones fontinst
+% normally uses:
+%
+% \name-NUM
+%
+% where NUM is a number consisting of one, two, or three decimal digits.
+% These are also used by \pltomtx, so they probably already exist as
+% hash table entries.
+
+
+
+%%%%%%%%%%%%%%% SAVE CATCODES %%%%%%%%%%%%%%%
+%
+% Save the current values of the catcodes of space, @, NL, ~ and _.
+% _ and @ are made letters, ~ is a space, and space and NL are ignored.
+
+\edef\spacecatcode{\the\catcode`\ }
+\edef\atcatcode{\the\catcode`\@}
+\edef\nlcatcode{\the\catcode`\^^M}
+\edef\underscorecatcode{\the\catcode`\_}
+\edef\tildecatcode{\the\catcode`\~}
+
+\catcode`\ =9
+\catcode`\^^M=9
+\catcode`\@=11
+\catcode`\_=11
+\catcode`\~=10
+
+
+%%%%%%%%%%%%%%% MULTIPLE SLOT COMMANDS %%%%%%%%%%%%%%%
+%
+% The user-level commands are quite simple. As usual, you can write
+%
+% \setslot{NAME}
+% <slot commands>
+% \endsetslot
+%
+% to assign a glyph to a slot. The difference is that if there are
+% multiple \setslot commands for a slot, this will no longer cause
+% strange results. Instead, only the first \setslot-\endsetslot pair
+% for each slot will be used, the others are ignored.
+%
+% If you instead write
+%
+% \resetslot{NAME}
+% <slot commands>
+% \endsetslot
+%
+% then this will override any earlier occurences of \setslot or
+% \resetslot. Finally, there is the command
+%
+% \unsetslot{NUMBER}
+%
+% which makes fontinst forget any earlier occurences of \setslot
+% or \resetslot commands for that particular slot.
+
+
+% The way this works is that every \setslot or \resetslot command is
+% implicitly assigned an index, namely the number of such commands
+% perviously encountered since the start of the ETX pass. The count
+% register \slot_index is allocated to keep track of the current
+% index:
+
+\newcount\slot_index
+\def\clear_slot_index{\slot_index=\m@ne}
+\add_to\pre_first_etx_pass_hook{\clear_slot_index}
+\add_to\pre_second_etx_pass_hook{\clear_slot_index}
+\add_to\pre_third_etx_pass_hook{\clear_slot_index}
+\add_to\pre_fourth_etx_pass_hook{\clear_slot_index}
+
+% \setslot, \setleftboundary, and \setrightboundary increments the
+% counter just before checking it.
+
+
+
+% The point of maintaining the index is that the index of the
+% \setslot (or whatever) that actually sets a particular slot gets
+% stored in the \name-SLOT control sequence (which is \mathchardef'ed
+% to the index). After assignments are made, all a \setslot (or
+% whatever) needs to do is to check whether the stored index matches
+% the current one, and gobble itself if they don't.
+
+% The basic check is performed by the command \later_index_check.
+% This has the syntax
+%
+% \later_index_check{SLOT}{<else-code>}
+%
+% and expands to nothing if this \setslot will be active, but to
+% <else-code> if it will not.
+\def\later_index_check#1{
+ \x_cs\ifnum {name-#1}=\slot_index
+ \expandafter\gobble_one
+ \else
+ \expandafter\identity_one
+ \fi
+}
+% However, when deciding which \setslots will be active, the condition
+% to test is slightly different: is the control sequence in question
+% already defined to be a mathchar token? If it isn't, then this will
+% be the active \setslot.
+\def\setslot_index_check#1{\x_cs\setslot_index_check_i{name-#1}}
+\def\temp_command#1{
+ \def\setslot_index_check_ii##1#1##2\setslot_index_check_ii{##1}
+ \def\setslot_index_check_i##1{
+ \expandafter\setslot_index_check_ii \expandafter\ifx
+ \expandafter$ \meaning##1 #1 0 \setslot_index_check_ii $
+ \expandafter\identity_one
+ \else
+ \mathchardef##1=\slot_index
+ \expandafter\gobble_one
+ \fi
+ }
+}
+\expandafter\temp_command \expandafter{ \string\mathchar " }
+
+% The stated definition of \setslot_index_check should thus be in
+% force during the first etx pass, but after that the
+% \later_index_check definition should rule.
+\add_to\post_first_etx_pass_hook{
+ \let\setslot_index_check=\later_index_check
+}
+
+% The following is used to ignore a \setslot--\endsetslot or
+% \setleftboundary--\endsetleftboundary construction; the argument is
+% the command which marks the end. The reason not to use
+% \gobble_setslot is that it still executes \end_do_slot, which is
+% quite wrong for the kind of ignoring done here.
+\def\ignore_to_end#1{
+ \bgroup
+ \let#1=\fi
+ \expandafter
+ \egroup
+ \iffalse
+}
+
+
+% The \setslot, \setleftboundary, and \setrightboundary commands must
+% be equipped with checks at the start.
+\def\checked_setslot{
+ \advance \slot_index \@ne
+ \setslot_index_check{\the\slot_number}{
+ \advance \slot_number \@ne
+ \ignore_to_end\endsetslot
+ }
+ \unchecked_setslot
+}
+
+\def\checked_setleftboundary{
+ \advance \slot_index \@ne
+ \setslot_index_check{leftboundary}{\ignore_to_end\endsetleftboundary}
+ \unchecked_setleftboundary
+}
+
+\def\checked_setrightboundary#1{
+ \advance \slot_index \@ne
+ \setslot_index_check{\the\slot_number}{
+ \advance \slot_number \@ne
+ \gobble_two
+ }
+ \unchecked_setrightboundary{#1}
+}
+\add_to\pre_first_etx_pass_hook{
+ \let\unchecked_setslot=\setslot
+ \let\setslot=\checked_setslot
+ \let\unchecked_setleftboundary=\setleftboundary
+ \let\setleftboundary=\checked_setleftboundary
+ \let\unchecked_setrightboundary=\setrightboundary
+ \let\setrightboundary=\checked_setrightboundary
+}
+% But that's it, as far as the \set... commands are concerned.
+
+
+% What about \unsetslot? In principle, it _should_ just be a matter of
+\def\unsetslot#1{
+ \eval_expr{#1}
+ \x_cs\let{name-\the\result}\undefined_command
+}
+\add_to\post_first_etx_pass_hook{\let\unsetslot=\gobble_one}
+% given which \resetslot is simply
+\def\resetslot{\unsetslot\slot_number \setslot}
+% and this sort-of works, but not quite.
+%
+% The problem is that the ordinary slot assignment table, which is
+% used for ligature and kerning instructions, is not updated by
+% \unsetslot. Hence ligatures and kerns will be generated as if all
+% glyphs that have been set for a slot are present there; after
+%
+% \nextslot{108}
+% \setslot{l} \endsetslot
+%
+% \nextslot{108}
+% \resetslot{lambda} \endsetslot
+%
+% the effect will be as if one had given the command
+%
+% \setleftkerning{lambda}{l}{1000}
+%
+% and moreover the same happens for ligatures, so an f + l -> fl
+% ligature will also work as an f + lambda -> fl ligature.
+%
+% This is of course a BUG, and there doesn't seem to be any way
+% around it, short of adding another pass of reading ETX files. Doing
+% so would probably not be worth the effort, since the usefulness of
+% a \resetslot command is not clear; unlike \resetglyph, it cannot be
+% used to amend an existing \set..., but only to override it.
+
+
+
+%%%%%%%%%%%%%%% RESTORE CATCODES %%%%%%%%%%%%%%%
+%
+% Restore the catcodes that were changed.
+
+\catcode`\@=\atcatcode
+\catcode`\^^M=\nlcatcode
+\catcode`\ =\spacecatcode
+\catcode`\~=\tildecatcode
+\catcode`\_=\underscorecatcode
+
+%%%%%%%%%%%%%%% THE END %%%%%%%%%%%%%%%
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/fontinst/base/xfntinst.sty b/Master/texmf-dist/tex/fontinst/base/xfntinst.sty
index c969deab6b3..d13e9746234 100644
--- a/Master/texmf-dist/tex/fontinst/base/xfntinst.sty
+++ b/Master/texmf-dist/tex/fontinst/base/xfntinst.sty
@@ -7,6 +7,7 @@
%% fibasics.dtx (with options: `pkg')
%% ficommon.dtx (with options: `pkg')
%% fimain.dtx (with options: `pkg')
+%% fitrig.dtx (with options: `pkg')
%% ficonv.dtx (with options: `pkg')
%% filtfam.dtx (with options: `pkg,textcomp,debug,oldstyle')
%% fimapgen.dtx (with options: `pkg')
@@ -32,13 +33,13 @@
\catcode`\}=2
\catcode`\#=6
\catcode`\^=7
-\def\fontinstversion{1.929}
+\def\fontinstversion{1.933}
\ifx\ProvidesPackage\undefined
\def\NeedsTeXFormat#1{}
\def\ProvidesPackage#1[#2]{}
\fi
\ProvidesPackage{fontinst}
-[2005/02/05 v\fontinstversion\space
+[2007/01/23 v\fontinstversion\space
fontinst installation package]
\def\a_macro#1{\catcode\number`#1=\the\catcode`#1 }
\edef\normalcc{%
@@ -82,9 +83,6 @@
\mathchardef\max_mathchardef="7FFF
\mathchardef\two_thousand=2000
\newdimen\half_point \half_point=0.5pt
-\let\@tempdima\a_dimen
-\let\@tempdimb\b_dimen
-\input trig.sty
\def\x_cs#1#2{\expandafter#1\csname#2\endcsname}
\let\x_relax=\relax
\def\g_let{\global\let}
@@ -1190,12 +1188,17 @@
\moveup{#3}
\glyph{\glyph_name_modifier{#1}}{\one_thousand}
\pop
+ \else\ifisglyph{\glyph_name_modifier{#1}-not}\then
+ \fontinstwarning{\string\glyphpcc}{
+ Base~glyph~`\glyph_name_modifier{#1}'~not~appended,\messagebreak
+ because~it~is~so~far~unencoded~in~the~glyph~base
+ }
\else
\fontinsterror{\string\glyphpcc}{
- Base~glyph~not~set.\messagebreak
- This~could~be~a~sign~that~the~AFM~file~is~buggy
+ Base~glyph~not~set.\messagebreak
+ This~could~be~a~sign~that~the~AFM~file~is~buggy
}\error_help_a
- \fi
+ \fi\fi
}
\def\glyphbboxright{\max\glyph_width\glyph_maxhpos}
\def\samesize#1{
@@ -1980,14 +1983,18 @@
\fi
\fi
}
-\def\substitutesilent#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{ssub}
-}
-\def\substitutenoisy#1#2{
- \x_cs\def{sub-#2}{#1}
- \x_cs\def{typ-#2}{sub}
+\def\substitute_generic#1#2#3{
+ \edef\a_macro{#2}
+ \edef\b_macro{#3}
+ \ifx \a_macro \b_macro
+ \x_cs\let{sub-#3}\undefined_command
+ \else
+ \x_cs\let{sub-#3}\a_macro
+ \x_cs\def{typ-#3}{#1}
+ \fi
}
+\def\substitutesilent{\substitute_generic{ssub}}
+\def\substitutenoisy{\substitute_generic{sub}}
\substitutesilent{bx}{b}
\substitutesilent{b}{bx}
\substitutesilent{b}{sb}
@@ -2052,6 +2059,89 @@
\out_line{\percent_char~Created~whilst~debugging~fontinst.}
\close_out{Test~file}
}
+%%% From file: fitrig.dtx
+\chardef\nin@ty=90
+\chardef\@clxxx=180
+\chardef\@lxxi=71
+\mathchardef\@mmmmlxviii=4068
+\chardef\@coeffz=72
+\chardef\@coefb=42
+\mathchardef\@coefc=840
+\mathchardef\@coefd=5040
+\def\TG@rem@pt#1{\expandafter\lose_measure\the#1\space}
+\def\TG@term#1{
+ \dimen@\@tempb\dimen@
+ \advance\dimen@ #1\p@
+}
+\def\TG@series{
+ \dimen@\@lxxi\dimen@
+ \divide \dimen@ \@mmmmlxviii
+ \edef\@tempa{\TG@rem@pt\dimen@}
+ \dimen@\@tempa\dimen@
+ \edef\@tempb{\TG@rem@pt\dimen@}
+ \divide\dimen@\@coeffz
+ \advance\dimen@\m@ne\p@
+ \TG@term\@coefb
+ \TG@term{-\@coefc}%
+ \TG@term\@coefd
+ \dimen@\@tempa\dimen@
+ \divide\dimen@ \@coefd
+}
+\def\CalculateSin#1{{%
+ \if_undefined{sin(\number#1)}\then
+ \dimen@=#1\p@
+ \TG@@sin
+ \x_cs\xdef{sin(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\CalculateCos#1{{%
+ \if_undefined{cos(\number#1)}\then
+ \dimen@=\nin@ty\p@
+ \advance \dimen@ -#1\p@
+ \TG@@sin
+ \x_cs\xdef{cos(\number#1)}{\TG@rem@pt\dimen@}
+ \fi
+}}
+\def\TG@@sin{%
+ \ifdim\TG@reduce>+%
+ \else\ifdim\TG@reduce<-%
+ \else\TG@series\fi\fi
+}
+\def\TG@reduce#1#2{
+ \dimen@#1#2\nin@ty\p@
+ \advance\dimen@#2-\@clxxx\p@
+ \dimen@-\dimen@
+ \TG@@sin
+}
+\def\UseSin#1{\csname sin(\number#1)\endcsname}
+\def\UseCos#1{\csname cos(\number#1)\endcsname}
+\chardef\z@num\z@
+\x_cs\let{sin(0)} \z@num
+\x_cs\let{cos(0)} \@ne
+\x_cs\let{sin(90)} \@ne
+\x_cs\let{cos(90)} \z@num
+\x_cs\let{sin(-90)}\m@ne
+\x_cs\let{cos(-90)}\z@num
+\x_cs\let{sin(180)}\z@num
+\x_cs\let{cos(180)}\m@ne
+\def\CalculateTan#1{{%
+ \if_undefined{tan(\number#1)}\then
+ \CalculateSin{#1}%
+ \CalculateCos{#1}%
+ \a_dimen\UseCos{#1}\p@
+ \divide \a_dimen \@iv
+ \b_dimen\UseSin{#1}\p@
+ \b_dimen\two@fourteen\b_dimen
+ \divide\b_dimen\a_dimen
+ \x_cs\xdef{tan(\number#1)}{\TG@rem@pt\b_dimen}
+ \fi
+}}
+\def\UseTan#1{\csname tan(\number#1)\endcsname}
+\mathchardef\two@fourteen=16384
+\chardef\@iv=4
+\x_cs\def{tan(90)}{\errmessage{Infinite tan !}}
+\expandafter\let
+ \csname tan(-90)\expandafter\endcsname \csname tan(90)\endcsname
%%% From file: ficonv.dtx
\def\afmtomtx#1#2{{
\let\setsomething_global=\x_relax
@@ -2105,8 +2195,9 @@
\def\afm_command#1~{\csname~afm-#1\endcsname\gobble_one_line}
\def\gobble_one_line#1\end_of_line{}
\x_cs\def{afm-EndFontMetrics}#1\afm_line{\endinput}
-\def\afm_def#1(#2)#3{\x_cs\def{afm-#1}
- \gobble_one_line#2\end_of_line{#3}}
+\def\afm_def#1(#2)#3{
+ \x_cs\def{afm-#1}\gobble_one_line#2\end_of_line{#3}
+}
\def\afm_let#1#2{
\expandafter\let \csname afm-#1\expandafter\endcsname
\csname afm-#2\endcsname
@@ -2150,15 +2241,16 @@
\if\first_char#2=.\else
\afm_length\a_count{#3}
\ifnum \a_count>\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\else\ifnum \a_count<-\minimum_kern
- \out_line{\string\setkern{#1}{#2}{\the\a_count}}
+ \afm_write_setkern{#1}{#2}{\the\a_count}
\fi\fi
\fi\fi
}
\afm_let{KPX}{KP}
+\def\afm_write_setkern#1#2#3{\out_line{\string\setkern{#1}{#2}{#3}}}
\afm_def{C}(#1~;#2){\init_afm{#1}\do_list[#2]\afm_char}
-\afm_let{CH}{C}
+\afm_def{CH}(<#1>~;#2){\uppercase{\init_afm{"#1}}\do_list[#2]\afm_char}
\afm_def{CC}(#1~#2~;#3){\init_cc{#1}\do_list[#3]\cc_char}
\newcount\char_slot
\newcount\char_x_width
@@ -2178,7 +2270,6 @@
\let\char_name=\empty_command
}
\def\afm_char{
- \a_count=-\bbox_lly
\eval_expr{
\italcorr_expression\x_width\bbox_llx\bbox_urx\bbox_lly\bbox_ury
}
@@ -2194,7 +2285,7 @@
{\the\char_slot}
{\the\x_width}
{\the\bbox_ury}
- {\the\a_count}
+ {\number -\bbox_lly}
{\the\result}
}
}
@@ -2245,6 +2336,76 @@
\afm_length\b_count{#3}
\out_lline{\string\glyphpcc{#1}{\the\a_count}{\the\b_count}}
}
+\def\definealias#1#2#3{
+ \expandafter\def \csname GN-#1 \expandafter\endcsname
+ \expandafter{ \csname g-#2 \expandafter\endcsname
+ \csname i-#3\endcsname}
+}
+\def\glyph_alias#1{
+ \expandafter\expandafter \expandafter\glyph_alias_i
+ \csname GN-#1\endcsname
+}
+\def\glyph_alias_i#1#2{
+ \expandafter\gobble_three \string#1
+}
+\let\charnameprefix\empty
+\def\charnamealias#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \glyph_alias{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \glyph_alias{#1}
+ \else
+ #1
+ \fi\fi
+}
+\def\alias_incr#1{
+ \expandafter\expandafter \expandafter\alias_incr_i
+ \csname GN-#1\endcsname
+}
+\def\alias_incr_i#1#2{
+ \ifx#2\x_relax
+ \mathchardef#2=\@ne
+ \else
+ \a_count=#2
+ \advance\a_count\@ne
+ \mathchardef#2=\a_count
+ \fi
+}
+\def\alias_char_name#1{
+ \if_defined{GN-\charnameprefix#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{\charnameprefix#1}}
+ }
+ \alias_incr{\charnameprefix#1}
+ \else\if_defined{GN-#1}\then
+ \edef\char_name{
+ \string\aliased{#1}{\glyph_alias{#1}}
+ }
+ \alias_incr{#1}
+ \else
+ \edef\char_name{#1}
+ \fi\fi
+}
+\def\autoaliasafm{
+ \begingroup
+ \list_def{N}(##1){\alias_char_name{##1}}
+ \def\afm_write_setkern##1##2##3{
+ \out_line{
+ \string\setkern{\charnamealias{##1}}{\charnamealias{##2}}{##3}
+ }
+ }
+ \def\init_cc##1{%
+ \edef\char_name{\charnamealias{##1}}
+ \out_line{\string\setglyph{\char_name}}
+ }
+ \list_def{PCC}(##1~##2~##3){
+ \afm_length\a_count{##2}
+ \afm_length\b_count{##3}
+ \out_lline{\string\glyphpcc
+ {\charnamealias{##1}}{\the\a_count}{\the\b_count}}
+ }
+}
+\def\endautoaliasafm{\endgroup}
\def\generalpltomtx#1#2#3#4{{
\let\setsomething_global=\x_relax
\let\setfontdimen=\pl_setfontdimen
@@ -2633,14 +2794,7 @@
\resetstr{etx-name}{#1}
}
\def\mtxtomtx#1#2{{
- \ifisstr{etx-name}\then
- \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
- \directfalse
- \inputetx{\str{etx-name}}
- \edef\a_macro{\string\reencodefont{\str{etx-name}}}
- \else
- \let\a_macro=\empty_command
- \fi
+ \let\a_macro=\empty_command
\_a_true
\ifnum \int{x-scale}=\int{y-scale}
\ifnum \int{slant-scale}=\z@
@@ -2670,6 +2824,20 @@
\out_line{}
\out_line{\string\needsfontinstversion{\fontinstversion}}
\out_line{}
+ \ifisstr{etx-name}\then
+ \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
+ \def\declarepsencoding##1##2##3{
+ \a_toks={{##1}{##2}{##3}}
+ \out_line{\string\providepsencoding\the\a_toks}
+ \ifnum \transform_record_file=\closed_stream \else
+ \pout_line\transform_record_file
+ {\string\providepsencoding\the\a_toks}
+ \fi
+ }
+ \directfalse
+ \inputetx{\str{etx-name}}
+ \edef\a_macro{\a_macro\string\reencodefont{\str{etx-name}}}
+ \fi
\record_transform{#2}{\string\frommtx{#1}}{\a_macro}\iftrue
\out_line{}
\mtxtomtx_redefinitions
@@ -3581,6 +3749,8 @@
\pout_line\transform_record_file{\string\makemapentry{#1}}
\fi
}
+\let\declarepsencoding=\gobble_three
+\let\providepsencoding=\gobble_three
%%% From file: fibasics.dtx
\def\needsfontinstversion#1{{
\a_dimen=#1pt