Font::TTF::OldCmap(3)
πΈ NAME πΈ
okay so this is the man page for Font::TTF::OldCmap β yes, Font::TTF::OldCmap(3), from the User Contributed Perl Documentation crew. It's the Character map table module, and bestie, listen: this module is deprecated. Not me delivering the news with a little sparkle. π
π¨ Deprecated alert: the original page literally says "This module is deprecated." So yeah, that's the vibe β iykyk.
β¨ DESCRIPTION β¨
Okay so this module looks after the character map. The main character for handling a cmap is Font::TTF::Segarr, which handles the segmented arrays of format 4 tables β and in a simpler form, format 0 tables. Slay. β¨
Because segmented arrays are highkey a lot, ngl, most of the handling for those arrays happens through methods rather than through instance variables. It's giving "methods are the moment." π
The way that a format 4 table always contains a segment with a final address of 0xFFFF? Iconic. If you're creating a table from scratch, this is important β although Font::TTF::Segarr can work quite happily without it. No cap, fr fr. π«Ά
π INSTANCE VARIABLES π
Quick note before the list: the instance variables here are not preceded by a space, because they're emulating structural information in the font. That's on purpose, bestie, fr fr. Don't try to "fix" it. π
Numβ Number of subtables in this table.Tablesβ An array of subtables ([0..Num-1]).
Each subtable also has its own instance variables, and again, these are not preceded by a space:
Platformβ The platform number for this subtable.Encodingβ The encoding number for this subtable.Formatβ Gives the stored format of this subtable.Verβ Gives the version (or language) information for this subtable.valβ This points to aFont::TTF::Segarrwhich contains the content of the particular subtable.
π METHODS π
$t->readβ Reads the cmap into memory. Format 4 subtables read the whole subtable and fill in the segmented array accordingly. Format 2 subtables are not read at all β nope, not even a little. π$t->ms_lookup($uni)β Given a Unicode value in the MS table (Platform 3, Encoding 1), this locates that table and looks up the appropriate glyph number from it. Very "say less, I got you." β¨$t->find_msβ Finds the Microsoft Unicode table and sets the"mstable"instance variable to it if found. Returns the table it finds. Obsessed with a method that returns the thing it found, honestly. π«Ά$t->out($fh)β Writes out a cmap table to a filehandle. If it has not been read, then it just copies from input file to output. Easy.@map = $t->reverse([$num])β Returns a reverse map of the table of given number or the Microsoft cmap. I.e. given a glyph, it gives the Unicode value for it. Reverse-map realness. π
π BUGS π
- No support for format 2 tables (MBCS). That's the whole bug note, bestie β short and iconic. π
π AUTHOR π
Martin Hosken <http://scripts.sil.org/FontUtils>. Periodt. π
π 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 bye bestie π this page is running on perl v5.42.0, dated 2016-08-28 β 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