| 1 |
% arevfontinst.tex |
| 2 |
% (part of the arev package, by Stephen Hartke) |
| 3 |
% |
| 4 |
% Fontinst script |
| 5 |
% to create virtual math fonts from Arev Sans by Tavmjong Bah |
| 6 |
|
| 7 |
\input fontinst.sty |
| 8 |
%\input bbox.sty % bounding box info--for using kerning info to fix horizontal placement of math accents in kernaccents*.mtx |
| 9 |
\needsfontinstversion{1.914} |
| 10 |
|
| 11 |
|
| 12 |
% Messages can be put anywhere in fontinst scripts, including etx and mtx files. |
| 13 |
% Messages are output to the console when TeX is running. |
| 14 |
\message{Running Arev Sans fontinst script.} |
| 15 |
|
| 16 |
|
| 17 |
% Arev Sans (fav) for text |
| 18 |
\recordtransforms{mapfav.tex} |
| 19 |
\transformfont{favr8r} {\reencodefont{8r}{\fromafm{ArevSans-Roman}}} |
| 20 |
\transformfont{favri8r}{\reencodefont{8r}{\fromafm{ArevSans-Oblique}}} |
| 21 |
\transformfont{favb8r} {\reencodefont{8r}{\fromafm{ArevSans-Bold}}} |
| 22 |
\transformfont{favbi8r}{\reencodefont{8r}{\fromafm{ArevSans-BoldOblique}}} |
| 23 |
\installfonts |
| 24 |
\installfamily{T1}{fav}{} |
| 25 |
\installfont{favr8t} {favr8r,latin} {t1}{T1}{fav}{m}{n}{} |
| 26 |
\installfont{favri8t}{favri8r,latin}{t1}{T1}{fav}{m}{it}{} |
| 27 |
\installfont{favb8t} {favb8r,latin} {t1}{T1}{fav}{b}{n}{} |
| 28 |
\installfont{favbi8t}{favbi8r,latin}{t1}{T1}{fav}{b}{it}{} |
| 29 |
\endinstallfonts |
| 30 |
\endrecordtransforms |
| 31 |
|
| 32 |
|
| 33 |
% Arev Sans (favm) for math |
| 34 |
\recordtransforms{mapfavm.tex} |
| 35 |
\transformfont{favmr7t} {\reencodefont{arevot1}{\fromafm{ArevSans-Roman}}} |
| 36 |
\transformfont{favmb7t} {\reencodefont{arevot1}{\fromafm{ArevSans-Bold}}} |
| 37 |
\transformfont{favmri7m}{\reencodefont{arevoml}{\fromafm{ArevSans-Oblique}}} |
| 38 |
\transformfont{favmbi7m}{\reencodefont{arevoml}{\fromafm{ArevSans-BoldOblique}}} |
| 39 |
\transformfont{favmr7y} {\reencodefont{arevoms}{\fromafm{ArevSans-Roman}}} |
| 40 |
\endrecordtransforms |
| 41 |
|
| 42 |
|
| 43 |
% Reglyphing of favm fonts (the extra c means custom reencoded) |
| 44 |
|
| 45 |
% rename the glyph if it does not have second parameter \ok |
| 46 |
\let\ok=donotrenamethisglyph |
| 47 |
\let\nomacro=donotmakeamacrocommand |
| 48 |
\def\declareglyph#1#2#3#4% |
| 49 |
{% |
| 50 |
\def\temptesta{#2}% |
| 51 |
\def\temptestb{\ok}% |
| 52 |
\ifx\temptesta\temptestb% |
| 53 |
\else% |
| 54 |
\renameglyph{#2}{#1}% |
| 55 |
\fi% |
| 56 |
} |
| 57 |
|
| 58 |
\input fixkernaccents |
| 59 |
|
| 60 |
\reglyphfonts |
| 61 |
% don't want curly i and l for operators font! log and sin look silly. |
| 62 |
\input glyphlistot1.tex |
| 63 |
\reglyphfont{favmr7tc}{favmr7t} |
| 64 |
\endreglyphfonts |
| 65 |
\reglyphfonts |
| 66 |
\input glyphlistot1.tex |
| 67 |
\inputmtx{favmr7t} |
| 68 |
\def\thenewskewchar{dieresis} % Using dieresis for skewchar |
| 69 |
% setkern commands can be reglyphed, but resetkern and unsetkern commands cannot be. |
| 70 |
% Thus, the skewchar chosen cannot have any pre-existing kerns. |
| 71 |
% Accents are usually a safe bet, since they're for composing with other characters and do not appear as a character adjacent to other characters. |
| 72 |
\reglyphfont{kernaccentsot1c}{kernaccentsot1} |
| 73 |
\endreglyphfonts |
| 74 |
|
| 75 |
\reglyphfonts |
| 76 |
\input glyphlistot1.tex |
| 77 |
\reglyphfont{favmb7tc}{favmb7t} |
| 78 |
\endreglyphfonts |
| 79 |
\reglyphfonts |
| 80 |
\input glyphlistot1.tex |
| 81 |
\inputmtx{favmr7t} |
| 82 |
\def\thenewskewchar{dieresis} |
| 83 |
\reglyphfont{kernaccentsot1boldc}{kernaccentsot1bold} |
| 84 |
\endreglyphfonts |
| 85 |
|
| 86 |
\reglyphfonts |
| 87 |
\input glyphlistoml.tex |
| 88 |
\reglyphfont{favmri7mc}{favmri7m} |
| 89 |
\endreglyphfonts |
| 90 |
\reglyphfonts |
| 91 |
\input glyphlistoml.tex |
| 92 |
\inputmtx{favmri7m} |
| 93 |
\def\thenewskewchar{uni0361} % Using tie for skewchar |
| 94 |
\reglyphfont{kernaccentsomlc}{kernaccentsoml} |
| 95 |
\endreglyphfonts |
| 96 |
|
| 97 |
\reglyphfonts |
| 98 |
\input glyphlistoml.tex |
| 99 |
\reglyphfont{favmbi7mc}{favmbi7m} |
| 100 |
\endreglyphfonts |
| 101 |
\reglyphfonts |
| 102 |
\input glyphlistoml.tex |
| 103 |
\inputmtx{favmbi7m} |
| 104 |
\def\thenewskewchar{uni0361} |
| 105 |
\reglyphfont{kernaccentsomlboldc}{kernaccentsomlbold} |
| 106 |
\endreglyphfonts |
| 107 |
|
| 108 |
\reglyphfonts |
| 109 |
\input glyphlistoms.tex |
| 110 |
\reglyphfont{favmr7yc}{favmr7y} |
| 111 |
\endreglyphfonts |
| 112 |
|
| 113 |
|
| 114 |
% Virtual math fonts for Arev Sans: zavm (z Arev Math) |
| 115 |
\recordtransforms{mapzavm.tex} |
| 116 |
\installfonts |
| 117 |
|
| 118 |
\setint{letterspacing}{25} % makes math less tight |
| 119 |
|
| 120 |
% Math fonts |
| 121 |
\installfamily{OT1}{zavm}{\skewchar\font=127} % the skewchar is set to dieresis |
| 122 |
\installfamily{OML}{zavm}{\skewchar\font=127} % the skewchar is set to tie |
| 123 |
\installfamily{OMS}{zavm}{} |
| 124 |
\installfamily{U} {zavm}{} % for extra symbols and nonstandard alternates |
| 125 |
|
| 126 |
% We'll use MathDesign Bitstream Charter (mdbch) for math symbols. |
| 127 |
% Need to make sure the .pl files from the .tfm files are present in the working directory. |
| 128 |
|
| 129 |
% The Kerkis symbols ktsy.pfb are the next closest in weight, but doesn't have as many symbols (no AMS for instance). |
| 130 |
|
| 131 |
%txfonts 40, bold 70 pxfonts are the same |
| 132 |
%cmm bold 45 |
| 133 |
%fourier 39 -- no bold |
| 134 |
%kerkis ktsy? 72:83 as kt:60 = 52 |
| 135 |
%arev plus width 60 |
| 136 |
%MnSymbol?? |
| 137 |
|
| 138 |
% operators font |
| 139 |
\installfont{zavmr7t} |
| 140 |
{favmr7tc,unsetot1symbols,fixot1accents,kernaccentsot1c,md-chb7t} |
| 141 |
{ot1} |
| 142 |
{OT1}{zavm}{m}{n}{} |
| 143 |
% operators font, bold |
| 144 |
\installfont{zavmb7t} |
| 145 |
{favmb7tc,unsetot1symbols,fixot1accents,kernaccentsot1boldc,md-chb7t} |
| 146 |
{ot1} |
| 147 |
{OT1}{zavm}{b}{n}{} |
| 148 |
|
| 149 |
% letters font |
| 150 |
\installfont{zavmri7m} |
| 151 |
{favmri7mc,fixweierstrass,kernaccentsomlc,resetdotlessi,md-chb7m} |
| 152 |
{oml} |
| 153 |
{OML}{zavm}{m}{it}{} |
| 154 |
% letters font, bold |
| 155 |
\installfont{zavmbi7m} |
| 156 |
{favmbi7mc,fixweierstrass,kernaccentsomlboldc,resetdotlessi,md-chb7m} |
| 157 |
{oml} |
| 158 |
{OML}{zavm}{b}{it}{} |
| 159 |
|
| 160 |
% symbols font |
| 161 |
\installfont{zavmr7y} |
| 162 |
{favmr7yc,unsetomssymbols,kernaccentsomlboldc,md-chb7y} |
| 163 |
{oms} |
| 164 |
{OMS}{zavm}{m}{n}{} |
| 165 |
|
| 166 |
% We'll use an unencoded font for extra symbols and alternate symbols. |
| 167 |
% These symbols need to be present in the glyphlist for the arevoml and arevoms encodings. |
| 168 |
% extra upright symbols |
| 169 |
\installfont{favmr7y} |
| 170 |
{favmr7y} |
| 171 |
{arevoms} |
| 172 |
{U}{zavm}{m}{n}{} |
| 173 |
% extra italic symbols |
| 174 |
\installfont{favmri7m} |
| 175 |
{favmri7m} |
| 176 |
{arevoml} |
| 177 |
{U}{zavm}{m}{it}{} |
| 178 |
|
| 179 |
\endinstallfonts |
| 180 |
\endrecordtransforms |
| 181 |
|
| 182 |
|
| 183 |
% Make map files |
| 184 |
\input finstmsc.sty |
| 185 |
\resetstr{PSfontsuffix}{.pfb} % otherwise uses .pfa |
| 186 |
|
| 187 |
\adddriver{dvips}{arev.map} |
| 188 |
\adddriver{pltotf}{maketfm} |
| 189 |
|
| 190 |
% make encoding files for dvips |
| 191 |
\etxtoenc{arevot1}{arevot1} |
| 192 |
\etxtoenc{arevoml}{arevoml} |
| 193 |
\etxtoenc{arevoms}{arevoms} |
| 194 |
|
| 195 |
\input mapfav.tex |
| 196 |
\input mapfavm.tex |
| 197 |
%\input mapzavm.tex % don't want to make dvips entries for mdbch, since they should already be installed |
| 198 |
\makemapentry{favmr7t} |
| 199 |
\makemapentry{favmb7t} |
| 200 |
\makemapentry{favmri7m} |
| 201 |
\makemapentry{favmbi7m} |
| 202 |
\makemapentry{favmr7y} |
| 203 |
|
| 204 |
\donedrivers |
| 205 |
|
| 206 |
\bye |