| 1 |
.TH tfmtodit 1 "2026-04-22" "groff 1.24.1" |
| 2 |
.SH Name |
| 3 |
tfmtodit \- adapt TeX Font Metrics files for use with |
| 4 |
.I groff |
| 5 |
and |
| 6 |
.I grodvi |
| 7 |
. |
| 8 |
. |
| 9 |
.\" ==================================================================== |
| 10 |
.\" Legal Terms |
| 11 |
.\" ==================================================================== |
| 12 |
.\" |
| 13 |
.\" Copyright (C) 1989-2024 Free Software Foundation, Inc. |
| 14 |
.\" |
| 15 |
.\" Permission is granted to make and distribute verbatim copies of this |
| 16 |
.\" manual provided the copyright notice and this permission notice are |
| 17 |
.\" preserved on all copies. |
| 18 |
.\" |
| 19 |
.\" Permission is granted to copy and distribute modified versions of |
| 20 |
.\" this manual under the conditions for verbatim copying, provided that |
| 21 |
.\" the entire resulting derived work is distributed under the terms of |
| 22 |
.\" a permission notice identical to this one. |
| 23 |
.\" |
| 24 |
.\" Permission is granted to copy and distribute translations of this |
| 25 |
.\" manual into another language, under the above conditions for |
| 26 |
.\" modified versions, except that this permission notice may be |
| 27 |
.\" included in translations approved by the Free Software Foundation |
| 28 |
.\" instead of in the original English. |
| 29 |
. |
| 30 |
. |
| 31 |
.\" Save and disable compatibility mode (for, e.g., Solaris 10/11). |
| 32 |
.do nr *groff_tfmtodit_1_man_C \n[.cp] |
| 33 |
.cp 0 |
| 34 |
. |
| 35 |
.\" Define fallback for groff 1.23's MR macro if the system lacks it. |
| 36 |
.nr do-fallback 0 |
| 37 |
.if !\n(.f .nr do-fallback 1 \" mandoc |
| 38 |
.if \n(.g .if !d MR .nr do-fallback 1 \" older groff |
| 39 |
.if !\n(.g .nr do-fallback 1 \" non-groff *roff |
| 40 |
.if \n[do-fallback] \{\ |
| 41 |
. de MR |
| 42 |
. ie \\n(.$=1 \ |
| 43 |
. I \%\\$1 |
| 44 |
. el \ |
| 45 |
. IR \%\\$1 (\\$2)\\$3 |
| 46 |
. . |
| 47 |
.\} |
| 48 |
.rr do-fallback |
| 49 |
. |
| 50 |
. |
| 51 |
.\" ==================================================================== |
| 52 |
.\" Definitions |
| 53 |
.\" ==================================================================== |
| 54 |
. |
| 55 |
.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X |
| 56 |
.el .ds tx TeX |
| 57 |
. |
| 58 |
. |
| 59 |
.\" ==================================================================== |
| 60 |
.SH Synopsis |
| 61 |
.\" ==================================================================== |
| 62 |
. |
| 63 |
.SY tfmtodit |
| 64 |
.RB [ \-s ] |
| 65 |
.RB [ \-g\~\c |
| 66 |
.IR gf-file ] |
| 67 |
.RB [ \-k\~\c |
| 68 |
.IR skew-char ] |
| 69 |
.I tfm-file |
| 70 |
.I map-file |
| 71 |
.I font-description |
| 72 |
.YS |
| 73 |
. |
| 74 |
. |
| 75 |
.P |
| 76 |
.SY tfmtodit |
| 77 |
.B \-\-help |
| 78 |
.YS |
| 79 |
. |
| 80 |
. |
| 81 |
.P |
| 82 |
.SY tfmtodit |
| 83 |
.B \-v |
| 84 |
.YS |
| 85 |
. |
| 86 |
.SY tfmtodit |
| 87 |
.B \%\-\-version |
| 88 |
.YS |
| 89 |
. |
| 90 |
. |
| 91 |
.\" ==================================================================== |
| 92 |
.SH Description |
| 93 |
.\" ==================================================================== |
| 94 |
. |
| 95 |
.I tfmtodit |
| 96 |
creates a font description file for use with |
| 97 |
.MR groff 1 's |
| 98 |
.B dvi |
| 99 |
output device. |
| 100 |
. |
| 101 |
.I tfm-file |
| 102 |
is the name of the \*(tx font metric file for the font. |
| 103 |
. |
| 104 |
.I map-file |
| 105 |
assigns |
| 106 |
.I groff |
| 107 |
ordinary or special character identifiers to glyph indices in the font; |
| 108 |
it should consist of a sequence of lines of the form |
| 109 |
. |
| 110 |
.RS |
| 111 |
.IR "i c1" \~\&.\|.\|.\&\~ cn |
| 112 |
.RE |
| 113 |
. |
| 114 |
where |
| 115 |
.I i |
| 116 |
is a position of the glyph in the font in decimal, |
| 117 |
and |
| 118 |
.I c1 |
| 119 |
through |
| 120 |
.I cn |
| 121 |
are glyph identifiers in the form used by |
| 122 |
.I groff |
| 123 |
font descriptions. |
| 124 |
. |
| 125 |
If a glyph has no |
| 126 |
.I groff |
| 127 |
names but exists in |
| 128 |
.I tfm-file, |
| 129 |
it is put in the |
| 130 |
.I groff |
| 131 |
font description file as an unnamed glyph. |
| 132 |
. |
| 133 |
Output is written in |
| 134 |
.MR groff_font 5 |
| 135 |
format to |
| 136 |
.I font-description, |
| 137 |
a file named for the intended |
| 138 |
.I groff |
| 139 |
font name. |
| 140 |
. |
| 141 |
. |
| 142 |
.P |
| 143 |
If the font is \[lq]special\[rq], |
| 144 |
meaning that |
| 145 |
.I groff |
| 146 |
should search it whenever a glyph is not found in the current font, |
| 147 |
use the |
| 148 |
.B \-s |
| 149 |
option and name |
| 150 |
.I font-description |
| 151 |
in the |
| 152 |
.B fonts |
| 153 |
directive in the output device's |
| 154 |
.I DESC |
| 155 |
file. |
| 156 |
. |
| 157 |
. |
| 158 |
.P |
| 159 |
To do a good job of math typesetting, |
| 160 |
.I groff |
| 161 |
requires font metric information not present in |
| 162 |
.I tfm-file. |
| 163 |
. |
| 164 |
This is because \*(tx has separate math italic fonts, |
| 165 |
whereas |
| 166 |
.I groff |
| 167 |
uses normal italic fonts for math. |
| 168 |
. |
| 169 |
The additional information required by |
| 170 |
.I groff |
| 171 |
is given by the two arguments to the |
| 172 |
.B math_fit |
| 173 |
macro in the Metafont programs for the Computer Modern fonts. |
| 174 |
. |
| 175 |
In a text font (a font for which |
| 176 |
.B math_fit |
| 177 |
is false), |
| 178 |
Metafont normally ignores these two arguments. |
| 179 |
. |
| 180 |
Metafont can be made to put this information into the GF |
| 181 |
(\[lq]generic font\[rq]) |
| 182 |
files it produces by loading the following definition after |
| 183 |
.B cmbase |
| 184 |
when creating |
| 185 |
.IR cm.base . |
| 186 |
. |
| 187 |
.RS |
| 188 |
.EX |
| 189 |
def ignore_math_fit(expr left_adjustment,right_adjustment) = |
| 190 |
special "adjustment"; |
| 191 |
numspecial left_adjustment*16/designsize; |
| 192 |
numspecial right_adjustment*16/designsize; |
| 193 |
enddef; |
| 194 |
.EE |
| 195 |
.RE |
| 196 |
. |
| 197 |
For the EC font family, |
| 198 |
load the following definition after |
| 199 |
.BR exbase ; |
| 200 |
consider patching |
| 201 |
.I exbase.mf |
| 202 |
locally. |
| 203 |
. |
| 204 |
.RS |
| 205 |
.EX |
| 206 |
def ignore_math_fit(expr left_adjustment,right_adjustment) = |
| 207 |
ori_special "adjustment"; |
| 208 |
ori_numspecial left_adjustment*16/designsize; |
| 209 |
ori_numspecial right_adjustment*16/designsize; |
| 210 |
enddef; |
| 211 |
.EE |
| 212 |
.RE |
| 213 |
. |
| 214 |
The only difference from the previous example is the \[lq]ori_\[rq] |
| 215 |
prefix to \[lq]special\[rq] and \[lq]numspecial\[rq]. |
| 216 |
. |
| 217 |
The GF file created using this modified |
| 218 |
.I cm.base |
| 219 |
or |
| 220 |
.I exbase.mf |
| 221 |
should be specified with the |
| 222 |
.B \-g |
| 223 |
option, |
| 224 |
which should |
| 225 |
.I not |
| 226 |
be given for a font for which |
| 227 |
.B math_fit |
| 228 |
is true. |
| 229 |
. |
| 230 |
. |
| 231 |
.\" ==================================================================== |
| 232 |
.SH Options |
| 233 |
.\" ==================================================================== |
| 234 |
. |
| 235 |
.B \-\-help |
| 236 |
displays a usage message, |
| 237 |
while |
| 238 |
.B \-v |
| 239 |
and |
| 240 |
.B \%\-\-version |
| 241 |
show version information; |
| 242 |
all exit afterward. |
| 243 |
. |
| 244 |
. |
| 245 |
.TP |
| 246 |
.BI \-g \~gf-file |
| 247 |
Use the |
| 248 |
.I gf-file |
| 249 |
produced by Metafont containing |
| 250 |
.RB \[lq] special \[rq] |
| 251 |
and |
| 252 |
.RB \[lq] numspecial \[rq] |
| 253 |
commands to obtain additional font metric information. |
| 254 |
. |
| 255 |
. |
| 256 |
.TP |
| 257 |
.BI \-k \~skew-char |
| 258 |
The skew character of this font is at position |
| 259 |
.I skew-char. |
| 260 |
. |
| 261 |
.I skew-char |
| 262 |
should be an integer; |
| 263 |
it may be given in decimal, |
| 264 |
with a leading 0 in octal, |
| 265 |
or with a leading 0x in hexadecimal. |
| 266 |
. |
| 267 |
Any kerns whose second component is |
| 268 |
.I skew-char |
| 269 |
are ignored. |
| 270 |
. |
| 271 |
. |
| 272 |
.TP |
| 273 |
.B \-s |
| 274 |
Add the |
| 275 |
.B special |
| 276 |
directive to the font description file. |
| 277 |
. |
| 278 |
. |
| 279 |
.\" ==================================================================== |
| 280 |
.SH "Exit status" |
| 281 |
.\" ==================================================================== |
| 282 |
. |
| 283 |
.I tfmtodit |
| 284 |
exits with |
| 285 |
.RB status\~ 0 |
| 286 |
on successful operation, |
| 287 |
.RB status\~ 2 |
| 288 |
if the program cannot interpret its command-line arguments, |
| 289 |
and |
| 290 |
.RB status\~ 1 |
| 291 |
if it encounters an error during operation. |
| 292 |
. |
| 293 |
. |
| 294 |
.\" ==================================================================== |
| 295 |
.SH Files |
| 296 |
.\" ==================================================================== |
| 297 |
. |
| 298 |
.TP |
| 299 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:DESC |
| 300 |
describes the |
| 301 |
.B dvi |
| 302 |
output device. |
| 303 |
. |
| 304 |
. |
| 305 |
.TP |
| 306 |
.IR /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/ F |
| 307 |
describes the font known |
| 308 |
.RI as\~ F |
| 309 |
on device |
| 310 |
.BR dvi . |
| 311 |
. |
| 312 |
. |
| 313 |
.TP |
| 314 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%ec.map |
| 315 |
.TQ |
| 316 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%msam.map |
| 317 |
.TQ |
| 318 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%msbm.map |
| 319 |
.TQ |
| 320 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%tc.map |
| 321 |
.TQ |
| 322 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texb.map |
| 323 |
.TQ |
| 324 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texex.map |
| 325 |
.TQ |
| 326 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texi.map |
| 327 |
.TQ |
| 328 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texitt.map |
| 329 |
.TQ |
| 330 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texmi.map |
| 331 |
.TQ |
| 332 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texr.map |
| 333 |
.TQ |
| 334 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%texsy.map |
| 335 |
.TQ |
| 336 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%textex.map |
| 337 |
.TQ |
| 338 |
.I /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%devdvi/\:\%generate/\:\%textt.map |
| 339 |
map glyph indices in \*[tx] fonts to |
| 340 |
.I groff |
| 341 |
ordinary and special character identifiers. |
| 342 |
. |
| 343 |
.I \%ec.map |
| 344 |
is used for |
| 345 |
.BR TREC , |
| 346 |
.BR TIEC , |
| 347 |
.BR TBEC , |
| 348 |
.BR TBIEC , |
| 349 |
.BR HREC , |
| 350 |
.BR HIEC , |
| 351 |
.BR HBEC , |
| 352 |
.BR HBIEC , |
| 353 |
.BR CWEC , |
| 354 |
and |
| 355 |
.BR CWIEC ; |
| 356 |
.I \%msam.map |
| 357 |
for |
| 358 |
.BR SA ; |
| 359 |
.I \%msbm.map |
| 360 |
for |
| 361 |
.BR SB ; |
| 362 |
.I \%tc.map |
| 363 |
for |
| 364 |
.BR TRTC , |
| 365 |
.BR TITC , |
| 366 |
.BR TBTC , |
| 367 |
.BR TBITC , |
| 368 |
.BR HRTC , |
| 369 |
.BR HITC , |
| 370 |
.BR HBTC , |
| 371 |
.BR HBITC , |
| 372 |
.BR CWTC , |
| 373 |
and |
| 374 |
.BR CWITC ; |
| 375 |
.I \%texb.map |
| 376 |
for |
| 377 |
.BR TB , |
| 378 |
.BR HR , |
| 379 |
.BR HI , |
| 380 |
.BR HB , |
| 381 |
and |
| 382 |
.BR HBI ; |
| 383 |
.I \%texex.map |
| 384 |
for |
| 385 |
.BR EX ; |
| 386 |
.I \%texi.map |
| 387 |
for |
| 388 |
.B TI |
| 389 |
and |
| 390 |
.BR TBI ; |
| 391 |
.I \%texitt.map |
| 392 |
for |
| 393 |
.BR CWI ; |
| 394 |
.I \%texmi.map |
| 395 |
for |
| 396 |
.BR MI ; |
| 397 |
.I \%texr.map |
| 398 |
for |
| 399 |
.BR TR ; |
| 400 |
.I \%texsy.map |
| 401 |
for |
| 402 |
.BR S ; |
| 403 |
.I \%textex.map |
| 404 |
for |
| 405 |
.BR SC ; |
| 406 |
and |
| 407 |
.I \%textt.map |
| 408 |
for |
| 409 |
.BR CW . |
| 410 |
. |
| 411 |
. |
| 412 |
.\" ==================================================================== |
| 413 |
.SH "See also" |
| 414 |
.\" ==================================================================== |
| 415 |
. |
| 416 |
.MR groff 1 , |
| 417 |
.MR grodvi 1 , |
| 418 |
.MR groff_font 5 |
| 419 |
. |
| 420 |
. |
| 421 |
.\" Clean up. |
| 422 |
.rm tx |
| 423 |
. |
| 424 |
.\" Restore compatibility mode (for, e.g., Solaris 10/11). |
| 425 |
.cp \n[*groff_tfmtodit_1_man_C] |
| 426 |
.do rr *groff_tfmtodit_1_man_C |
| 427 |
. |
| 428 |
. |
| 429 |
.\" Local Variables: |
| 430 |
.\" fill-column: 72 |
| 431 |
.\" mode: nroff |
| 432 |
.\" End: |
| 433 |
.\" vim: set filetype=groff textwidth=72: |