25 Aug 2016 01:26:48 UTC
- Distribution: Font-TTF
- Module version: 0.0001
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (9252 / 12 / 0)
- KwaliteeBus factor: 0
- 37.68% Coverage
- License: artistic_2
- Download (250.05KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:2 non-PAUSE users
- ($val, $pos) = TTF_Init_Fields ($str, $pos)
- TTF_Read_Fields($obj, $dat, $fields)
- TTF_Unpack($fmt, $dat)
- $dat = TTF_Out_Fields($obj, $fields, $len)
- $dat = TTF_Pack($fmt, @data)
- ($num, $range, $select, $shift) = TTF_bininfo($num)
- XML_hexdump($context, $dat)
- make_circle($f, $cmap, [$dia, $sb, $opts])
Font::TTF::Utils - Utility functions to save fingers
Lots of useful functions to save my fingers, especially for trivial tables
The following functions are exported
Given a field description from the
DATAsection, creates an absolute entry in the fields associative array for the class
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
DATAblock which has been run through
A TrueType types equivalent of Perls
unpackfunction. 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)
UFWORDare not data types but units.
Returns array of scalar (first element) depending on context
Given the fields table from
TTF_Init_Fieldswrites out the instance variables from the object to the filehandle in TTF binary form.
The TrueType equivalent to Perl's
packfunction. See details of
TTF_Unpackfor how to work the $fmt string.
Calculates binary search information from a number of elements
Returns the UTF8 form of the 16 bit string, assumed to be in big endian order, including surrogate handling
Returns the 16-bit form in big endian order of the UTF 8 string, including surrogate handling to Unicode.
Dumps out the given data as a sequence of <data> blocks each 16 bytes wide
Converts a binary string of hinting code into a textual representation
Adds a dotted circle to a font. This function is very configurable. The parameters passed in are:
Font to work with. This is required.
A cmap table (not the 'val' sub-element of a cmap) to add the glyph too. Optional.
Optional diameter for the main circle. Defaults to 80% em
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
Number of dots in the circle
Number of curve points to use to create each dot
Unicode reference to store this glyph under in the cmap. Defaults to 0x25CC
Postscript name to give the glyph. Defaults to uni25CC.
Radius of each dot.
No known bugs
Martin Hosken http://scripts.sil.org/FontUtils.
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.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|