{
    "content": [
        {
            "type": "text",
            "text": "# pbmtext (man)\n\n## NAME\n\npbmtext - render text into a bitmap\n\n## SYNOPSIS\n\npbmtext [-font fontfile] [-builtin fontname] [-space pixels] [-lspace pixels] [text]\n\n## DESCRIPTION\n\nTakes  the  specified text, either a single line from the command line or multiple lines from\nstandard input, and renders it into a bitmap.\n\n## TLDR\n\n> Render text as a PBM image.\n\n- Render a single line of text as a PBM image:\n  `pbmtext \"{{Hello World!}}\" > {{path/to/output.pbm}}`\n- Render multiple lines of text as a PBM image:\n  `echo \"{{Hello\\nWorld!}}\" | pbmtext > {{path/to/output.pbm}}`\n- Render text using a custom font supplied as a PBM file:\n  `pbmtext {{-f|-font}} {{path/to/font.pbm}} \"{{Hello World!}}\" > {{path/to/output.pbm}}`\n- Specify the number of pixels between characters and lines:\n  `echo \"{{Hello\\nWorld!}}\" | pbmtext {{-s|-space}} {{3}} {{-ls|-lspace}} {{10}} > {{path/to/output.pbm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (2 subsections)\n- **USAGE** (1 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pbmtext",
        "section": "",
        "mode": "man",
        "summary": "pbmtext - render text into a bitmap",
        "synopsis": "pbmtext [-font fontfile] [-builtin fontname] [-space pixels] [-lspace pixels] [text]",
        "tldr_summary": "Render text as a PBM image.",
        "tldr_examples": [
            {
                "description": "Render a single line of text as a PBM image",
                "command": "pbmtext \"{{Hello World!}}\" > {{path/to/output.pbm}}"
            },
            {
                "description": "Render multiple lines of text as a PBM image",
                "command": "echo \"{{Hello\\nWorld!}}\" | pbmtext > {{path/to/output.pbm}}"
            },
            {
                "description": "Render text using a custom font supplied as a PBM file",
                "command": "pbmtext {{-f|-font}} {{path/to/font.pbm}} \"{{Hello World!}}\" > {{path/to/output.pbm}}"
            },
            {
                "description": "Specify the number of pixels between characters and lines",
                "command": "echo \"{{Hello\\nWorld!}}\" | pbmtext {{-s|-space}} {{3}} {{-ls|-lspace}} {{10}} > {{path/to/output.pbm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "By default, pbmtext uses a built-in font called bdf (about a 10 point Times-Roman font). You can use a fixed width font by specifying -builtin fixed. You can also specify your own font with the -font flag. The fontfile is either a BDF file from the X window system or a PBM file. If the fontfile is a PBM file, it is created in a very specific way. In your window system of choice, display the following text in the desired (fixed-width) font: M \",/^[`jpqy| M / !\"#$%&'()*+ / < ,-./01234567 < > 89:;<=>?@ABC > @ DEFGHIJKLMNO @ PQRSTUVWXYZ[ { \\]^`abcdefg { } hijklmnopqrs } ~ tuvwxyz{|}~ ~ M \",/^[`jpqy| M Do a screen grab or window dump of that text, using for instance xwd, xgrabsc, or screendump. Convert the result into a pbm file. If necessary, use pnmcut to remove everything except the text. Finally, run it through pnmcrop to make sure the edges are right up against the text. pbmtext can figure out the sizes and spacings from that."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Add pixels pixels of space between characters. This is in addition to whatever space surrounding characters is built into the font, which is usually enough to produce a reasonable string of text. pixels may be negative to crowd text together, but the author has not put much thought or testing into how this works in every possible case, so it might cause disastrous results. -B -lspace pixels Add pixels pixels of space between lines. This is in addition to whatever space above and below characters is built into the font, which is usually enough to produce a rea‐ sonable line spacing. pixels must be a whole number. pixels may be negative to crowd lines together, but the author has not put much thought or testing into how this works in every possible case, so it might cause dis‐ astrous results."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pnmcut",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcut/1/json"
            },
            {
                "name": "pnmcrop",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcrop/1/json"
            },
            {
                "name": "pnmcomp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcomp/1/json"
            },
            {
                "name": "ppmchange",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmchange/1/json"
            },
            {
                "name": "pnmrotate",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmrotate/1/json"
            },
            {
                "name": "pbmtextps",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pbmtextps/1/json"
            },
            {
                "name": "ppmlabel",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmlabel/1/json"
            },
            {
                "name": "pbm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pbm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-font -builtin",
                        "lines": 29
                    },
                    {
                        "name": "-space",
                        "lines": 22
                    }
                ]
            },
            {
                "name": "USAGE",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-alpha",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pbmtext - render text into a bitmap\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pbmtext [-font fontfile] [-builtin fontname] [-space pixels] [-lspace pixels] [text]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Takes  the  specified text, either a single line from the command line or multiple lines from\nstandard input, and renders it into a bitmap.\n\nIn the bitmap, each line of input is a line of output.  Formatting characters such as newline\nhave no effect on the formatting; like any unprintable character, they turn into spaces.\n\nThe  bitmap  is  just  wide  enough for the longest line of text, plus margins, and just high\nenough to contain the lines of text, plus margins.  The left and right margins are twice  the\nwidth  of  the widest character in the font; the top and bottom margins are the height of the\ntallest character in the font.  But if the text is only one line, all the margins are half of\nthis.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-font -builtin",
                        "content": "By  default,  pbmtext  uses  a  built-in font called bdf (about a 10 point Times-Roman\nfont).  You can use a fixed width font by specifying -builtin fixed.\n\nYou can also specify your own font with the -font flag.  The fontfile is either a  BDF\nfile from the X window system or a PBM file.\n\nIf  the  fontfile is a PBM file, it is created in a very specific way.  In your window\nsystem of choice, display the following text in the desired (fixed-width) font:\n\nM \",/^[`jpqy| M\n\n/  !\"#$%&'()*+ /\n< ,-./01234567 <\n> 89:;<=>?@ABC >\n@ DEFGHIJKLMNO @\nPQRSTUVWXYZ[\n{ \\]^`abcdefg {\n} hijklmnopqrs }\n~ tuvwxyz{|}~  ~\n\nM \",/^[`jpqy| M\n\nDo a screen grab or window dump of that text, using  for  instance  xwd,  xgrabsc,  or\nscreendump.   Convert  the result into a pbm file.  If necessary, use pnmcut to remove\neverything except the text.  Finally, run it through pnmcrop to make  sure  the  edges\nare  right  up  against  the text.  pbmtext can figure out the sizes and spacings from\nthat.\n\n"
                    },
                    {
                        "name": "-space",
                        "content": "Add pixels pixels of space between characters.  This is in addition to whatever  space\nsurrounding  characters  is  built into the font, which is usually enough to produce a\nreasonable string of text.\n\npixels may be negative to crowd text together, but the author has not put much thought\nor  testing  into  how this works in every possible case, so it might cause disastrous\nresults.\n\n\n-B -lspace pixels\nAdd pixels pixels of space between lines. This is in addition to whatever space  above\nand below characters is built into the font, which is usually enough to produce a rea‐\nsonable line spacing.\n\npixels must be a whole number.\n\npixels may be negative to crowd lines together,  but  the  author  has  not  put  much\nthought  or testing into how this works in every possible case, so it might cause dis‐\nastrous results.\n\n\n"
                    }
                ]
            },
            "USAGE": {
                "content": "Often, you want to place text over another image.  One way to do this is with ppmlabel.  ppm‐‐\nlabel does not give you the font options that pbmtext does, though.\n\nAnother  way  is  to  use pbmtext to create an image containing the text, then use pnmcomp to\noverlay the text image onto your base image.  To make only the text (and not the entire  rec‐\ntangle  containing  it)  cover  the base image, you will need to give pnmcomp a mask, via its",
                "subsections": [
                    {
                        "name": "-alpha",
                        "content": "ify the -invert option to pnmcomp.\n\nIf  you want to overlay colored text instead of black, just use ppmchange to change all black\npixels to the color of your choice before overlaying the text image.  But still use the orig‐\ninal black and white image for the alpha mask.\n\nIf  you  want  the  text at an angle, use pnmrotate on the text image (and alpha mask) before\noverlaying.\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "pnmcut(1), pnmcrop(1), pnmcomp(1),  ppmchange(1),  pnmrotate(1),  pbmtextps(1),  ppmlabel(1),\npbm(5)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 1993 by Jef Poskanzer and George Phillips\n\n\n\n28 January 2001                                pbmtext(1)",
                "subsections": []
            }
        }
    }
}