groff_font.man revision 114402
179543Sru.ig 2114402SruCopyright (C) 1989-1995, 2001, 2002, 2003 Free Software Foundation, Inc. 318099Spst 418099SpstPermission is granted to make and distribute verbatim copies of 518099Spstthis manual provided the copyright notice and this permission notice 618099Spstare preserved on all copies. 718099Spst 818099SpstPermission is granted to copy and distribute modified versions of this 918099Spstmanual under the conditions for verbatim copying, provided that the 1018099Spstentire resulting derived work is distributed under the terms of a 1118099Spstpermission notice identical to this one. 1218099Spst 1318099SpstPermission is granted to copy and distribute translations of this 1418099Spstmanual into another language, under the above conditions for modified 1518099Spstversions, except that this permission notice may be included in 1618099Spsttranslations approved by the Free Software Foundation instead of in 1718099Spstthe original English. 1818099Spst.. 19104862Sru. 2018099Spst.de TQ 2118099Spst.br 2218099Spst.ns 2318099Spst.TP \\$1 2418099Spst.. 25104862Sru. 2618099Spst.\" Like TP, but if specified indent is more than half 2718099Spst.\" the current line-length - indent, use the default indent. 2818099Spst.de Tp 2918099Spst.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP 3018099Spst.el .TP "\\$1" 3118099Spst.. 32104862Sru. 33104862Sru. 3418099Spst.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" 35104862Sru. 36104862Sru. 3718099Spst.SH NAME 3818099Spstgroff_font \- format of groff device and font description files 39104862Sru. 40104862Sru. 4118099Spst.SH DESCRIPTION 4218099SpstThe groff font format is roughly a superset of the ditroff 4318099Spstfont format. 44104862Sru. 4518099SpstThe font files for device 4618099Spst.I name 4718099Spstare stored in a directory 4818099Spst.BI dev name. 49104862Sru. 5018099SpstThere are two types of file: a 5118099Spstdevice description file called 5218099Spst.B DESC 5318099Spstand for each font 5418099Spst.I F 5518099Spsta font file called 5618099Spst.IR F . 57104862Sru. 5818099SpstThese are text files; 59104862Sruunlike the ditroff font format, 6018099Spstthere is no associated binary format. 61104862Sru. 62104862Sru. 6318099Spst.SS DESC file format 64104862Sru. 65104862SruThe DESC file can contain the following types of line as shown below. 66104862Sru. 67104862SruLater entries in the file override previous values. 68104862Sru. 6918099Spst.TP 70104862Sru.B charset 71104862SruThis line and everything following in the file are ignored. 72104862Sru. 73104862SruIt is allowed for the sake of backwards compatibility. 74104862Sru. 7518099Spst.TP 76104862Sru.BI family\ fam 77104862SruThe default font family is 78104862Sru.IR fam . 79104862Sru. 80104862Sru.TP 81104862Sru.BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn 82104862SruFonts 83104862Sru.I F1\|.\|.\|.\|Fn 84104862Sruwill be mounted in the font positions 85104862Sru.IR m +1,\|.\|.\|., m + n 86104862Sruwhere 87104862Sru.I m 88104862Sruis the number of styles. 89104862Sru. 90104862SruThis command may extend over more than one line. 91104862Sru. 92104862SruA font name of 93104862Sru.B 0 94104862Sruwill cause no font to be mounted on the corresponding font position. 95104862Sru. 96104862Sru.TP 9718099Spst.BI hor\ n 9818099SpstThe horizontal resolution is 9918099Spst.I n 10018099Spstmachine units. 101104862Sru. 10218099Spst.TP 103104862Sru.BI paperheight\ n 104104862SruThe physical vertical dimension of the output medium in machine units. 105104862Sru. 106104862SruThis isn't used by 107104862Sru.B troff 108114402Sruitself but by output devices. 109104862Sru. 110114402SruDeprecated. 111104862Sru. 112114402SruUse 113114402Sru.B papersize 114114402Sruinstead. 115104862Sru. 116104862Sru.TP 117104862Sru.BI papersize\ string 118104862SruSelect a paper size. 119104862Sru. 120104862SruValid values for 121104862Sru.I string 122104862Sruare the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper 123104862Srutypes letter, legal, tabloid, ledger, statement, executive, com10, and 124104862Srumonarch. 125104862Sru. 126104862SruCase is not significant for 127104862Sru.IR string 128104862Sruif it holds predefined paper types. 129104862Sru. 130104862SruAlternatively, 131104862Sru.I string 132104862Srucan be a file name (e.g.\& `/etc/papersize'); if the file can be opened, 133104862Sru.B groff 134104862Srureads the first line and tests for the above paper sizes. 135104862Sru. 136104862SruFinally, 137104862Sru.I string 138104862Srucan be a custom paper size in the format 139104862Sru.IB length , width 140104862Sru(no spaces before and after the comma). 141104862Sru. 142104862SruBoth 143104862Sru.I length 14418099Spstand 145104862Sru.I width 146104862Srumust have a unit appended; valid values are `i' for inches, `c' for 147104862Srucentimeters, `p' for points, and `P' for picas. 148104862Sru. 149104862SruExample: 150104862Sru.BR 12c,235p . 151104862Sru. 152104862SruAn argument which starts with a digit is always treated as a custom paper 153104862Sruformat. 154104862Sru. 155104862Sru.B papersize 156104862Srusets both the vertical and horizontal dimension of the output medium. 157104862Sru. 158104862Sru.IP 159104862SruMore than one argument can be specified; 160104862Sru.B groff 161104862Sruscans from left to right and uses the first valid paper specification. 162104862Sru. 163114402Sru.TP 164114402Sru.BI paperwidth\ n 165114402SruThe physical horizontal dimension of the output medium in machine units. 166104862Sru. 167114402SruDeprecated. 168114402Sru. 169114402SruUse 170114402Sru.B papersize 171114402Sruinstead. 172114402Sru. 173114402SruThis isn't used by 174114402Sru.BR troff 175114402Sruitself but by output devices. 176114402Sru. 17718099Spst.TP 178104862Sru.B pass_filenames 179104862SruMake troff tell the driver the source file name being processed. 180104862Sru. 181104862SruThis is achieved by another tcommand: 182104862Sru.B F 183104862Sru.IR filename . 184104862Sru. 18518099Spst.TP 186104862Sru.BI postpro\ program 187104862SruUse 188104862Sru.I program 189104862Sruas the postprocessor. 190104862Sru. 191104862Sru.TP 19275584Sru.BI prepro\ program 19375584SruCall 19475584Sru.I program 19575584Sruas a preprocessor. 196104862Sru. 19775584Sru.TP 198104862Sru.BI print\ program 19975584SruUse 20075584Sru.I program 201104862Sruas the spooler program for printing. 202104862Sru. 203104862SruIf omitted, the 204104862Sru.B \-l 20518099Spstand 206104862Sru.B \-L 207104862Sruoptions of 208104862Sru.B groff 209104862Sruare ignored. 210104862Sru. 21118099Spst.TP 212104862Sru.BI res\ n 213104862SruThere are 214104862Sru.I n 215104862Srumachine units per inch. 216104862Sru. 217104862Sru.TP 21818099Spst.BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0 21918099SpstThis means that the device has fonts at 22018099Spst.IR s1 , 22118099Spst.IR s2 ,\|.\|.\|.\| sn 22218099Spstscaled points. 223104862Sru. 22418099SpstThe list of sizes must be terminated by a 22518099Spst.BR 0 . 226104862Sru. 22718099SpstEach 228104862Sru.I si 22918099Spstcan also be a range of sizes 23018099Spst.IR m \- n . 231104862Sru. 23218099SpstThe list can extend over more than one line. 233104862Sru. 23418099Spst.TP 235104862Sru.BI sizescale\ n 236104862SruThe scale factor for pointsizes. 237104862Sru. 238104862SruBy default this has a value of 1. 239104862Sru. 240104862SruOne 241104862Sru.I 242104862Sruscaled point 243104862Sruis equal to 244104862Sruone 245104862Sru.RI point/ n . 246104862Sru. 247104862SruThe arguments to the 248104862Sru.B unitwidth 249104862Sruand 250104862Sru.B sizes 251104862Srucommands are given in scaled points. 252104862Sru. 253104862Sru.TP 25418099Spst.BI styles\ S1\ S2\|.\|.\|.\|Sm 25518099SpstThe first 25618099Spst.I m 25718099Spstfont positions will be associated with styles 25818099Spst.IR S1\|.\|.\|.\|Sm . 259104862Sru. 26018099Spst.TP 261104862Sru.B tcommand 262104862SruThis means that the postprocessor can handle the 263104862Sru.B t 264104862Sruand 265104862Sru.B u 266104862Sruoutput commands. 267104862Sru. 26818099Spst.TP 269104862Sru.BI unitwidth\ n 270104862SruQuantities in the font files are given in machine units 271104862Srufor fonts whose point size is 272104862Sru.I n 273104862Sruscaled points. 274104862Sru. 27518099Spst.TP 27669626Sru.B use_charnames_in_special 27769626SruThis command indicates that troff should encode named characters inside 27869626Sruspecial commands. 279104862Sru. 28069626Sru.TP 281104862Sru.BI vert\ n 282104862SruThe vertical resolution is 283104862Sru.I n 284104862Srumachine units. 285104862Sru. 286104862Sru.LP 287104862SruThe 288104862Sru.BR res , 289104862Sru.BR unitwidth , 290104862Sru.BR fonts , 29175584Sruand 292104862Sru.B sizes 293104862Srulines are compulsory. 294104862Sru. 295114402SruNot all commands in the DESC file are used by 29618099Spst.B troff 297114402Sruitself; some of the keywords (or even additional ones) are used by 298114402Srupostprocessors to store arbitrary information about the device. 299104862Sru. 30069626Sru.LP 30169626SruHere a list of obsolete keywords which are recognized by 30269626Sru.B groff 30369626Srubut completely ignored: 30469626Sru.BR spare1 , 30569626Sru.BR spare2 , 30669626Sru.BR biggestfont . 307104862Sru. 308104862Sru. 30918099Spst.SS Font file format 310104862Sru. 311104862SruA font file has two sections. 312104862SruThe first section is a sequence 31318099Spstof lines each containing a sequence of blank delimited 31418099Spstwords; the first word in the line is a key, and subsequent 31518099Spstwords give a value for that key. 316104862Sru. 31718099Spst.TP 31818099Spst.BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR] 31918099SpstCharacters 32018099Spst.IR lig1 , 321104862Sru.IR lig2 ,\ \|.\|.\|.,\ lign 32218099Spstare ligatures; possible ligatures are 32318099Spst.BR ff , 32418099Spst.BR fi , 32569626Sru.BR fl , 32669626Sru.B ffi 32718099Spstand 32818099Spst.BR ffl . 329104862Sru. 33018099SpstFor backwards compatibility, the list of ligatures may be terminated 33118099Spstwith a 33218099Spst.BR 0. 333104862Sru. 33418099SpstThe list of ligatures may not extend over more than one line. 335104862Sru. 33618099Spst.TP 337104862Sru.BI name\ F 338104862SruThe name of the font is 339104862Sru.IR F . 340104862Sru. 341104862Sru.TP 342104862Sru.BI slant\ n 343104862SruThe characters of the font have a slant of 344104862Sru.I n 345104862Srudegrees. 346104862Sru. 347104862Sru(Positive means forward.) 348104862Sru. 349104862Sru.TP 350104862Sru.BI spacewidth\ n 351104862SruThe normal width of a space is 352104862Sru.IR n . 353104862Sru. 354104862Sru.TP 35518099Spst.B special 35618099SpstThe font is 35718099Spst.IR special ; 35818099Spstthis means that when a character is requested that is not present in 35918099Spstthe current font, it will be searched for in any special fonts that 36018099Spstare mounted. 361104862Sru. 36218099Spst.LP 36318099SpstOther commands are ignored by 36418099Spst.B troff 36518099Spstbut may be used by postprocessors to store arbitrary information 36618099Spstabout the font in the font file. 367104862Sru. 36818099Spst.LP 36918099SpstThe first section can contain comments which start with the 37018099Spst.B # 37118099Spstcharacter and extend to the end of a line. 372104862Sru. 37318099Spst.LP 37418099SpstThe second section contains one or two subsections. 375104862Sru. 37618099SpstIt must contain a 37718099Spst.I charset 37818099Spstsubsection 37918099Spstand it may also contain a 38018099Spst.I kernpairs 38118099Spstsubsection. 382104862Sru. 38318099SpstThese subsections can appear in any order. 384104862Sru. 38518099SpstEach subsection starts with a word on a line by itself. 386104862Sru. 38718099Spst.LP 38818099SpstThe word 38918099Spst.B charset 39018099Spststarts the charset subsection. 391104862Sru. 39218099SpstThe 39318099Spst.B charset 39418099Spstline is followed by a sequence of lines. 395104862Sru. 39618099SpstEach line gives information for one character. 397104862Sru. 39818099SpstA line comprises a number of fields separated 399104862Sruby blanks or tabs. 400104862Sru. 401104862SruThe format is 402104862Sru. 40318099Spst.IP 40469626Sru.I name metrics type code 40569626Sru.RI [ entity_name ] 40669626Sru.RB [ -- 40769626Sru.IR comment ] 408104862Sru. 40918099Spst.LP 41018099Spst.I name 41118099Spstidentifies the character: 41218099Spstif 41318099Spst.I name 41418099Spstis a single character 41518099Spst.I c 41618099Spstthen it corresponds to the groff input character 41718099Spst.IR c ; 41818099Spstif it is of the form 419104862Sru.BI \[rs] c 42018099Spstwhere c is a single character, then it 421104862Srucorresponds to the special character 422104862Sru.BI \[rs][ c ]\fR; 42318099Spstotherwise it corresponds to the groff input character 424104862Sru.BI \[rs][ name ]\fR. 425104862Sru. 426104862SruIf it is exactly two characters 42718099Spst.I xx 42818099Spstit can be entered as 429104862Sru.BI \[rs]( xx\fR. 430104862Sru. 431104862SruNote that single-letter special characters can't be accessed as 432104862Sru.BI \[rs] c\fR; 433104862Sruthe only exception is `\[rs]-' which is identical to `\[rs][-]'. 434104862Sru. 435104862SruThe name 436104862Sru.B \-\-\- 437104862Sruis special and indicates that the character is unnamed; 438104862Srusuch characters can only be used by means of the 439104862Sru.B \[rs]N 440104862Sruescape sequence in 441104862Sru.BR troff . 442104862Sru. 443104862Sru.LP 444104862SruGroff supports eight-bit characters; however some utilities 445104862Sruhave difficulties with eight-bit characters. 446104862Sru. 44718099SpstFor this reason, there is a convention that the name 44818099Spst.BI char n 44918099Spstis equivalent to the single character whose code is 450104862Sru.IR n . 451104862Sru. 45218099SpstFor example, 45318099Spst.B char163 45418099Spstwould be equivalent to the character with code 163 45518099Spstwhich is the pounds sterling sign in ISO Latin-1. 456104862Sru. 45718099Spst.LP 45818099SpstThe 45918099Spst.I type 46018099Spstfield gives the character type: 461104862Sru. 46218099Spst.TP 46318099Spst1 464104862Srumeans the character has a descender, for example, p; 465104862Sru. 46618099Spst.TP 46718099Spst2 46818099Spstmeans the character has an ascender, for example, b; 469104862Sru. 47018099Spst.TP 47118099Spst3 47218099Spstmeans the character has both an ascender and a descender, for example, 47318099Spst(. 474104862Sru. 47518099Spst.LP 47618099SpstThe 47718099Spst.I code 47818099Spstfield gives the code which the postprocessor uses to print the character. 479104862Sru. 48018099SpstThe character can also be input to groff using this code by means of the 481104862Sru.B \[rs]N 48218099Spstescape sequence. 483104862Sru. 48418099SpstThe code can be any integer. 485104862Sru. 48618099SpstIf it starts with a 48718099Spst.B 0 48818099Spstit will be interpreted as octal; 48918099Spstif it starts with 49018099Spst.B 0x 49118099Spstor 49218099Spst.B 0X 49318099Spstit will be intepreted as hexadecimal. 494104862Sru. 495104862SruNote, however, that the 496104862Sru.B \[rs]N 497104862Sruescape sequence only accepts a decimal integer. 498104862Sru. 49918099Spst.LP 50069626SruThe 50169626Sru.I entity_name 50269626Srufield gives an ascii string identifying the glyph which the postprocessor 50369626Sruuses to print the character. 504104862Sru. 50569626SruThis field is optional and has been introduced so that the html device driver 50669626Srucan encode its character set. 507104862Sru. 508104862SruFor example, the character `\[rs][Po]' is represented as `£' in 509104862Sruhtml\~4.0. 510104862Sru. 51118099Spst.LP 51269626SruAnything on the line after the encoding field resp. after `-\&-' will 51369626Srube ignored. 514104862Sru. 51569626Sru.LP 51618099SpstThe 51718099Spst.I metrics 518104862Srufield has the form (in one line; it is broken here for the sake of 519104862Srureadability): 520104862Sru. 52118099Spst.IP 522104862Sru.IR width [\fB, height [\fB, depth [\fB, italic-correction 523104862Sru.br 524104862Sru.RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]] 525104862Sru. 52618099Spst.LP 52718099SpstThere must not be any spaces between these subfields. 528104862Sru. 52918099SpstMissing subfields are assumed to be 0. 530104862Sru. 53118099SpstThe subfields are all decimal integers. 532104862Sru. 53318099SpstSince there is no associated binary format, these 53418099Spstvalues are not required to fit into a variable of type 53518099Spst.B char 53618099Spstas they are in ditroff. 537104862Sru. 53818099SpstThe 53918099Spst.I width 54018099Spstsubfields gives the width of the character. 541104862Sru. 54218099SpstThe 54318099Spst.I height 54418099Spstsubfield gives the height of the character (upwards is positive); 54518099Spstif a character does not extend above the baseline, it should be 54618099Spstgiven a zero height, rather than a negative height. 547104862Sru. 54818099SpstThe 54918099Spst.I depth 55018099Spstsubfield gives the depth of the character, that is, the distance 55118099Spstbelow the lowest point below the baseline to which the 55218099Spstcharacter extends (downwards is positive); 55318099Spstif a character does not extend below above the baseline, it should be 55418099Spstgiven a zero depth, rather than a negative depth. 555104862Sru. 55618099SpstThe 557104862Sru.I italic-correction 55818099Spstsubfield gives the amount of space that should be added after the 55918099Spstcharacter when it is immediately to be followed by a character 56018099Spstfrom a roman font. 561104862Sru. 56218099SpstThe 563104862Sru.I left-italic-correction 56418099Spstsubfield gives the amount of space that should be added before the 56518099Spstcharacter when it is immediately to be preceded by a character 56618099Spstfrom a roman font. 567104862Sru. 56818099SpstThe 569104862Sru.I subscript-correction 57018099Spstgives the amount of space that should be added after a character 57118099Spstbefore adding a subscript. 572104862Sru. 57318099SpstThis should be less than the italic correction. 574104862Sru. 57518099Spst.LP 57618099SpstA line in the charset section can also have the format 577104862Sru. 57818099Spst.IP 57918099Spst.I 58018099Spstname \fB" 581104862Sru. 58218099Spst.LP 58318099SpstThis indicates that 58418099Spst.I name 58518099Spstis just another name for the character mentioned in the 58618099Spstpreceding line. 587104862Sru. 58818099Spst.LP 58918099SpstThe word 59018099Spst.B kernpairs 59118099Spststarts the kernpairs section. 592104862Sru. 59318099SpstThis contains a sequence of lines of the form: 594104862Sru. 59518099Spst.IP 596104862Sru.I c1 c2 n 597104862Sru. 59818099Spst.LP 59918099SpstThis means that when character 60018099Spst.I c1 60118099Spstappears next to character 60218099Spst.I c2 60318099Spstthe space between them should be increased by 60418099Spst.IR n . 605104862Sru. 60618099SpstMost entries in kernpairs section will have a negative value for 60718099Spst.IR n . 608104862Sru. 609104862Sru. 61018099Spst.SH FILES 611104862Sru. 61218099Spst.Tp \w'@FONTDIR@/devname/DESC'u+3n 61318099Spst.BI @FONTDIR@/dev name /DESC 61418099SpstDevice description file for device 61518099Spst.IR name . 616104862Sru. 61718099Spst.TP 61818099Spst.BI @FONTDIR@/dev name / F 61918099SpstFont file for font 62018099Spst.I F 62118099Spstof device 62218099Spst.IR name . 623104862Sru. 624104862Sru. 62518099Spst.SH "SEE ALSO" 626104862Sru. 62718099Spst.BR groff_out (@MAN5EXT@), 62818099Spst.BR @g@troff (@MAN1EXT@). 62979543Sru. 63079543Sru.\" Local Variables: 63179543Sru.\" mode: nroff 63279543Sru.\" End: 633