Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($fontDictionary) | |
glyphNumbersForCharacters ($characterCodes) | |
glyphNumberForCharacter ($characterCode) | |
getCoveredPercentage ($string, $charEncoding='') | |
widthsForGlyphs ($glyphNumbers) | |
widthForGlyph ($glyphNumber) | |
encodeString ($string, $charEncoding) | |
decodeString ($string, $charEncoding) | |
![]() | |
__construct () | |
__toString () | |
getFontType () | |
getFontName ($nameType, $language, $characterSet=null) | |
getFontNames () | |
isBold () | |
isItalic () | |
isMonospace () | |
getUnderlinePosition () | |
getUnderlineThickness () | |
getStrikePosition () | |
getStrikeThickness () | |
getUnitsPerEm () | |
getAscent () | |
getDescent () | |
getLineGap () | |
getLineHeight () | |
glyphNumbersForCharacters ($characterCodes) | |
glyphNumberForCharacter ($characterCode) | |
getCoveredPercentage ($string, $charEncoding='') | |
widthsForGlyphs ($glyphNumbers) | |
widthForGlyph ($glyphNumber) | |
encodeString ($string, $charEncoding) | |
decodeString ($string, $charEncoding) | |
toEmSpace ($value) | |
![]() | |
__construct ($resource) | |
__clone () | |
cloneResource ($factory, &$processed) | |
getResource () | |
getFactory () | |
Data Fields | |
const | TYPE_NOT_SUPPORTED = 'Unsupported font type.' |
const | ENCODING_NOT_SUPPORTED = 'Font encoding is not supported' |
const | OPERATION_NOT_SUPPORTED = 'Operation is not supported for extracted fonts' |
Protected Attributes | |
$_encoding = null | |
![]() | |
$_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 | |
Definition at line 38 of file Extracted.php.
__construct | ( | $fontDictionary | ) |
Object constructor
$fontDictionary is a Zend_Pdf_Element_Reference or Zend_Pdf_Element_Object object
mixed | $fontDictionary |
Zend_Pdf_Exception |
Definition at line 64 of file Extracted.php.
decodeString | ( | $string, | |
$charEncoding | |||
) |
Convert string from the font encoding.
The method is used to convert strings retrieved from existing content streams
string | $string | |
string | $charEncoding | Character encoding of resulting text. |
Definition at line 261 of file Extracted.php.
encodeString | ( | $string, | |
$charEncoding | |||
) |
Convert string to the font encoding.
The method is used to prepare string for text drawing operators
string | $string | |
string | $charEncoding | Character encoding of source text. |
Definition at line 238 of file Extracted.php.
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'. |
Definition at line 190 of file Extracted.php.
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). |
Definition at line 166 of file Extracted.php.
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). |
Definition at line 148 of file Extracted.php.
widthForGlyph | ( | $glyphNumber | ) |
Returns the width of the glyph.
Like widthsForGlyphs() but used for one glyph at a time.
integer | $glyphNumber |
Zend_Pdf_Exception |
Definition at line 223 of file Extracted.php.
widthsForGlyphs | ( | $glyphNumbers | ) |
Returns the widths of the glyphs.
The widths are expressed in the font's glyph space. You are responsible for converting to user space as necessary. See unitsPerEm().
See also widthForGlyph().
array | $glyphNumbers | Array of glyph numbers. |
Zend_Pdf_Exception |
Definition at line 208 of file Extracted.php.
|
protected |
Definition at line 54 of file Extracted.php.
const ENCODING_NOT_SUPPORTED = 'Font encoding is not supported' |
Definition at line 44 of file Extracted.php.
const OPERATION_NOT_SUPPORTED = 'Operation is not supported for extracted fonts' |
Definition at line 45 of file Extracted.php.
const TYPE_NOT_SUPPORTED = 'Unsupported font type.' |
Messages
Definition at line 43 of file Extracted.php.