{
    "content": [
        {
            "type": "text",
            "text": "# Font::AFM (perldoc)\n\n## NAME\n\nFont::AFM - Interface to Adobe Font Metrics files\n\n## SYNOPSIS\n\nuse Font::AFM;\n$h = new Font::AFM \"Helvetica\";\n$copyright = $h->Notice;\n$w = $h->Wx->{\"aring\"};\n$w = $h->stringwidth(\"Gisle\", 10);\n$h->dump;  # for debugging\n\n## DESCRIPTION\n\nThis module implements the Font::AFM class. Objects of this class are initialised from an AFM\n(Adobe Font Metrics) file and allow you to obtain information about the font and the metrics of\nthe various glyphs in the font.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ENVIRONMENT**\n- **BUGS**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Font::AFM",
        "section": "",
        "mode": "perldoc",
        "summary": "Font::AFM - Interface to Adobe Font Metrics files",
        "synopsis": "use Font::AFM;\n$h = new Font::AFM \"Helvetica\";\n$copyright = $h->Notice;\n$w = $h->Wx->{\"aring\"};\n$w = $h->stringwidth(\"Gisle\", 10);\n$h->dump;  # for debugging",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 98,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Font::AFM - Interface to Adobe Font Metrics files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Font::AFM;\n$h = new Font::AFM \"Helvetica\";\n$copyright = $h->Notice;\n$w = $h->Wx->{\"aring\"};\n$w = $h->stringwidth(\"Gisle\", 10);\n$h->dump;  # for debugging\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module implements the Font::AFM class. Objects of this class are initialised from an AFM\n(Adobe Font Metrics) file and allow you to obtain information about the font and the metrics of\nthe various glyphs in the font.\n\nAll measurements in AFM files are given in terms of units equal to 1/1000 of the scale factor of\nthe font being used. To compute actual sizes in a document, these amounts should be multiplied\nby (scale factor of font)/1000.\n\nThe following methods are available:\n\n$afm = Font::AFM->new($fontname)\nObject constructor. Takes the name of the font as argument. Croaks if the font can not be\nfound.\n\n$afm->latin1wxtable()\nReturns a 256-element array, where each element contains the width of the corresponding\ncharacter in the iso-8859-1 character set.\n\n$afm->stringwidth($string, [$fontsize])\nReturns the width of the argument string. The string is assumed to be encoded in the\niso-8859-1 character set. A second argument can be used to scale the width according to the\nfont size.\n\n$afm->FontName\nThe name of the font as presented to the PostScript language \"findfont\" operator, for\ninstance \"Times-Roman\".\n\n$afm->FullName\nUnique, human-readable name for an individual font, for instance \"Times Roman\".\n\n$afm->FamilyName\nHuman-readable name for a group of fonts that are stylistic variants of a single design. All\nfonts that are members of such a group should have exactly the same \"FamilyName\". Example of\na family name is \"Times\".\n\n$afm->Weight\nHuman-readable name for the weight, or \"boldness\", attribute of a font. Examples are \"Roman\",\n\"Bold\", \"Light\".\n\n$afm->ItalicAngle\nAngle in degrees counterclockwise from the vertical of the dominant vertical strokes of the\nfont.\n\n$afm->IsFixedPitch\nIf \"true\", the font is a fixed-pitch (monospaced) font.\n\n$afm->FontBBox\nA string of four numbers giving the lower-left x, lower-left y, upper-right x, and\nupper-right y of the font bounding box. The font bounding box is the smallest rectangle\nenclosing the shape that would result if all the characters of the font were placed with\ntheir origins coincident, and then painted.\n\n$afm->UnderlinePosition\nRecommended distance from the baseline for positioning underline strokes. This number is the\ny coordinate of the center of the stroke.\n\n$afm->UnderlineThickness\nRecommended stroke width for underlining.\n\n$afm->Version\nVersion number of the font.\n\n$afm->Notice\nTrademark or copyright notice, if applicable.\n\n$afm->Comment\nComments found in the AFM file.\n\n$afm->EncodingScheme\nThe name of the standard encoding scheme for the font. Most Adobe fonts use the\n\"AdobeStandardEncoding\". Special fonts might state \"FontSpecific\".\n\n$afm->CapHeight\nUsually the y-value of the top of the capital H.\n\n$afm->XHeight\nTypically the y-value of the top of the lowercase x.\n\n$afm->Ascender\nTypically the y-value of the top of the lowercase d.\n\n$afm->Descender\nTypically the y-value of the bottom of the lowercase p.\n\n$afm->Wx\nReturns a hash table that maps from glyph names to the width of that glyph.\n\n$afm->BBox\nReturns a hash table that maps from glyph names to bounding box information. The bounding box\nconsist of four numbers: llx, lly, urx, ury.\n\n$afm->dump\nDumps the content of the Font::AFM object to STDOUT. Might sometimes be useful for debugging.\n\nThe AFM specification can be found at:\n\nhttp://partners.adobe.com/asn/developer/pdfs/tn/5004.AFMSpec.pdf\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "METRICS   Contains the path to search for AFM-files. Format is as for the PATH environment\nvariable. The default path built into this library is:\n\n/usr/lib/afm:/usr/local/lib/afm:/usr/openwin/lib/fonts/afm/:.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Kerning data and composite character data are not yet parsed. Ligature data is not parsed.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 1995-1998 Gisle Aas. All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}