Font::T...Coverage(3)
π NAME π
okay bestie, this is the manual for Font::TTF::Coverage β Opentype coverage and class definition objects β and it's a User Contributed Perl Documentation page. You might see the header abbreviate it as Font::T...Coverage(3); that's just the top of the page being mysterious, iykyk. π
β¨ DESCRIPTION β¨
Coverage tables and class definition objects are virtually identical concepts in OpenType. Their difference comes purely in their storage β lowkey that's the whole plot. So we can say that a coverage table is a class definition in which the class definition for each glyph is the corresponding index in the coverage table. Slay. The resulting data structure is that a Coverage table has these fields:
coverβ a boolean to indicate whether this table is a coverage table (TRUE) or a class definition (FALSE).valβ a hash of glyph ids against values (either coverage index or class value).fmtβ the storage format used is given here, but is recalculated when the table is written out.countβ a count of the elements in a coverage table for use withadd. Each subsequent addition is added with the current count and increments the count.maxβ maximum class value in a class table.
π METHODS π
πΈ new($isCover [, vals])
Creates a new coverage table or class definition table, depending upon the value of $isCover. If $isCover, then vals may be a list of glyphs to include in order. If no $isCover, then vals is a hash of glyphs against class values. Cute, right? β¨
π read($fh)
Reads the coverage/class table from the given file handle. Reading era. π¦
πΎ out($fh, $state)
Writes the coverage/class table to the given file handle. If $state is 1, then the output string is returned rather than being output to a filehandle. That single digit is doing main character work. π
β $c->add($glyphid[, $class])
Adds a glyph id to the coverage or class table. Returns the index or class number of the glyphid added. Adding, but make it useful. π
π«Ά $c->signature
Returns a vector of all the glyph ids covered by this coverage table or class. Signature served. β
π @map=$c->sort
Sorts the coverage table so that indexes are in ascending order of glyphid. Returns a map such that $map[$new_index]=$old_index. Sorting? iconic behavior. π
π§ $c->out_xml($context)
Outputs this coverage/class in XML. XML moment. π
π AUTHOR π
Martin Hosken <http://scripts.sil.org/FontUtils>.
π LICENSING π
Copyright (c) 1998-2016, SIL International (http://www.sil.org)
This module is released under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.
okay that's the whole page, bestie π
β cute sign-off with the footer lore: version perl v5.42.0, dated 2016-08-28, and the page is Font::T...Coverage(3). mwah π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Font-TTF 1.06-bp160.1.12 Β· Artistic-2.0 and OFL-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms