diff options
Diffstat (limited to 'Master/texmf-dist/tex/fontinst/base/finstmsc.sty')
-rw-r--r-- | Master/texmf-dist/tex/fontinst/base/finstmsc.sty | 91 |
1 files changed, 88 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/fontinst/base/finstmsc.sty b/Master/texmf-dist/tex/fontinst/base/finstmsc.sty index cb64adfb232..170464cd0e9 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.927} +\def\fontinstversion{1.929} \ifx\ProvidesPackage\undefined \def\NeedsTeXFormat#1{} \def\ProvidesPackage#1[#2]{} \fi \ProvidesPackage{fontinst} -[2004/08/07 v\fontinstversion\space +[2005/02/05 v\fontinstversion\space fontinst installation package] \def\a_macro#1{\catcode\number`#1=\the\catcode`#1 } \edef\normalcc{% @@ -362,6 +362,27 @@ \catcode`\t=12 \gdef\lose_measure#1pt{#1} } +\def\format_hex_i#1#2{ + \if #2i \else + \b_count=\a_count + \divide \a_count \sixt@@n + \c_count=\a_count + \multiply \c_count \sixt@@n + \advance \b_count -\c_count + \edef#1{ + \ifcase\b_count 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or + 9\or a\or b\or c\or d\or e\or f\fi + #1 + } + \expandafter\format_hex_i \expandafter#1 + \fi +} +\def\format_hex#1#2#3{ + \a_count=#2 + \let#1\empty_command + \expandafter\format_hex_i \expandafter#1 \romannumeral + \expandafter\identity_one\expandafter{\number#3}001~ +} \let\messagebreak\x_relax \def\generic_info#1#2{ \begingroup @@ -546,7 +567,6 @@ \expandafter\if_false \fi } - \let\setsomething_global=\x_relax \def\x_setint#1#2{ \x_cs\ifx{i-#1}\x_relax @@ -734,6 +754,7 @@ \let\usedas=\gobble_two \let\makerightboundary=\gobble_one \let\Unicode=\gobble_two +\let\charseq=\gobble_one \let\varchar=\empty_command \let\vartop=\gobble_one \let\varmid=\gobble_one @@ -937,6 +958,69 @@ \out_line{\percent_char\four_spaces #1~=~"See~file~#2",} \fi } +\def\write_cmap_body#1{ + \out_line{1~begincodespacerange~<00>~<FF>~endcodespacerange} + \let\do_slot=\_a_true + \def\Unicode##1##2{\cmap_charseq{\cmap_codepoint{##1}{##2}}} + \let\charseq=\cmap_charseq + \inputetx{#1} +} +\def\cmap_codepoint#1#2{ + \uppercase{\a_count="#1\x_relax} + \ifnum "10000>\a_count + \format_hex\b_macro{\a_count}{4} + \edef\a_macro{\a_macro \b_macro \space} + \else + \advance \a_count -"10000 + \d_count=\a_count + \divide \a_count "400 + \b_count=\a_count + \multiply \b_count "400 + \advance \d_count -\b_count + \advance \a_count "D800 + \advance \d_count "DC00~ + \format_hex\b_macro{\a_count}{4} + \format_hex\c_macro{\d_count}{4} + \edef\a_macro{\a_macro \b_macro \c_macro \space} + \fi +} +\def\cmap_charseq#1{% + \if_a_ + \bgroup + \let\Unicode=\cmap_codepoint + \let\a_macro=\empty_command + #1 + \format_hex\b_macro{\slot_number}{2} + \out_line{1~beginbfchar~<\b_macro>~<~\a_macro>~endbfchar} + \egroup + \_a_false + \fi +} +\def\etxtocmap#1#2{\begingroup + \inputetx{#1} + \open_out{#2.cmap} + \out_line{\percent_char !PS-Adobe-3.0~Resource-CMap} + \out_line{\percent_char\percent_char + DocumentNeededResources:~procset~CIDInit} + \out_line{\percent_char\percent_char + IncludeResource:~procset~CIDInit} + \setstr{cmapname}{fontinst-#2} + \out_line{\percent_char\percent_char + BeginResource:~CMap~\str{cmapname}} + \out_line{/CIDInit~/ProcSet~findresource~begin} + \out_line{7~dict~begin} + \out_line{begincmap} + \out_line{/CMapName~/\str{cmapname}~def} + \out_line{/CMapType~2~def} + \write_cmap_body{#1} + \out_line{endcmap} + \out_line{CMapName~currentdict~/CMap~defineresource~pop} + \out_line{end} + \out_line{end} + \out_line{\percent_char\percent_char EndResource} + \out_line{\percent_char\percent_char EOF} + \close_out{ToUnicode~CMap} +\endgroup} \let\aliased=\second_of_two %%% From file: fimapgen.dtx \def\mapfrags_subsystem{Map~fragments~writer} @@ -1148,6 +1232,7 @@ } \def\declarepsencoding#1#2#3{\x_cs\gdef{pse-#1}{{#2}{#3}}} \let\download=\gobble_one +\def\fulldownload#1{\download{#1}} \declarepsencoding{8r}{TeXBase1Encoding}{\download{8r.enc}} \declarepsencoding{8a}{StandardEncoding}{} \def\specifypsfont#1#2{\x_cs\def{psf-#1}{#2}} |