{
    "mode": "man",
    "parameter": "ttf2pk",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ttf2pk/1/json",
    "generated": "2026-06-15T16:42:08Z",
    "synopsis": "ttf2pk [-q] [-n] font-name resolution\nttf2pk -t [-q] font-name\nttf2pk --version | --help",
    "sections": {
        "NAME": {
            "content": "ttf2pk - convert a TrueType font into TeX's PK format\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ttf2pk [-q] [-n] font-name resolution\nttf2pk -t [-q] font-name\nttf2pk --version | --help\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  program converts a TrueType font into a PK file; the created font can then be used with\nTeX or LaTeX.\n\nCJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts as created by ttf2tfm  are  also  sup‐\nported.\n\nttf2pk always assumes 10pt as the design size for the written TeX font.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "",
            "subsections": [
                {
                    "name": "-q",
                    "content": "cept warning and error messages.\n",
                    "flag": "-q"
                },
                {
                    "name": "-n",
                    "content": "",
                    "flag": "-n"
                },
                {
                    "name": "-t",
                    "content": "sponding line of a map file (default: ttfonts.map), provided the -q switch isn't set.\n\nfont-name\nThe  TeX  name  of  the font.  ttf2pk looks this name up in a map file (see below) for\nfurther information how to process the font.\n\nresolution\nThe resolution, given in dots per inch.  Currently the horizontal resolution is  equal\nto the vertical resolution.  The design size is always assumed to be 10pt.\n",
                    "flag": "-t"
                },
                {
                    "name": "--version",
                    "content": "Shows the current version of ttf2pk and the used file search library (e.g. kpathsea).\n\n--help Shows usage information.\n\nEnvironment variables for file searching are described in the manual page of ttf2tfm.\n",
                    "long": "--version"
                }
            ]
        },
        "THE CONFIGURATION FILE": {
            "content": "ttf2pk  uses a small configuration file called ttf2pk.cfg; in each line it contains a keyword\nwith its value, separated by whitespace.  Comment lines can start with any of  the  following\ncharacters: `*', `#', `;', and `%'.  Leading whitespace is ignored.\n\nCurrently, only one keyword, `map', is recognized in this file; it takes a map file name as a\nparameter.  If no extension is given to the map file name, .map is appended.   No  whitespace\nis  allowed  in  the map file name.  The `map' keyword can be given more than once to specify\nmultiple map files; if the map file name is prepended by a plus sign, it is added to the list\nof map files to be used.  Example:\n\nmap  foo\nmap +bar\n\nThis makes ttf2pk to first read foo.map, then bar.map.\n\nIf the configuration file is not found, ttf2pk tries to use ttfonts.map instead.\n",
            "subsections": []
        },
        "MAP FILES": {
            "content": "Parameters  specified  to ttf2tfm are preserved for ttf2pk in map files—ttf2tfm writes out to\nstandard output, as the last line, a proper entry for a map file.\n\nAs an example, a call to\n\nttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials\n\nwill produce the following line:\n\narials   arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc\n\nSee ttf2tfm(1) and afm2tfm(1) of the dvips package for a  detailed  description  of  encoding\nfiles.\n\nHere  a  table  listing the various ttf2tfm parameters and the corresponding entries in a map\nfile:\n\n-s                  Slant\n-e                  Extend\n-p                  Encoding\n-f                  Fontindex\n-P                  Pid\n-E                  Eid\n-n                  PS=Yes\n-N                  PS=Only\n-R                  Replacement\n-x                  Rotate=Yes\n-y                  Y-Offset\n\nSingle replacement glyph names given to ttf2tfm with `-r old-glyphname new-glyphname' are di‐\nrectly specified with `old-glyphname=new-glyphname'.  They will be ignored if in subfont mode\nor if no encoding file is given.\n\nOne additional parameter in a map file is unique to ttf2pk: `Hinting',  which  can  take  the\nvalues `On' or `Off'.  Some fonts (e.g. the CJK part of cyberbit.ttf) are rendered incorrect‐\nly if hinting is activated.  Default is `On' (you can also use `Yes', `No', `1', and `0').\n\nFor a description of subfonts (i.e., entries of the form `<namestem>@<sfd-filename>@') please\nrefer to ttf2tfm(1).\n\nThe format of a map file is simple.  Each line defines a font; first comes the TeX font name,\nthen its TrueType font file name, followed by the parameters in any order.  Case is  signifi‐\ncant  (even  for  parameter  names); the parameters are separated from its values by an equal\nsign, with whitespace possibly surrounding it.  ttf2pk reads in all map files line by line in\nthe  order  given  in  the configuration file, continuing until the TeX font specified on the\ncommand line is found, otherwise the programs exits with error code 2.  Thus you can use  any\ncharacter invalid in a TeX font name to start a comment line.\n\nYou  can  use `\\' as the final character of a line to indicate that the input is continued on\nthe next line.  The backslash and the following newline character will be removed.\n\nttf2pk will abort if it can't find or read the TeX font metrics file of the  given  TeX  font\nname.\n",
            "subsections": []
        },
        "RETURN VALUE": {
            "content": "If  the  call  was  successful, 0 will be returned.  In case of error, the return value is 1.\nFinally, if the font can't be found in the map files, 2 is returned.  This simplifies the in‐\nclusion of ttf2pk into scripts like mktexpk for automatic font generation.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ttf2tfm(1), afm2tfm(1)\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "ttf2pk is part of the FreeType 1 package, a high quality TrueType rendering library.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Werner LEMBERG <wl@gnu.org>\nFrédéric LOYER <loyer@ensta.fr>\n\n\n\nFreeType2 version                            04-May-2011                                   TTF2PK(1)",
            "subsections": []
        }
    },
    "summary": "ttf2pk - convert a TrueType font into TeX's PK format",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ttf2tfm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ttf2tfm/1/json"
        },
        {
            "name": "afm2tfm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/afm2tfm/1/json"
        }
    ]
}