{"id":4437,"date":"2022-12-20T17:49:17","date_gmt":"2022-12-20T20:49:17","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/groff_font-man5\/"},"modified":"2022-12-20T17:49:17","modified_gmt":"2022-12-20T20:49:17","slug":"groff_font-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/groff_font-man5\/","title":{"rendered":"GROFF_FONT (man5)"},"content":{"rendered":"<h1 align=\"center\">GROFF_FONT<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">groff_font \u2212 format of groff device and font description files<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The groff font format is roughly a superset of the ditroff font format. The font files for device <i>name<\/i> are stored in a directory <i>dev<\/i>name. There are two types of file: a device description file called <i>DESC<\/i> and for each font\u00a0<i>F<\/i>, a font file called\u00a0F. These are text files; unlike the ditroff font format, there is no associated binary format.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>DESC file format<\/b> <br \/> The <i>DESC<\/i> file can contain the following types of line as shown below. Later entries in the file override previous values.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Empty lines are ignored. <b><br \/> charset<\/b><\/p>\n<p style=\"margin-left:22%;\">This line and everything following in the file are ignored. It is allowed for the sake of backwards compatibility.<\/p>\n<p style=\"margin-left:11%;\"><b>family<\/b> <i>fam<\/i><\/p>\n<p style=\"margin-left:22%;\">The default font family is <i>fam<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>fonts<\/b> <i>n F1 F2 F3 &#8230; Fn<\/i><\/p>\n<p style=\"margin-left:22%;\">Fonts <i>F1<\/i>, &#8230;, <i>Fn<\/i> are mounted in the font positions <i>m<\/i>+1, &#8230;, <i>m<\/i>+<i>n<\/i> where <i>m<\/i> is the number of styles. This command may extend over more than one line. A font name of\u00a0<b>0<\/b> causes no font to be mounted on the corresponding font position.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><b>hor<\/b> <i>n<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"69%\">\n<p>The horizontal resolution is <i>n\u00a0<\/i>machine units.<\/p>\n<\/td>\n<td width=\"9%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>image_generator<\/b> <i>string<\/i><\/p>\n<p style=\"margin-left:22%;\">Needed for <b>grohtml<\/b> only. It specifies the program to generate PNG images from PostScript input. Under GNU\/Linux this is usually <i>gs<\/i> but under other systems (notably cygwin) it might be set to another name.<\/p>\n<p style=\"margin-left:11%;\"><b>paperlength<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">The physical vertical dimension of the output medium in machine units. This isn\u2019t used by <b>troff<\/b> itself but by output devices. Deprecated. Use <b>papersize<\/b> instead.<\/p>\n<p style=\"margin-left:11%;\"><b>papersize<\/b> <i>string<\/i><\/p>\n<p style=\"margin-left:22%;\">Select a paper size. Valid values for <i>string<\/i> are the ISO paper types A0\u2013A7, B0\u2013B7, C0\u2013C7, D0\u2013D7, DL, and the US paper types letter, legal, tabloid, ledger, statement, executive, com10, and monarch. Case is not significant for <i>string<\/i> if it holds predefined paper types. Alternatively, <i>string<\/i> can be a file name (e.g. <i>\/etc\/papersize<\/i>); if the file can be opened, <b>groff<\/b> reads the first line and tests for the above paper sizes. Finally, <i>string<\/i> can be a custom paper size in the format <i>length<\/i><b>,<\/b><i>width<\/i> (no spaces before and after the comma). Both <i>length<\/i> and <i>width<\/i> must have a unit appended; valid values are \u2018i\u2019 for inches, \u2018c\u2019 for centimeters, \u2018p\u2019 for points, and \u2018P\u2019 for picas. Example: <b>12c,235p<\/b>. An argument which starts with a digit is always treated as a custom paper format. <b>papersize<\/b> sets both the vertical and horizontal dimension of the output medium.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">More than one argument can be specified; <b>groff<\/b> scans from left to right and uses the first valid paper specification.<\/p>\n<p style=\"margin-left:11%;\"><b>paperwidth<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">The physical horizontal dimension of the output medium in machine units. Deprecated. Use <b>papersize<\/b> instead. This isn\u2019t used by <b>troff<\/b> itself but by output devices.<\/p>\n<p style=\"margin-left:11%;\"><b>pass_filenames<\/b><\/p>\n<p style=\"margin-left:22%;\">Make troff tell the driver the source file name being processed. This is achieved by another tcommand: <b>F\u00a0<\/b><i>filename<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>postpro<\/b> <i>program<\/i><\/p>\n<p style=\"margin-left:22%;\">Use <i>program<\/i> as the postprocessor.<\/p>\n<p style=\"margin-left:11%;\"><b>prepro<\/b> <i>program<\/i><\/p>\n<p style=\"margin-left:22%;\">Call <i>program<\/i> as a preprocessor.<\/p>\n<p style=\"margin-left:11%;\"><b>print<\/b> <i>program<\/i><\/p>\n<p style=\"margin-left:22%;\">Use <i>program<\/i> as the spooler program for printing. If omitted, the <b>\u2212l<\/b> and <b>\u2212L<\/b> options of <b>groff<\/b> are ignored.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><b>res<\/b> <i>n<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"53%\">\n<p>There are <i>n<\/i> machine units per inch.<\/p>\n<\/td>\n<td width=\"25%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>sizes<\/b> <i>s1 s2 &#8230; sn<\/i> <b>0<\/b><\/p>\n<p style=\"margin-left:22%;\">This means that the device has fonts at <i>s1<\/i>, <i>s2<\/i>, &#8230;, <i>sn<\/i> scaled points. The list of sizes must be terminated by a <b>0<\/b>. Each <i>si<\/i> can also be a range of sizes <i>m<\/i>\u2013<i>n<\/i>. The list can extend over more than one line.<\/p>\n<p style=\"margin-left:11%;\"><b>sizescale<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">The scale factor for point sizes. By default this has a value of 1. One <i>scaled point<\/i> is equal to one point\/<i>n<\/i>. The arguments to the <b>unitwidth<\/b> and <b>sizes<\/b> commands are given in scaled points.<\/p>\n<p style=\"margin-left:11%;\"><b>styles<\/b> <i>S1 S2 &#8230; Sm<\/i><\/p>\n<p style=\"margin-left:22%;\">The first <i>m<\/i> font positions are associated with styles <i>S1<\/i>, &#8230;, <i>Sm<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>tcommand<\/b><\/p>\n<p style=\"margin-left:22%;\">This means that the postprocessor can handle the <b>t<\/b> and\u00a0<b>u<\/b> output commands.<\/p>\n<p style=\"margin-left:11%;\"><b>unicode<\/b><\/p>\n<p style=\"margin-left:22%;\">Indicate that the output device supports the complete Unicode repertoire. Useful only for devices which produce <i>character entities<\/i> instead of glyphs.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If <b>unicode<\/b> is present, no <b>charset<\/b> section is required in the font description files since the Unicode handling built into <b>groff<\/b> is used. However, if there are entries in a <b>charset<\/b> section, they either override the default mappings for those particular characters or add new mappings (normally for composite characters).<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">This is used for <b>\u2212Tutf8<\/b>, <b>\u2212Thtml<\/b>, and <b>\u2212Txhtml<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>unitwidth<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">Quantities in the font files are given in machine units for fonts whose point size is <i>n\u00a0<\/i>scaled points.<\/p>\n<p style=\"margin-left:11%;\"><b>unscaled_charwidths<\/b><\/p>\n<p style=\"margin-left:22%;\">Make the font handling module always return unscaled glyph widths. Needed for the <b>grohtml<\/b> device.<\/p>\n<p style=\"margin-left:11%;\"><b>use_charnames_in_special<\/b><\/p>\n<p style=\"margin-left:22%;\">This command indicates that troff should encode named glyphs inside special commands.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>vert<\/b> <i>n<\/i><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"66%\">\n<p>The vertical resolution is <i>n\u00a0<\/i>machine units.<\/p>\n<\/td>\n<td width=\"12%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>res<\/b>, <b>unitwidth<\/b>, <b>fonts<\/b>, and <b>sizes<\/b> lines are compulsory. Not all commands in the <i>DESC<\/i> file are used by <b>troff<\/b> itself; some of the keywords (or even additional ones) are used by postprocessors to store arbitrary information about the device.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Here a list of obsolete keywords which are recognized by <b>groff<\/b> but completely ignored: <b>spare1<\/b>, <b>spare2<\/b>, <b>biggestfont<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Font file format<\/b> <br \/> A font file has two sections; empty lines are ignored in both of them.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The first section is a sequence of lines each containing a sequence of blank delimited words; the first word in the line is a key, and subsequent words give a value for that key. <b><br \/> ligatures<\/b> <i>lig1 lig2 &#8230; lign<\/i> [<b>0<\/b>]<\/p>\n<p style=\"margin-left:22%;\">Glyphs <i>lig1<\/i>, <i>lig2<\/i>, &#8230;, <i>lign<\/i> are ligatures; possible ligatures are <b>ff<\/b>, <b>fi<\/b>, <b>fl<\/b>, <b>ffi<\/b>, and <b>ffl<\/b>. For backwards compatibility, the list of ligatures may be terminated with a\u00a0<b>0<\/b>. The list of ligatures may not extend over more than one line.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>name<\/b> <i>F<\/i><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"40%\">\n<p>The name of the font is\u00a0<i>F<\/i>.<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>slant<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">The glyphs of the font have a slant of <i>n\u00a0<\/i>degrees. (Positive means forward.)<\/p>\n<p style=\"margin-left:11%;\"><b>spacewidth<\/b> <i>n<\/i><\/p>\n<p style=\"margin-left:22%;\">The normal width of a space is\u00a0<i>n<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>special<\/b><\/p>\n<p style=\"margin-left:22%;\">The font is <i>special<\/i>; this means that when a glyph is requested that is not present in the current font, it is searched for in any special fonts that are mounted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Other commands are ignored by <b>troff<\/b> but may be used by postprocessors to store arbitrary information about the font in the font file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The first section can contain comments which start with the <b>#<\/b> character and extend to the end of a line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The second section contains one or two subsections. It must contain a <i>charset<\/i> subsection and it may also contain a <i>kernpairs<\/i> subsection. These subsections can appear in any order. Each subsection starts with a word on a line by itself.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The word <b>charset<\/b> starts the charset subsection. The <b>charset<\/b> line is followed by a sequence of lines. Each line gives information for one glyph. A line comprises a number of fields separated by blanks or tabs. The format is<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>name metrics type code<\/i> [<i>entity_name<\/i>] [<b>\u2212\u2212<\/b> <i>comment<\/i>]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>name<\/i> identifies the glyph: if <i>name<\/i> is a single glyph <i>c<\/i> then it corresponds to the groff input character <i>c<\/i>; if it is of the form <b><\/b><i>c<\/i> where c is a single character, then it corresponds to the special character <b>[<\/b><i>c<\/i><b>]<\/b>; otherwise it corresponds to the groff input character <b>[<\/b><i>name<\/i><b>]<\/b>. If it is exactly two characters <i>xx<\/i> it can be entered as <b>(<\/b><i>xx<\/i>. Note that single-letter special characters can\u2019t be accessed as <b><\/b><i>c<\/i>; the only exception is \u2018\u2212\u2019 which is identical to \u2018[\u2212]\u2019. The name <b>\u2212\u2212\u2212<\/b> is special and indicates that the glyph is unnamed; such glyphs can only be used by means of the <b>N<\/b> escape sequence in <b>troff<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>type<\/i> field gives the glyph type:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>1<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p>means the glyph has a descender, for example, \u2018p\u2019;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>2<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p>means the glyph has an ascender, for example, \u2018b\u2019;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>3<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p>means the glyph has both an ascender and a descender, for example, \u2018(\u2019.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>code<\/i> field gives the code which the postprocessor uses to print the glyph. The glyph can also be input to groff using this code by means of the <b>N<\/b> escape sequence. The code can be any integer. If it starts with a\u00a0<b>0<\/b> it is interpreted as octal; if it starts with <b>0x<\/b> or <b>0X<\/b> it is interpreted as hexadecimal. Note, however, that the <b>N<\/b> escape sequence only accepts a decimal integer.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>entity_name<\/i> field gives an ASCII string identifying the glyph which the postprocessor uses to print that glyph. This field is optional and is currently used by <b>grops<\/b> to build sub-encoding arrays for PS fonts containing more than 256 glyphs. (It has also been used for <b>grohtml<\/b>\u2019s entity names but for efficiency reasons this data is now compiled directly into <b>grohtml<\/b>.)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Anything on the line after the encoding field or \u2018\u2212\u2212\u2019 are ignored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>metrics<\/i> field has the form (in one line; it is broken here for the sake of readability):<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>width<\/i>[<b>,<\/b><i>height<\/i>[<b>,<\/b><i>depth<\/i>[<b>,<\/b><i>italic-correction<\/i> <br \/> [<b>,<\/b><i>left-italic-correction<\/i>[<b>,<\/b><i>subscript-correction<\/i>]]]]]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There must not be any spaces between these subfields. Missing subfields are assumed to be\u00a00. The subfields are all decimal integers. Since there is no associated binary format, these values are not required to fit into a variable of type <b>char<\/b> as they are in ditroff. The <i>width<\/i> subfields gives the width of the glyph. The <i>height<\/i> subfield gives the height of the glyph (upwards is positive); if a glyph does not extend above the baseline, it should be given a zero height, rather than a negative height. The <i>depth<\/i> subfield gives the depth of the glyph, that is, the distance below the baseline to which the glyph extends (downwards is positive); if a glyph does not extend below the baseline, it should be given a zero depth, rather than a negative depth. The <i>italic-correction<\/i> subfield gives the amount of space that should be added after the glyph when it is immediately to be followed by a glyph from a roman font. The <i>left-italic-correction<\/i> subfield gives the amount of space that should be added before the glyph when it is immediately to be preceded by a glyph from a roman font. The <i>subscript-correction<\/i> gives the amount of space that should be added after a glyph before adding a subscript. This should be less than the italic correction.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A line in the charset section can also have the format<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>name<\/i> <b>&#8220;<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This indicates that <i>name<\/i> is just another name for the glyph mentioned in the preceding line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The word <b>kernpairs<\/b> starts the kernpairs section. This contains a sequence of lines of the form:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>c1 c2 n<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This means that when glyph <i>c1<\/i> appears next to glyph <i>c2<\/i> the space between them should be increased by\u00a0<i>n<\/i>. Most entries in kernpairs section have a negative value for\u00a0<i>n<\/i>.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/usr\/share\/groff\/1.22.4\/font\/dev<\/i>name<i>\/DESC<\/i><\/p>\n<p style=\"margin-left:22%;\">Device description file for device <i>name<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>\/usr\/share\/groff\/1.22.4\/font\/dev<\/i>name<i>\/<\/i>F<\/p>\n<p style=\"margin-left:22%;\">Font file for font\u00a0<i>F<\/i> of device <i>name<\/i>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>groff_out<\/b>(5), <b>troff<\/b>(1), <b>addftinfo<\/b>(1), <b>afmtodit<\/b>(1)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A man page <i>name<\/i>(<i>n<\/i>) of section <i>n<\/i> can be viewed either with<\/p>\n<p style=\"margin-left:22%;\">$ <b>man<\/b> <i>n name<\/i><\/p>\n<p style=\"margin-left:11%;\">for text mode or<\/p>\n<p style=\"margin-left:22%;\">$ <b>groffer<\/b> <i>n name<\/i><\/p>\n<p style=\"margin-left:11%;\">for graphical mode (default is PDF mode).<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  groff_font \u2212 format of groff device and font description files <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1425,1291],"class_list":["post-4437","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-groff_font","tag-man5"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4437"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4437\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}