Zend Framework
1.12
|
Public Member Functions | |
__construct (Zend_Pdf_FileParser_Font_OpenType $fontParser) | |
Object constructor. | |
glyphNumbersForCharacters ($characterCodes) | |
Returns an array of glyph numbers corresponding to the Unicode characters. | |
glyphNumberForCharacter ($characterCode) | |
Returns the glyph number corresponding to the Unicode character. | |
getCoveredPercentage ($string, $charEncoding= '') | |
Returns a number between 0 and 1 inclusive that indicates the percentage of characters in the string which are covered by glyphs in this font. | |
widthsForChars ($charCodes) | |
Returns the widths of the Chars. | |
widthForChar ($charCode) | |
Returns the width of the character. | |
widthsForGlyphs ($glyphNumbers) | |
Returns the widths of the glyphs. | |
widthForGlyph ($glyphNumber) | |
Returns the width of the glyph. | |
encodeString ($string, $charEncoding) | |
Convert string to the font encoding. | |
decodeString ($string, $charEncoding) | |
Convert string from the font encoding. | |
![]() | |
__construct () | |
Object constructor. | |
__toString () | |
Returns the full name of the font in the encoding method of the current locale. | |
getFontType () | |
Returns the type of font. | |
getFontName ($nameType, $language, $characterSet=null) | |
Returns the specified descriptive name for the font. | |
getFontNames () | |
Returns whole set of font names. | |
isBold () | |
Returns true if font is bold. | |
isItalic () | |
Returns true if font is italic. | |
isMonospace () | |
Returns true if font is monospace. | |
getUnderlinePosition () | |
Returns the suggested position below the text baseline of the underline in glyph units. | |
getUnderlineThickness () | |
Returns the suggested line thickness of the underline in glyph units. | |
getStrikePosition () | |
Returns the suggested position above the text baseline of the strikethrough in glyph units. | |
getStrikeThickness () | |
Returns the suggested line thickness of the strikethrough in glyph units. | |
getUnitsPerEm () | |
Returns the number of glyph units per em. | |
getAscent () | |
Returns the typographic ascent in font glyph units. | |
getDescent () | |
Returns the typographic descent in font glyph units. | |
getLineGap () | |
Returns the typographic line gap in font glyph units. | |
getLineHeight () | |
Returns the suggested line height (or leading) in font glyph units. | |
glyphNumbersForCharacters ($characterCodes) | |
Returns an array of glyph numbers corresponding to the Unicode characters. | |
glyphNumberForCharacter ($characterCode) | |
Returns the glyph number corresponding to the Unicode character. | |
getCoveredPercentage ($string, $charEncoding= '') | |
Returns a number between 0 and 1 inclusive that indicates the percentage of characters in the string which are covered by glyphs in this font. | |
widthsForGlyphs ($glyphNumbers) | |
Returns the widths of the glyphs. | |
widthForGlyph ($glyphNumber) | |
Returns the width of the glyph. | |
encodeString ($string, $charEncoding) | |
Convert string to the font encoding. | |
decodeString ($string, $charEncoding) | |
Convert string from the font encoding. | |
toEmSpace ($value) | |
If the font's glyph space is not 1000 units per em, converts the value. | |
![]() | |
__construct ($resource) | |
Object constructor. | |
__clone () | |
Clone page, extract it and dependent objects from the current document, so it can be used within other docs. | |
cloneResource ($factory, &$processed) | |
Clone resource, extract it and dependent objects from the current document, so it can be used within other docs. | |
getResource () | |
Get resource. | |
getFactory () | |
Get factory. | |
Protected Attributes | |
$_cmap = null | |
$_charWidths = null | |
$_missingCharWidth = 0 | |
![]() | |
$_fontType = Zend_Pdf_Font::TYPE_UNKNOWN | |
$_fontNames = array() | |
$_isBold = false | |
$_isItalic = false | |
$_isMonospace = false | |
$_underlinePosition = 0 | |
$_underlineThickness = 0 | |
$_strikePosition = 0 | |
$_strikeThickness = 0 | |
$_unitsPerEm = 0 | |
$_ascent = 0 | |
$_descent = 0 | |
$_lineGap = 0 | |
![]() | |
$_objectFactory | |
$_resource | |
__construct | ( | Zend_Pdf_FileParser_Font_OpenType | $fontParser | ) |
Object constructor.
Zend_Pdf_FileParser_Font_OpenType | $fontParser | Font parser object containing OpenType file. |
integer | $embeddingOptions | Options for font embedding. |
Zend_Pdf_Exception |
Prepare widths array.
decodeString | ( | $string, | |
$charEncoding | |||
) |
Convert string from the font encoding.
string | $string | |
string | $charEncoding | Character encoding of resulting text. |
Zend_Pdf_Exception |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
encodeString | ( | $string, | |
$charEncoding | |||
) |
Convert string to the font encoding.
string | $string | |
string | $charEncoding | Character encoding of source text. |
Zend_Pdf_Exception |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
getCoveredPercentage | ( | $string, | |
$charEncoding = '' |
|||
) |
Returns a number between 0 and 1 inclusive that indicates the percentage of characters in the string which are covered by glyphs in this font.
Since no one font will contain glyphs for the entire Unicode character range, this method can be used to help locate a suitable font when the actual contents of the string are not known.
Note that some fonts lie about the characters they support. Additionally, fonts don't usually contain glyphs for control characters such as tabs and line breaks, so it is rare that you will get back a full 1.0 score. The resulting value should be considered informational only.
string | $string | |
string | $charEncoding | (optional) Character encoding of source text. If omitted, uses 'current locale'. |
glyphNumberForCharacter | ( | $characterCode | ) |
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 glyphNumbersForCharacters() which is optimized for bulk operations.
integer | $characterCode | Unicode character code (code point). |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
glyphNumbersForCharacters | ( | $characterCodes | ) |
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 glyphNumberForCharacter().
array | $characterCodes | Array of Unicode character codes (code points). |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
widthForChar | ( | $charCode | ) |
Returns the width of the character.
Like widthsForChars() but used for one char at a time.
integer | $charCode |
widthForGlyph | ( | $glyphNumber | ) |
Returns the width of the glyph.
Like widthsForGlyphs() but used for one glyph at a time.
integer | $glyphNumber |
Zend_Pdf_Exception |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
widthsForChars | ( | $charCodes | ) |
Returns the widths of the Chars.
The widths are expressed in the font's glyph space. You are responsible for converting to user space as necessary. See unitsPerEm().
See also widthForChar().
array | &$glyphNumbers | Array of glyph numbers. |
widthsForGlyphs | ( | $glyphNumbers | ) |
Returns the widths of the glyphs.
array | &$glyphNumbers | Array of glyph numbers. |
Zend_Pdf_Exception |
CIDFont object is not actually a font. It does not have an Encoding entry, it cannot be listed in the Font subdictionary of a resource dictionary, and it cannot be used as the operand of the Tf operator.
Throw an exception.
|
protected |
|
protected |
|
protected |