groff_font.man revision 104862
179543Sru.ig 2104862SruCopyright (C) 1989-1995, 2001, 2002 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 108104862Sruitself; currently, only 109104862Sru.B grops 110104862Sruuses it. 111104862Sru. 11218099Spst.TP 113104862Sru.BI paperwidth\ n 114104862SruThe physical horizontal dimension of the output medium in machine units. 115104862Sru. 116104862SruThis isn't used by 117104862Sru.BR troff . 118104862Sru. 119104862SruCurrently, only the 120104862Sru.B grolbp 121104862Sruoutput device uses it. 122104862Sru. 123104862Sru.TP 124104862Sru.BI papersize\ string 125104862SruSelect a paper size. 126104862Sru. 127104862SruValid values for 128104862Sru.I string 129104862Sruare the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper 130104862Srutypes letter, legal, tabloid, ledger, statement, executive, com10, and 131104862Srumonarch. 132104862Sru. 133104862SruCase is not significant for 134104862Sru.IR string 135104862Sruif it holds predefined paper types. 136104862Sru. 137104862SruAlternatively, 138104862Sru.I string 139104862Srucan be a file name (e.g.\& `/etc/papersize'); if the file can be opened, 140104862Sru.B groff 141104862Srureads the first line and tests for the above paper sizes. 142104862Sru. 143104862SruFinally, 144104862Sru.I string 145104862Srucan be a custom paper size in the format 146104862Sru.IB length , width 147104862Sru(no spaces before and after the comma). 148104862Sru. 149104862SruBoth 150104862Sru.I length 15118099Spstand 152104862Sru.I width 153104862Srumust have a unit appended; valid values are `i' for inches, `c' for 154104862Srucentimeters, `p' for points, and `P' for picas. 155104862Sru. 156104862SruExample: 157104862Sru.BR 12c,235p . 158104862Sru. 159104862SruAn argument which starts with a digit is always treated as a custom paper 160104862Sruformat. 161104862Sru. 162104862Sru.B papersize 163104862Srusets both the vertical and horizontal dimension of the output medium. 164104862Sru. 165104862Sru.IP 166104862SruMore than one argument can be specified; 167104862Sru.B groff 168104862Sruscans from left to right and uses the first valid paper specification. 169104862Sru. 170104862Sru. 17118099Spst.TP 172104862Sru.B pass_filenames 173104862SruMake troff tell the driver the source file name being processed. 174104862Sru. 175104862SruThis is achieved by another tcommand: 176104862Sru.B F 177104862Sru.IR filename . 178104862Sru. 17918099Spst.TP 180104862Sru.BI postpro\ program 181104862SruUse 182104862Sru.I program 183104862Sruas the postprocessor. 184104862Sru. 185104862Sru.TP 18675584Sru.BI prepro\ program 18775584SruCall 18875584Sru.I program 18975584Sruas a preprocessor. 190104862Sru. 19175584Sru.TP 192104862Sru.BI print\ program 19375584SruUse 19475584Sru.I program 195104862Sruas the spooler program for printing. 196104862Sru. 197104862SruIf omitted, the 198104862Sru.B \-l 19918099Spstand 200104862Sru.B \-L 201104862Sruoptions of 202104862Sru.B groff 203104862Sruare ignored. 204104862Sru. 20518099Spst.TP 206104862Sru.BI res\ n 207104862SruThere are 208104862Sru.I n 209104862Srumachine units per inch. 210104862Sru. 211104862Sru.TP 21218099Spst.BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0 21318099SpstThis means that the device has fonts at 21418099Spst.IR s1 , 21518099Spst.IR s2 ,\|.\|.\|.\| sn 21618099Spstscaled points. 217104862Sru. 21818099SpstThe list of sizes must be terminated by a 21918099Spst.BR 0 . 220104862Sru. 22118099SpstEach 222104862Sru.I si 22318099Spstcan also be a range of sizes 22418099Spst.IR m \- n . 225104862Sru. 22618099SpstThe list can extend over more than one line. 227104862Sru. 22818099Spst.TP 229104862Sru.BI sizescale\ n 230104862SruThe scale factor for pointsizes. 231104862Sru. 232104862SruBy default this has a value of 1. 233104862Sru. 234104862SruOne 235104862Sru.I 236104862Sruscaled point 237104862Sruis equal to 238104862Sruone 239104862Sru.RI point/ n . 240104862Sru. 241104862SruThe arguments to the 242104862Sru.B unitwidth 243104862Sruand 244104862Sru.B sizes 245104862Srucommands are given in scaled points. 246104862Sru. 247104862Sru.TP 24818099Spst.BI styles\ S1\ S2\|.\|.\|.\|Sm 24918099SpstThe first 25018099Spst.I m 25118099Spstfont positions will be associated with styles 25218099Spst.IR S1\|.\|.\|.\|Sm . 253104862Sru. 25418099Spst.TP 255104862Sru.B tcommand 256104862SruThis means that the postprocessor can handle the 257104862Sru.B t 258104862Sruand 259104862Sru.B u 260104862Sruoutput commands. 261104862Sru. 26218099Spst.TP 263104862Sru.BI unitwidth\ n 264104862SruQuantities in the font files are given in machine units 265104862Srufor fonts whose point size is 266104862Sru.I n 267104862Sruscaled points. 268104862Sru. 26918099Spst.TP 27069626Sru.B use_charnames_in_special 27169626SruThis command indicates that troff should encode named characters inside 27269626Sruspecial commands. 273104862Sru. 27469626Sru.TP 275104862Sru.BI vert\ n 276104862SruThe vertical resolution is 277104862Sru.I n 278104862Srumachine units. 279104862Sru. 280104862Sru.LP 281104862SruThe 282104862Sru.BR res , 283104862Sru.BR unitwidth , 284104862Sru.BR fonts , 28575584Sruand 286104862Sru.B sizes 287104862Srulines are compulsory. 288104862Sru. 28918099SpstOther commands are ignored by 29018099Spst.B troff 29118099Spstbut may be used by postprocessors to store arbitrary information 29218099Spstabout the device in the DESC file. 293104862Sru. 29469626Sru.LP 29569626SruHere a list of obsolete keywords which are recognized by 29669626Sru.B groff 29769626Srubut completely ignored: 29869626Sru.BR spare1 , 29969626Sru.BR spare2 , 30069626Sru.BR biggestfont . 301104862Sru. 302104862Sru. 30318099Spst.SS Font file format 304104862Sru. 305104862SruA font file has two sections. 306104862SruThe first section is a sequence 30718099Spstof lines each containing a sequence of blank delimited 30818099Spstwords; the first word in the line is a key, and subsequent 30918099Spstwords give a value for that key. 310104862Sru. 31118099Spst.TP 31218099Spst.BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR] 31318099SpstCharacters 31418099Spst.IR lig1 , 315104862Sru.IR lig2 ,\ \|.\|.\|.,\ lign 31618099Spstare ligatures; possible ligatures are 31718099Spst.BR ff , 31818099Spst.BR fi , 31969626Sru.BR fl , 32069626Sru.B ffi 32118099Spstand 32218099Spst.BR ffl . 323104862Sru. 32418099SpstFor backwards compatibility, the list of ligatures may be terminated 32518099Spstwith a 32618099Spst.BR 0. 327104862Sru. 32818099SpstThe list of ligatures may not extend over more than one line. 329104862Sru. 33018099Spst.TP 331104862Sru.BI name\ F 332104862SruThe name of the font is 333104862Sru.IR F . 334104862Sru. 335104862Sru.TP 336104862Sru.BI slant\ n 337104862SruThe characters of the font have a slant of 338104862Sru.I n 339104862Srudegrees. 340104862Sru. 341104862Sru(Positive means forward.) 342104862Sru. 343104862Sru.TP 344104862Sru.BI spacewidth\ n 345104862SruThe normal width of a space is 346104862Sru.IR n . 347104862Sru. 348104862Sru.TP 34918099Spst.B special 35018099SpstThe font is 35118099Spst.IR special ; 35218099Spstthis means that when a character is requested that is not present in 35318099Spstthe current font, it will be searched for in any special fonts that 35418099Spstare mounted. 355104862Sru. 35618099Spst.LP 35718099SpstOther commands are ignored by 35818099Spst.B troff 35918099Spstbut may be used by postprocessors to store arbitrary information 36018099Spstabout the font in the font file. 361104862Sru. 36218099Spst.LP 36318099SpstThe first section can contain comments which start with the 36418099Spst.B # 36518099Spstcharacter and extend to the end of a line. 366104862Sru. 36718099Spst.LP 36818099SpstThe second section contains one or two subsections. 369104862Sru. 37018099SpstIt must contain a 37118099Spst.I charset 37218099Spstsubsection 37318099Spstand it may also contain a 37418099Spst.I kernpairs 37518099Spstsubsection. 376104862Sru. 37718099SpstThese subsections can appear in any order. 378104862Sru. 37918099SpstEach subsection starts with a word on a line by itself. 380104862Sru. 38118099Spst.LP 38218099SpstThe word 38318099Spst.B charset 38418099Spststarts the charset subsection. 385104862Sru. 38618099SpstThe 38718099Spst.B charset 38818099Spstline is followed by a sequence of lines. 389104862Sru. 39018099SpstEach line gives information for one character. 391104862Sru. 39218099SpstA line comprises a number of fields separated 393104862Sruby blanks or tabs. 394104862Sru. 395104862SruThe format is 396104862Sru. 39718099Spst.IP 39869626Sru.I name metrics type code 39969626Sru.RI [ entity_name ] 40069626Sru.RB [ -- 40169626Sru.IR comment ] 402104862Sru. 40318099Spst.LP 40418099Spst.I name 40518099Spstidentifies the character: 40618099Spstif 40718099Spst.I name 40818099Spstis a single character 40918099Spst.I c 41018099Spstthen it corresponds to the groff input character 41118099Spst.IR c ; 41218099Spstif it is of the form 413104862Sru.BI \[rs] c 41418099Spstwhere c is a single character, then it 415104862Srucorresponds to the special character 416104862Sru.BI \[rs][ c ]\fR; 41718099Spstotherwise it corresponds to the groff input character 418104862Sru.BI \[rs][ name ]\fR. 419104862Sru. 420104862SruIf it is exactly two characters 42118099Spst.I xx 42218099Spstit can be entered as 423104862Sru.BI \[rs]( xx\fR. 424104862Sru. 425104862SruNote that single-letter special characters can't be accessed as 426104862Sru.BI \[rs] c\fR; 427104862Sruthe only exception is `\[rs]-' which is identical to `\[rs][-]'. 428104862Sru. 429104862SruThe name 430104862Sru.B \-\-\- 431104862Sruis special and indicates that the character is unnamed; 432104862Srusuch characters can only be used by means of the 433104862Sru.B \[rs]N 434104862Sruescape sequence in 435104862Sru.BR troff . 436104862Sru. 437104862Sru.LP 438104862SruGroff supports eight-bit characters; however some utilities 439104862Sruhave difficulties with eight-bit characters. 440104862Sru. 44118099SpstFor this reason, there is a convention that the name 44218099Spst.BI char n 44318099Spstis equivalent to the single character whose code is 444104862Sru.IR n . 445104862Sru. 44618099SpstFor example, 44718099Spst.B char163 44818099Spstwould be equivalent to the character with code 163 44918099Spstwhich is the pounds sterling sign in ISO Latin-1. 450104862Sru. 45118099Spst.LP 45218099SpstThe 45318099Spst.I type 45418099Spstfield gives the character type: 455104862Sru. 45618099Spst.TP 45718099Spst1 458104862Srumeans the character has a descender, for example, p; 459104862Sru. 46018099Spst.TP 46118099Spst2 46218099Spstmeans the character has an ascender, for example, b; 463104862Sru. 46418099Spst.TP 46518099Spst3 46618099Spstmeans the character has both an ascender and a descender, for example, 46718099Spst(. 468104862Sru. 46918099Spst.LP 47018099SpstThe 47118099Spst.I code 47218099Spstfield gives the code which the postprocessor uses to print the character. 473104862Sru. 47418099SpstThe character can also be input to groff using this code by means of the 475104862Sru.B \[rs]N 47618099Spstescape sequence. 477104862Sru. 47818099SpstThe code can be any integer. 479104862Sru. 48018099SpstIf it starts with a 48118099Spst.B 0 48218099Spstit will be interpreted as octal; 48318099Spstif it starts with 48418099Spst.B 0x 48518099Spstor 48618099Spst.B 0X 48718099Spstit will be intepreted as hexadecimal. 488104862Sru. 489104862SruNote, however, that the 490104862Sru.B \[rs]N 491104862Sruescape sequence only accepts a decimal integer. 492104862Sru. 49318099Spst.LP 49469626SruThe 49569626Sru.I entity_name 49669626Srufield gives an ascii string identifying the glyph which the postprocessor 49769626Sruuses to print the character. 498104862Sru. 49969626SruThis field is optional and has been introduced so that the html device driver 50069626Srucan encode its character set. 501104862Sru. 502104862SruFor example, the character `\[rs][Po]' is represented as `£' in 503104862Sruhtml\~4.0. 504104862Sru. 50518099Spst.LP 50669626SruAnything on the line after the encoding field resp. after `-\&-' will 50769626Srube ignored. 508104862Sru. 50969626Sru.LP 51018099SpstThe 51118099Spst.I metrics 512104862Srufield has the form (in one line; it is broken here for the sake of 513104862Srureadability): 514104862Sru. 51518099Spst.IP 516104862Sru.IR width [\fB, height [\fB, depth [\fB, italic-correction 517104862Sru.br 518104862Sru.RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]] 519104862Sru. 52018099Spst.LP 52118099SpstThere must not be any spaces between these subfields. 522104862Sru. 52318099SpstMissing subfields are assumed to be 0. 524104862Sru. 52518099SpstThe subfields are all decimal integers. 526104862Sru. 52718099SpstSince there is no associated binary format, these 52818099Spstvalues are not required to fit into a variable of type 52918099Spst.B char 53018099Spstas they are in ditroff. 531104862Sru. 53218099SpstThe 53318099Spst.I width 53418099Spstsubfields gives the width of the character. 535104862Sru. 53618099SpstThe 53718099Spst.I height 53818099Spstsubfield gives the height of the character (upwards is positive); 53918099Spstif a character does not extend above the baseline, it should be 54018099Spstgiven a zero height, rather than a negative height. 541104862Sru. 54218099SpstThe 54318099Spst.I depth 54418099Spstsubfield gives the depth of the character, that is, the distance 54518099Spstbelow the lowest point below the baseline to which the 54618099Spstcharacter extends (downwards is positive); 54718099Spstif a character does not extend below above the baseline, it should be 54818099Spstgiven a zero depth, rather than a negative depth. 549104862Sru. 55018099SpstThe 551104862Sru.I italic-correction 55218099Spstsubfield gives the amount of space that should be added after the 55318099Spstcharacter when it is immediately to be followed by a character 55418099Spstfrom a roman font. 555104862Sru. 55618099SpstThe 557104862Sru.I left-italic-correction 55818099Spstsubfield gives the amount of space that should be added before the 55918099Spstcharacter when it is immediately to be preceded by a character 56018099Spstfrom a roman font. 561104862Sru. 56218099SpstThe 563104862Sru.I subscript-correction 56418099Spstgives the amount of space that should be added after a character 56518099Spstbefore adding a subscript. 566104862Sru. 56718099SpstThis should be less than the italic correction. 568104862Sru. 56918099Spst.LP 57018099SpstA line in the charset section can also have the format 571104862Sru. 57218099Spst.IP 57318099Spst.I 57418099Spstname \fB" 575104862Sru. 57618099Spst.LP 57718099SpstThis indicates that 57818099Spst.I name 57918099Spstis just another name for the character mentioned in the 58018099Spstpreceding line. 581104862Sru. 58218099Spst.LP 58318099SpstThe word 58418099Spst.B kernpairs 58518099Spststarts the kernpairs section. 586104862Sru. 58718099SpstThis contains a sequence of lines of the form: 588104862Sru. 58918099Spst.IP 590104862Sru.I c1 c2 n 591104862Sru. 59218099Spst.LP 59318099SpstThis means that when character 59418099Spst.I c1 59518099Spstappears next to character 59618099Spst.I c2 59718099Spstthe space between them should be increased by 59818099Spst.IR n . 599104862Sru. 60018099SpstMost entries in kernpairs section will have a negative value for 60118099Spst.IR n . 602104862Sru. 603104862Sru. 60418099Spst.SH FILES 605104862Sru. 60618099Spst.Tp \w'@FONTDIR@/devname/DESC'u+3n 60718099Spst.BI @FONTDIR@/dev name /DESC 60818099SpstDevice description file for device 60918099Spst.IR name . 610104862Sru. 61118099Spst.TP 61218099Spst.BI @FONTDIR@/dev name / F 61318099SpstFont file for font 61418099Spst.I F 61518099Spstof device 61618099Spst.IR name . 617104862Sru. 618104862Sru. 61918099Spst.SH "SEE ALSO" 620104862Sru. 62118099Spst.BR groff_out (@MAN5EXT@), 62218099Spst.BR @g@troff (@MAN1EXT@). 62379543Sru. 62479543Sru.\" Local Variables: 62579543Sru.\" mode: nroff 62679543Sru.\" End: 627