API Documentation

Pdf/Cmap/SegmentToDelta.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
Fonts
version
$Id: SegmentToDelta.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Pdf_Cmap_SegmentToDelta

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Pdf_Cmap_SegmentToDelta

Extends from
Zend_Pdf_Cmap
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
Fonts
Properties
$_segmentCount
$_searchRange
$_searchIterations
$_segmentTableEndCodes
$_searchRangeEndCode
$_segmentTableStartCodes
$_segmentTableIdDeltas
$_segmentTableIdRangeOffsets
$_glyphIndexArray
Methods
glyphNumbersForCharacters
glyphNumberForCharacter
getCoveredCharacters
getCoveredCharactersGlyphs
__construct

Description

Implements the "segment mapping to delta values" character map (type 4).

This is the Microsoft standard mapping table type for OpenType fonts. It provides the ability to cover multiple contiguous ranges of the Unicode character set, with the exception of Unicode Surrogates (U+D800 - U+DFFF).

Properties

$_glyphIndexArray

array $_glyphIndexArray = 'array'

Glyph index array. Stores glyph numbers, used with range offset.

Details

$_glyphIndexArray
array
visibility
protected
default
array
final
false
static
false

$_searchIterations

integer $_searchIterations = '0'

The number of binary search steps required to cover the entire search range.

Details

$_searchIterations
integer
visibility
protected
default
0
final
false
static
false

$_searchRange

integer $_searchRange = '0'

The size of the binary search range for segments.

Details

$_searchRange
integer
visibility
protected
default
0
final
false
static
false

$_searchRangeEndCode

integer $_searchRangeEndCode = '0'

The ending character code for the segment at the end of the low search range.

Details

$_searchRangeEndCode
integer
visibility
protected
default
0
final
false
static
false

$_segmentCount

integer $_segmentCount = '0'

The number of segments in the table.

Details

$_segmentCount
integer
visibility
protected
default
0
final
false
static
false

$_segmentTableEndCodes

array $_segmentTableEndCodes = 'array'

Array of ending character codes for each segment.

Details

$_segmentTableEndCodes
array
visibility
protected
default
array
final
false
static
false

$_segmentTableIdDeltas

array $_segmentTableIdDeltas = 'array'

Array of character code to glyph delta values for each segment.

Details

$_segmentTableIdDeltas
array
visibility
protected
default
array
final
false
static
false

$_segmentTableIdRangeOffsets

array $_segmentTableIdRangeOffsets = 'array'

Array of offsets into the glyph index array for each segment.

Details

$_segmentTableIdRangeOffsets
array
visibility
protected
default
array
final
false
static
false

$_segmentTableStartCodes

array $_segmentTableStartCodes = 'array'

Array of starting character codes for each segment.

Details

$_segmentTableStartCodes
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string $cmapData ) :

Object constructor

Parses the raw binary table data. Throws an exception if the table is malformed.

Arguments
$cmapData
string
Raw binary cmap table data.
Details
visibility
public
final
false
static
false
throws

getCoveredCharacters

getCoveredCharacters( ) : array

Returns an array containing the Unicode characters that have entries in this character map.

Output
array
Unicode character codes.
Details
visibility
public
final
false
static
false

getCoveredCharactersGlyphs

getCoveredCharactersGlyphs( ) : array

Returns an array containing the glyphs numbers that have entries in this character map.

Keys are Unicode character codes (integers)

This functionality is partially covered by glyphNumbersForCharacters(getCoveredCharacters()) call, but this method do it in more effective way (prepare complete list instead of searching glyph for each character code).

Output
array
Array representing <Unicode character code> => <glyph number> pairs.
Details
visibility
public
final
false
static
false
internal

glyphNumberForCharacter

glyphNumberForCharacter( integer $characterCode ) : integer

Returns the glyph number corresponding to the Unicode character.

If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.

See also {@link glyphNumbersForCharacters()} which is optimized for bulk operations.

Arguments
$characterCode
integer
Unicode character code (code point).
Output
integer
Glyph number.
Details
visibility
public
final
false
static
false

glyphNumbersForCharacters

glyphNumbersForCharacters( array $characterCodes ) : array

Returns an array of glyph numbers corresponding to the Unicode characters.

If a particular character doesn't exist in this font, the special 'missing character glyph' will be substituted.

See also {@link glyphNumberForCharacter()}.

Arguments
$characterCodes
array
Array of Unicode character codes (code points).
Output
array
Array of glyph numbers.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.