{
    "content": [
        {
            "type": "text",
            "text": "# GROFF_FONT (man)\n\n## NAME\n\ngrofffont - format of groff device and font description files\n\n## DESCRIPTION\n\nThe  groff  font format is roughly a superset of the ditroff font format.  The font files for\ndevice name are stored in a directory devname.  There are two types of  file:  a  device  de‐\nscription  file called DESC and for each font F, a font file called F.  These are text files;\nunlike the ditroff font format, there is no associated binary format.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (6 subsections)\n- **FILES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "GROFF_FONT",
        "section": "",
        "mode": "man",
        "summary": "grofffont - format of groff device and font description files",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "groffout",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/groffout/5/json"
            },
            {
                "name": "troff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/troff/1/json"
            },
            {
                "name": "addftinfo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/addftinfo/1/json"
            },
            {
                "name": "afmtodit",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/afmtodit/1/json"
            },
            {
                "name": "name",
                "section": "n",
                "url": "https://www.chedong.com/phpMan.php/man/name/n/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": [
                    {
                        "name": "DESC file format",
                        "lines": 5
                    },
                    {
                        "name": "charset",
                        "lines": 71
                    },
                    {
                        "name": "tcommand",
                        "lines": 2
                    },
                    {
                        "name": "unicode",
                        "lines": 30
                    },
                    {
                        "name": "Font file format",
                        "lines": 18
                    },
                    {
                        "name": "special",
                        "lines": 83
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 11,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "grofffont - format of groff device and font description files\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  groff  font format is roughly a superset of the ditroff font format.  The font files for\ndevice name are stored in a directory devname.  There are two types of  file:  a  device  de‐\nscription  file called DESC and for each font F, a font file called F.  These are text files;\nunlike the ditroff font format, there is no associated binary format.\n",
                "subsections": [
                    {
                        "name": "DESC file format",
                        "content": "The DESC file can contain the following types of line as shown below.  Later entries  in  the\nfile override previous values.\n\nEmpty lines are ignored.\n"
                    },
                    {
                        "name": "charset",
                        "content": "This  line  and  everything  following in the file are ignored.  It is allowed for the\nsake of backwards compatibility.\n\nfamily fam\nThe default font family is fam.\n\nfonts n F1 F2 F3 ... Fn\nFonts F1, ..., Fn are mounted in the font positions m+1, ..., m+n where m is the  num‐\nber  of  styles.   This  command may extend over more than one line.  A font name of 0\ncauses no font to be mounted on the corresponding font position.\n\nhor n  The horizontal resolution is n machine units.\n\nimagegenerator string\nNeeded for grohtml only.  It specifies the program to generate PNG images  from  Post‐\nScript  input.   Under  GNU/Linux  this is usually gs but under other systems (notably\ncygwin) it might be set to another name.\n\npaperlength n\nThe physical vertical dimension of the output medium in  machine  units.   This  isn't\nused by troff itself but by output devices.  Deprecated.  Use papersize instead.\n\npapersize string\nSelect  a  paper  size.  Valid values for string are the ISO paper types A0–A7, B0–B7,\nC0–C7, D0–D7, DL, and the US paper types letter, legal,  tabloid,  ledger,  statement,\nexecutive,  com10, and monarch.  Case is not significant for string if it holds prede‐\nfined paper types.  Alternatively, string can be a file name (e.g. /etc/papersize); if\nthe  file  can  be  opened,  groff  reads the first line and tests for the above paper\nsizes.  Finally, string can be a custom paper size in the format length,width (no spa‐\nces  before  and  after  the comma).  Both length and width must have a unit appended;\nvalid values are ‘i’ for inches, ‘c’ for centimeters, ‘p’ for points, and ‘P’ for  pi‐\ncas.  Example: 12c,235p.  An argument which starts with a digit is always treated as a\ncustom paper format.  papersize sets both the vertical and horizontal dimension of the\noutput medium.\n\nMore  than  one argument can be specified; groff scans from left to right and uses the\nfirst valid paper specification.\n\npaperwidth n\nThe physical horizontal dimension of the output medium in machine units.   Deprecated.\nUse papersize instead.  This isn't used by troff itself but by output devices.\n\npassfilenames\nMake  troff tell the driver the source file name being processed.  This is achieved by\nanother tcommand: F filename.\n\npostpro program\nUse program as the postprocessor.\n\nprepro program\nCall program as a preprocessor.\n\nprint program\nUse program as the spooler program for printing.  If omitted, the -l and -L options of\ngroff are ignored.\n\nres n  There are n machine units per inch.\n\nsizes s1 s2 ... sn 0\nThis  means  that  the device has fonts at s1, s2, ..., sn scaled points.  The list of\nsizes must be terminated by a 0.  Each si can also be a range of sizes m–n.  The  list\ncan extend over more than one line.\n\nsizescale n\nThe scale factor for point sizes.  By default this has a value of 1.  One scaled point\nis equal to one point/n.  The arguments to the unitwidth and sizes commands are  given\nin scaled points.\n\nstyles S1 S2 ... Sm\nThe first m font positions are associated with styles S1, ..., Sm.\n"
                    },
                    {
                        "name": "tcommand",
                        "content": "This means that the postprocessor can handle the t and u output commands.\n"
                    },
                    {
                        "name": "unicode",
                        "content": "Indicate that the output device supports the complete Unicode repertoire.  Useful only\nfor devices which produce character entities instead of glyphs.\n\nIf unicode is present, no charset section is required in the  font  description  files\nsince the Unicode handling built into groff is used.  However, if there are entries in\na charset section, they either override the  default  mappings  for  those  particular\ncharacters or add new mappings (normally for composite characters).\n\nThis is used for -Tutf8, -Thtml, and -Txhtml.\n\nunitwidth n\nQuantities  in the font files are given in machine units for fonts whose point size is\nn scaled points.\n\nunscaledcharwidths\nMake the font handling module always return unscaled glyph  widths.   Needed  for  the\ngrohtml device.\n\nusecharnamesinspecial\nThis command indicates that troff should encode named glyphs inside special commands.\n\nvert n The vertical resolution is n machine units.\n\nThe res, unitwidth, fonts, and sizes lines are compulsory.  Not all commands in the DESC file\nare used by troff itself; some of the keywords (or even additional ones) are used by postpro‐\ncessors to store arbitrary information about the device.\n\nHere  a  list  of  obsolete  keywords  which  are recognized by groff but completely ignored:\nspare1, spare2, biggestfont.\n"
                    },
                    {
                        "name": "Font file format",
                        "content": "A font file has two sections; empty lines are ignored in both of them.\n\nThe first section is a sequence of lines each containing a sequence of blank delimited words;\nthe first word in the line is a key, and subsequent words give a value for that key.\n\nligatures lig1 lig2 ... lign [0]\nGlyphs  lig1,  lig2,  ..., lign are ligatures; possible ligatures are ff, fi, fl, ffi,\nand ffl.  For backwards compatibility, the list of ligatures may  be  terminated  with\na 0.  The list of ligatures may not extend over more than one line.\n\nname F The name of the font is F.\n\nslant n\nThe glyphs of the font have a slant of n degrees.  (Positive means forward.)\n\nspacewidth n\nThe normal width of a space is n.\n"
                    },
                    {
                        "name": "special",
                        "content": "The  font is special; this means that when a glyph is requested that is not present in\nthe current font, it is searched for in any special fonts that are mounted.\n\nOther commands are ignored by troff but may be used by postprocessors to store arbitrary  in‐\nformation about the font in the font file.\n\nThe first section can contain comments which start with the # character and extend to the end\nof a line.\n\nThe second section contains one or two subsections.  It must contain a charset subsection and\nit may also contain a kernpairs subsection.  These subsections can appear in any order.  Each\nsubsection starts with a word on a line by itself.\n\nThe word charset starts the charset subsection.  The charset line is followed by  a  sequence\nof  lines.   Each  line gives information for one glyph.  A line comprises a number of fields\nseparated by blanks or tabs.  The format is\n\nname metrics type code [entityname] [-- comment]\n\nname identifies the glyph: if name is a single glyph c then it corresponds to the groff input\ncharacter  c;  if  it is of the form \\c where c is a single character, then it corresponds to\nthe special character \\[c]; otherwise it corresponds to the groff  input  character  \\[name].\nIf  it  is exactly two characters xx it can be entered as \\(xx.  Note that single-letter spe‐\ncial characters can't be accessed as \\c; the only exception is ‘\\-’  which  is  identical  to\n‘\\[-]’.   The  name  ---  is special and indicates that the glyph is unnamed; such glyphs can\nonly be used by means of the \\N escape sequence in troff.\n\nThe type field gives the glyph type:\n\n1      means the glyph has a descender, for example, ‘p’;\n\n2      means the glyph has an ascender, for example, ‘b’;\n\n3      means the glyph has both an ascender and a descender, for example, ‘(’.\n\nThe code field gives the code which the postprocessor uses to print the glyph.  The glyph can\nalso  be  input to groff using this code by means of the \\N escape sequence.  The code can be\nany integer.  If it starts with a 0 it is interpreted as octal; if it starts with 0x or 0X it\nis  interpreted  as  hexadecimal.   Note, however, that the \\N escape sequence only accepts a\ndecimal integer.\n\nThe entityname field gives an ASCII string identifying the  glyph  which  the  postprocessor\nuses  to  print  that  glyph.  This field is optional and is currently used by grops to build\nsub-encoding arrays for PS fonts containing more than 256 glyphs.  (It has also been used for\ngrohtml's  entity  names  but  for efficiency reasons this data is now compiled directly into\ngrohtml.)\n\nAnything on the line after the encoding field or ‘--’ are ignored.\n\nThe metrics field has the form (in one line; it is broken here for the sake of readability):\n\nwidth[,height[,depth[,italic-correction\n[,left-italic-correction[,subscript-correction]]]]]\n\nThere must not be any spaces between these subfields.  Missing subfields are assumed to be 0.\nThe  subfields  are  all decimal integers.  Since there is no associated binary format, these\nvalues are not required to fit into a variable of type char as  they  are  in  ditroff.   The\nwidth  subfields  gives  the width of the glyph.  The height subfield gives the height of the\nglyph (upwards is positive); if a glyph does not extend above  the  baseline,  it  should  be\ngiven  a  zero  height, rather than a negative height.  The depth subfield gives the depth of\nthe glyph, that is, the distance below the baseline to which the glyph extends (downwards  is\npositive);  if  a  glyph does not extend below the baseline, it should be given a zero depth,\nrather than a negative depth.  The italic-correction subfield gives the amount of space  that\nshould be added after the glyph when it is immediately to be followed by a glyph from a roman\nfont.  The left-italic-correction subfield gives the amount of space that should be added be‐\nfore  the glyph when it is immediately to be preceded by a glyph from a roman font.  The sub‐\nscript-correction gives the amount of space that should be added after a glyph before  adding\na subscript.  This should be less than the italic correction.\n\nA line in the charset section can also have the format\n\nname \"\n\nThis indicates that name is just another name for the glyph mentioned in the preceding line.\n\nThe  word  kernpairs  starts the kernpairs section.  This contains a sequence of lines of the\nform:\n\nc1 c2 n\n\nThis means that when glyph c1 appears next to glyph c2 the space between them should  be  in‐\ncreased by n.  Most entries in kernpairs section have a negative value for n.\n"
                    }
                ]
            },
            "FILES": {
                "content": "/usr/share/groff/1.22.4/font/devname/DESC\nDevice description file for device name.\n\n/usr/share/groff/1.22.4/font/devname/F\nFont file for font F of device name.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "groffout(5), troff(1), addftinfo(1), afmtodit(1)\n\nA man page name(n) of section n can be viewed either with\n$ man n name\nfor text mode or\n$ groffer n name\nfor graphical mode (default is PDF mode).\n\n\n\ngroff 1.22.4                                23 March 2022                              GROFFFONT(5)",
                "subsections": []
            }
        }
    }
}