Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

font::ttf::utils(3) [centos man page]

Font::TTF::Utils(3)					User Contributed Perl Documentation				       Font::TTF::Utils(3)

NAME
Font::TTF::Utils - Utility functions to save fingers DESCRIPTION
Lots of useful functions to save my fingers, especially for trivial tables FUNCTIONS
The following functions are exported ($val, $pos) = TTF_Init_Fields ($str, $pos) Given a field description from the "DATA" section, creates an absolute entry in the fields associative array for the class TTF_Read_Fields($obj, $dat, $fields) Given a block of data large enough to account for all the fields in a table, processes the data block to convert to the values in the objects instance variables by name based on the list in the "DATA" block which has been run through "TTF_Init_Fields" TTF_Unpack($fmt, $dat) A TrueType types equivalent of Perls "unpack" function. Thus $fmt consists of type followed by an optional number of elements to read including *. The type may be one of: c BYTE C CHAR f FIXED F F2DOT14 l LONG L ULONG s SHORT S USHORT v Version number (FIXED) Note that "FUNIT", "FWORD" and "UFWORD" are not data types but units. Returns array of scalar (first element) depending on context $dat = TTF_Out_Fields($obj, $fields, $len) Given the fields table from "TTF_Init_Fields" writes out the instance variables from the object to the filehandle in TTF binary form. $dat = TTF_Pack($fmt, @data) The TrueType equivalent to Perl's "pack" function. See details of "TTF_Unpack" for how to work the $fmt string. ($num, $range, $select, $shift) = TTF_bininfo($num) Calculates binary search information from a number of elements TTF_word_utf8($str) Returns the UTF8 form of the 16 bit string, assumed to be in big endian order, including surrogate handling TTF_utf8_word($str) Returns the 16-bit form in big endian order of the UTF 8 string, including surrogate handling to Unicode. XML_hexdump($context, $dat) Dumps out the given data as a sequence of <data> blocks each 16 bytes wide XML_outhints Converts a binary string of hinting code into a textual representation make_circle($f, $cmap, [$dia, $sb, $opts]) Adds a dotted circle to a font. This function is very configurable. The parameters passed in are: $f Font to work with. This is required. $cmap A cmap table (not the 'val' sub-element of a cmap) to add the glyph too. Optional. $dia Optional diameter for the main circle. Defaults to 80% em $sb Side bearing. The left and right side-bearings are always the same. This value defaults to 10% em. There are various options to control all sorts of interesting aspects of the circle numDots Number of dots in the circle numPoints Number of curve points to use to create each dot uid Unicode reference to store this glyph under in the cmap. Defaults to 0x25CC pname Postscript name to give the glyph. Defaults to uni25CC. -dRadius Radius of each dot. BUGS
No known bugs AUTHOR
Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright and licensing. perl v5.16.3 2012-05-23 Font::TTF::Utils(3)

Check Out this Related Man Page

Font::TTF::Cmap(3)					User Contributed Perl Documentation					Font::TTF::Cmap(3)

NAME
Font::TTF::Cmap - Character map table DESCRIPTION
Looks after the character map. For ease of use, the actual cmap is held in a hash against codepoint. Thus for a given table: $gid = $font->{'cmap'}{'Tables'}[0]{'val'}{$code}; Note that $code should be a true value (0x1234) rather than a string representation. INSTANCE VARIABLES
The instance variables listed here are not preceeded by a space due to their emulating structural information in the font. Num Number of subtables in this table Tables An array of subtables ([0..Num-1]) Each subtables also has its own instance variables which are, again, not preceeded 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 A hash keyed by the codepoint value (not a string) storing the glyph id METHODS
$t->read Reads the cmap into memory. Format 4 subtables read the whole subtable and fill in the segmented array accordingly. $t->ms_lookup($uni) Finds a Unicode table, giving preference to the MS one, and looks up the given Unicode codepoint in it to find the glyph id. $t->find_ms Finds the a Unicode table, giving preference to the Microsoft one, and sets the "mstable" instance variable to it if found. Returns the table it finds. $t->ms_enc Returns the encoding of the microsoft table (0 => symbol, etc.). Returns undef if there is no Microsoft cmap. $t->out($fh) Writes out a cmap table to a filehandle. If it has not been read, then just copies from input file to output $t->XML_element($context, $depth, $name, $val) Outputs the elements of the cmap in XML. We only need to process val here $t->update Tidies the cmap table. Removes MS Fmt12 cmap if it is no longer needed. Removes from all cmaps any codepoint that map to GID=0. Note that such entries will be re-introduced as necessary depending on the cmap format. @map = $t->reverse(%opt) Returns a reverse map of the Unicode cmap. I.e. given a glyph gives the Unicode value for it. Options are: tnum Table number to use rather than the default Unicode table array Returns each element of reverse as an array since a glyph may be mapped by more than one Unicode value. The arrays are unsorted. Otherwise store any one unicode value for a glyph. is_unicode($index) Returns whether the table of a given index is known to be a unicode table (as specified in the specifications) BUGS
o No support for format 2 tables (MBCS) AUTHOR
Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright and licensing. perl v5.16.3 2012-02-23 Font::TTF::Cmap(3)
Man Page