{
    "content": [
        {
            "type": "text",
            "text": "# Font::TTF::OS_2 (perldoc)\n\n## NAME\n\nFont::TTF::OS2 - the OS/2 table in a TTF font\n\n## DESCRIPTION\n\nThe OS/2 table has two versions and forms, one an extension of the other. This module supports\nboth forms and the switching between them.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **INSTANCE VARIABLES**\n- **METHODS**\n- **BUGS**\n- **AUTHOR**\n- **LICENSING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Font::TTF::OS_2",
        "section": "",
        "mode": "perldoc",
        "summary": "Font::TTF::OS2 - the OS/2 table in a TTF font",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "INSTANCE VARIABLES",
                "lines": 52,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 50,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSING",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Font::TTF::OS2 - the OS/2 table in a TTF font\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The OS/2 table has two versions and forms, one an extension of the other. This module supports\nboth forms and the switching between them.\n",
                "subsections": []
            },
            "INSTANCE VARIABLES": {
                "content": "No other variables than those in table and those in the standard:\n\nVersion\nxAvgCharWidth\nusWeightClass\nusWidthClass\nfsType\nySubscriptXSize\nySubScriptYSize\nySubscriptXOffset\nySubscriptYOffset\nySuperscriptXSize\nySuperscriptYSize\nySuperscriptXOffset\nySuperscriptYOffset\nyStrikeoutSize\nyStrikeoutPosition\nsFamilyClass\nbFamilyType\nbSerifStyle\nbWeight\nbProportion\nbContrast\nbStrokeVariation\nbArmStyle\nbLetterform\nbMidline\nbXheight\nulUnicodeRange1\nulUnicodeRange2\nulUnicodeRange3\nulUnicodeRange4\nachVendID\nfsSelection\nusFirstCharIndex\nusLastCharIndex\nsTypoAscender\nsTypoDescender\nsTypoLineGap\nusWinAscent\nusWinDescent\nulCodePageRange1\nulCodePageRange2\nxHeight\nCapHeight\ndefaultChar\nbreakChar\nmaxLookups\n\nNotice that versions 0, 1, 2 & 3 of the table are supported. Notice also that the Panose\nvariable has been broken down into its elements.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$t->read\nReads in the various values from disk (see details of OS/2 table)\n\n$t->out($fh)\nWrites the table to a file either from memory or by copying.\n\n$t->XMLelement($context, $depth, $key, $value)\nTidies up the hex values to output them in hex\n\n$t->XMLend($context, $tag, %attrs)\nNow handle them on the way back in\n\n$t->minsize()\nReturns the minimum size this table can be. If it is smaller than this, then the table must be\nbad and should be deleted or whatever.\n\n$t->update\nUpdates the OS/2 table by getting information from other sources:\n\nUpdates the \"firstChar\" and \"lastChar\" values based on the MS table in the cmap.\n\nUpdates the sTypoAscender, sTypoDescender & sTypoLineGap to be the same values as Ascender,\nDescender and Linegap from the hhea table (assuming it is dirty) and also sets usWinAscent to be\nthe sum of Ascender+Linegap and usWinDescent to be the negative of Descender.\n\n$t->guessRangeBits (\\%map, [$cpthreshold, [%uthreshold]])\nSet the ulCodePageRange and ulUnicodeRange fields based on characters actually present in the\nfont.\n\n%map is a hash keyed by USV returning non-zero for characters present (e.g. use {'val'} a from\nUnicode cmap).\n\nThe two optional parameters are percentage of characters within the codepage or unicode range\nthat need to be present to constitute coverage. A threshold of 0 causes corresponding range bits\nto be set if any characters are present at all, while a negative value causes the corresponding\nrange bits to be unchanged. Defaults are 50 and 0, respectively.\n\nFor codepage bits, the threshold is percentage of characters between 0xC0 and 0xFF that need to\nbe present to constitute coverage). For codepages other than 1252, characters (e.g.,\npunctuation) that are defined identically to cp1252 are ignored for the purposes of this\npercentage calculation. Looks only for SBCS codepages, not DBCS.\n\nFor Unicode range bits that represent multiple ranges, e.g., bit 29 represents:\n\nLatin Extended Additional  1E00-1EFF\nLatin Extended-C           2C60-2C7F\nLatin Extended-D           A720-A7FF\n\nthe bit will be set if any of these ranges meet the threshold requirement.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "None known\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Martin Hosken <http://scripts.sil.org/FontUtils>.\n",
                "subsections": []
            },
            "LICENSING": {
                "content": "Copyright (c) 1998-2016, SIL International (http://www.sil.org)\n\nThis module is released under the terms of the Artistic License 2.0. For details, see the full\ntext of the license in the file LICENSE.\n",
                "subsections": []
            }
        }
    }
}