import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -17,35 +17,35 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CidFont.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: CidFont.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Array.php';
|
||||
require_once 'Zend/Pdf/Element/Dictionary.php';
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
require_once 'Zend/Pdf/Element/Numeric.php';
|
||||
require_once 'Zend/Pdf/Element/String.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font */
|
||||
require_once 'Zend/Pdf/Resource/Font.php';
|
||||
|
||||
/** Zend_Pdf_FileParser_Font_OpenType */
|
||||
require_once 'Zend/Pdf/FileParser/Font/OpenType.php';
|
||||
|
||||
/** Zend_Pdf_Cmap */
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Adobe PDF CIDFont font object implementation
|
||||
*
|
||||
*
|
||||
* A CIDFont program contains glyph descriptions that are accessed using a CID as
|
||||
* the character selector. There are two types of CIDFont. A Type 0 CIDFont contains
|
||||
* glyph descriptions based on Adobe’s Type 1 font format, whereas those in a
|
||||
* Type 2 CIDFont are based on the TrueType font format.
|
||||
*
|
||||
* A CIDFont dictionary is a PDF object that contains information about a CIDFont program.
|
||||
* Although its Type value is Font, a CIDFont 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. It is used only as a descendant of a Type 0 font.
|
||||
* The CMap in the Type 0 font is what defines the encoding that maps character codes to CIDs
|
||||
* in the CIDFont.
|
||||
*
|
||||
* A CIDFont dictionary is a PDF object that contains information about a CIDFont program.
|
||||
* Although its Type value is Font, a CIDFont 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. It is used only as a descendant of a Type 0 font.
|
||||
* The CMap in the Type 0 font is what defines the encoding that maps character codes to CIDs
|
||||
* in the CIDFont.
|
||||
*
|
||||
* Font objects should be normally be obtained from the factory methods
|
||||
* {@link Zend_Pdf_Font::fontWithName} and {@link Zend_Pdf_Font::fontWithPath}.
|
||||
*
|
||||
@ -71,11 +71,11 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* Width for characters missed in the font
|
||||
*
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $_missingCharWidth = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Object constructor
|
||||
@ -90,7 +90,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
parent::__construct();
|
||||
|
||||
$fontParser->parse();
|
||||
|
||||
|
||||
|
||||
/* Object properties */
|
||||
|
||||
@ -132,7 +132,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
$charWidths[$charCode] = $glyphWidths[$glyph];
|
||||
}
|
||||
$this->_charWidths = $charWidths;
|
||||
$this->_missingCharWidth = $glyphWidths[0];
|
||||
$this->_missingCharWidth = $glyphWidths[0];
|
||||
|
||||
/* Width array optimization. Step1: extract default value */
|
||||
$widthFrequencies = array_count_values($charWidths);
|
||||
@ -147,12 +147,12 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
|
||||
// Store default value in the font dictionary
|
||||
$this->_resource->DW = new Zend_Pdf_Element_Numeric($this->toEmSpace($defaultWidth));
|
||||
|
||||
|
||||
// Remove characters which corresponds to default width from the widths array
|
||||
$defWidthChars = array_keys($charWidths, $defaultWidth);
|
||||
foreach ($defWidthChars as $charCode) {
|
||||
unset($charWidths[$charCode]);
|
||||
}
|
||||
}
|
||||
|
||||
// Order cheracter widths aray by character codes
|
||||
ksort($charWidths, SORT_NUMERIC);
|
||||
@ -166,7 +166,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
$sequenceStartCode = $charCode;
|
||||
} else if ($charCode != $lastCharCode + 1) {
|
||||
// New chracters sequence detected
|
||||
$widthsSequences[$sequenceStartCode] = $charCodesSequense;
|
||||
$widthsSequences[$sequenceStartCode] = $charCodesSequense;
|
||||
$charCodesSequense = array();
|
||||
$sequenceStartCode = $charCode;
|
||||
}
|
||||
@ -176,7 +176,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
// Save last sequence, if widths array is not empty (it may happens for monospaced fonts)
|
||||
if (count($charWidths) != 0) {
|
||||
$widthsSequences[$sequenceStartCode] = $charCodesSequense;
|
||||
}
|
||||
}
|
||||
|
||||
$pdfCharsWidths = array();
|
||||
foreach ($widthsSequences as $startCode => $widthsSequence) {
|
||||
@ -191,7 +191,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
// Previous width value was a part of the widths sequence. Save it as 'c_1st c_last w'.
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode); // First character code
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode + $widthsInSequence - 1); // Last character code
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($lastWidth)); // Width
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($lastWidth)); // Width
|
||||
|
||||
// Reset widths sequence
|
||||
$startCode = $startCode + $widthsInSequence;
|
||||
@ -205,13 +205,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
} else {
|
||||
// Width is equal to previous
|
||||
if (count($pdfWidths) != 0) {
|
||||
// We already have some widths collected
|
||||
// We already have some widths collected
|
||||
// So, we've just detected new widths sequence
|
||||
|
||||
|
||||
// Remove last element from widths list, since it's a part of widths sequence
|
||||
array_pop($pdfWidths);
|
||||
|
||||
// and write the rest if it's not empty
|
||||
// and write the rest if it's not empty
|
||||
if (count($pdfWidths) != 0) {
|
||||
// Save it as 'c_1st [w1 w2 ... wn]'.
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode); // First character code
|
||||
@ -241,7 +241,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
// Save it as 'c_1st c_last w'.
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode); // First character code
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($startCode + $widthsInSequence - 1); // Last character code
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($lastWidth)); // Width
|
||||
$pdfCharsWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($lastWidth)); // Width
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
$widthsObject = $this->_objectFactory->newObject($widthsArrayElement);
|
||||
$this->_resource->W = $widthsObject;
|
||||
|
||||
|
||||
|
||||
/* CIDSystemInfo dictionary */
|
||||
$cidSystemInfo = new Zend_Pdf_Element_Dictionary();
|
||||
$cidSystemInfo->Registry = new Zend_Pdf_Element_String('Adobe');
|
||||
@ -262,8 +262,8 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
$this->_resource->CIDSystemInfo = $cidSystemInfoObject;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of glyph numbers corresponding to the Unicode characters.
|
||||
*
|
||||
@ -278,12 +278,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function glyphNumbersForCharacters($characterCodes)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
|
||||
@ -302,12 +303,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function glyphNumberForCharacter($characterCode)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
|
||||
@ -401,7 +403,7 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
}
|
||||
return $this->_charWidths[$charCode];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the widths of the glyphs.
|
||||
*
|
||||
@ -412,12 +414,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function widthsForGlyphs($glyphNumbers)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
|
||||
@ -433,12 +436,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function widthForGlyph($glyphNumber)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
|
||||
@ -453,12 +457,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function encodeString($string, $charEncoding)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
|
||||
@ -473,12 +478,13 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
|
||||
public function decodeString($string, $charEncoding)
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('CIDFont PDF objects could not be used as the operand of the text drawing operators');
|
||||
}
|
||||
}
|
||||
|
@ -17,16 +17,21 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TrueType.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TrueType.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
/** Zend_Pdf_Resource_Font_CidFont */
|
||||
require_once 'Zend/Pdf/Resource/Font/CidFont.php';
|
||||
|
||||
/** Internally used classes */
|
||||
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
/** Zend_Pdf_Resource_Font_FontDescriptor */
|
||||
require_once 'Zend/Pdf/Resource/Font/FontDescriptor.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_CidFont */
|
||||
require_once 'Zend/Pdf/Resource/Font/CidFont.php';
|
||||
|
||||
/**
|
||||
* Type 2 CIDFonts implementation
|
||||
*
|
||||
@ -46,8 +51,8 @@ class Zend_Pdf_Resource_Font_CidFont_TrueType extends Zend_Pdf_Resource_Font_Cid
|
||||
{
|
||||
/**
|
||||
* Object constructor
|
||||
*
|
||||
* @todo Joing this class with Zend_Pdf_Resource_Font_Simple_Parsed_TrueType
|
||||
*
|
||||
* @todo Joing this class with Zend_Pdf_Resource_Font_Simple_Parsed_TrueType
|
||||
*
|
||||
* @param Zend_Pdf_FileParser_Font_OpenType_TrueType $fontParser Font parser
|
||||
* object containing parsed TrueType file.
|
||||
@ -61,7 +66,7 @@ class Zend_Pdf_Resource_Font_CidFont_TrueType extends Zend_Pdf_Resource_Font_Cid
|
||||
$this->_fontType = Zend_Pdf_Font::TYPE_CIDFONT_TYPE_2;
|
||||
|
||||
$this->_resource->Subtype = new Zend_Pdf_Element_Name('CIDFontType2');
|
||||
|
||||
|
||||
$fontDescriptor = Zend_Pdf_Resource_Font_FontDescriptor::factory($this, $fontParser, $embeddingOptions);
|
||||
$this->_resource->FontDescriptor = $this->_objectFactory->newObject($fontDescriptor);
|
||||
|
||||
|
@ -17,17 +17,13 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Extracted.php 17530 2009-08-10 18:47:29Z alexander $
|
||||
* @version $Id: Extracted.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font */
|
||||
require_once 'Zend/Pdf/Resource/Font.php';
|
||||
|
||||
/** Zend_Pdf_Cmap */
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Extracted fonts implementation
|
||||
*
|
||||
@ -73,6 +69,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
// Composite type 0 font
|
||||
if (count($fontDictionary->DescendantFonts->items) != 1) {
|
||||
// Multiple descendant fonts are not supported
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Unsupported font type.');
|
||||
}
|
||||
|
||||
@ -111,6 +108,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
break;
|
||||
|
||||
default:
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Unsupported font type.');
|
||||
}
|
||||
|
||||
@ -142,6 +140,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
*/
|
||||
public function glyphNumbersForCharacters($characterCodes)
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Operation is not supported for extracted fonts');
|
||||
}
|
||||
|
||||
@ -159,6 +158,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
*/
|
||||
public function glyphNumberForCharacter($characterCode)
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Operation is not supported for extracted fonts');
|
||||
}
|
||||
|
||||
@ -182,6 +182,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
*/
|
||||
public function getCoveredPercentage($string, $charEncoding = '')
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Operation is not supported for extracted fonts');
|
||||
}
|
||||
|
||||
@ -199,6 +200,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
*/
|
||||
public function widthsForGlyphs($glyphNumbers)
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Operation is not supported for extracted fonts');
|
||||
}
|
||||
|
||||
@ -213,6 +215,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
*/
|
||||
public function widthForGlyph($glyphNumber)
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Operation is not supported for extracted fonts');
|
||||
}
|
||||
|
||||
@ -235,6 +238,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
return iconv($charEncoding, 'CP1252//IGNORE', $string);
|
||||
}
|
||||
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Fonf encoding is not supported');
|
||||
}
|
||||
|
||||
@ -257,6 +261,7 @@ class Zend_Pdf_Resource_Font_Extracted extends Zend_Pdf_Resource_Font
|
||||
return iconv('CP1252', $charEncoding, $string);
|
||||
}
|
||||
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Fonf encoding is not supported');
|
||||
}
|
||||
}
|
||||
|
@ -17,23 +17,24 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: FontDescriptor.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: FontDescriptor.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Array.php';
|
||||
require_once 'Zend/Pdf/Element/Dictionary.php';
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
require_once 'Zend/Pdf/Element/Numeric.php';
|
||||
|
||||
/** Zend_Pdf_Font */
|
||||
require_once 'Zend/Pdf/Font.php';
|
||||
|
||||
/** Zend_Pdf_Resource_Font */
|
||||
require_once 'Zend/Pdf/Resource/Font.php';
|
||||
|
||||
/** Zend_Pdf_FileParser_Font_OpenType */
|
||||
require_once 'Zend/Pdf/FileParser/Font/OpenType.php';
|
||||
|
||||
|
||||
/**
|
||||
* FontDescriptor implementation
|
||||
*
|
||||
* A font descriptor specifies metrics and other attributes of a simple font or a
|
||||
* A font descriptor specifies metrics and other attributes of a simple font or a
|
||||
* CIDFont as a whole, as distinct from the metrics of individual glyphs. These font
|
||||
* metrics provide information that enables a viewer application to synthesize a
|
||||
* substitute font or select a similar font when the font program is unavailable. The
|
||||
@ -52,12 +53,13 @@ class Zend_Pdf_Resource_Font_FontDescriptor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Zend_Pdf_Resource_Font_FontDescriptor is not intended to be instantiated');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Object constructor
|
||||
*
|
||||
*
|
||||
* The $embeddingOptions parameter allows you to set certain flags related
|
||||
* to font embedding. You may combine options by OR-ing them together. See
|
||||
* the EMBED_ constants defined in {@link Zend_Pdf_Font} for the list of
|
||||
@ -67,8 +69,8 @@ class Zend_Pdf_Resource_Font_FontDescriptor
|
||||
* to use them. If the recipient of the PDF has the font installed on their
|
||||
* computer, they will see the correct fonts in the document. If they don't,
|
||||
* the PDF viewer will substitute or synthesize a replacement.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param Zend_Pdf_Resource_Font $font Font
|
||||
* @param Zend_Pdf_FileParser_Font_OpenType $fontParser Font parser object containing parsed TrueType file.
|
||||
* @param integer $embeddingOptions Options for font embedding.
|
||||
@ -129,7 +131,7 @@ class Zend_Pdf_Resource_Font_FontDescriptor
|
||||
* @todo Calculate value for StemV.
|
||||
*/
|
||||
$fontDescriptor->StemV = new Zend_Pdf_Element_Numeric(0);
|
||||
|
||||
|
||||
$fontDescriptor->MissingWidth = new Zend_Pdf_Element_Numeric($fontParser->glyphWidths[0]);
|
||||
|
||||
/* Set up font embedding. This is where the actual font program itself
|
||||
@ -164,6 +166,7 @@ class Zend_Pdf_Resource_Font_FontDescriptor
|
||||
$message = 'This font cannot be embedded in the PDF document. If you would like to use '
|
||||
. 'it anyway, you must pass Zend_Pdf_Font::EMBED_SUPPRESS_EMBED_EXCEPTION '
|
||||
. 'in the $options parameter of the font constructor.';
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception($message, Zend_Pdf_Exception::FONT_CANT_BE_EMBEDDED);
|
||||
}
|
||||
|
||||
|
@ -17,21 +17,21 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Simple.php 16541 2009-07-07 06:59:03Z bkarwin $
|
||||
* @version $Id: Simple.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font */
|
||||
require_once 'Zend/Pdf/Resource/Font.php';
|
||||
|
||||
/** Zend_Pdf_Cmap */
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Adobe PDF Simple fonts implementation
|
||||
*
|
||||
* PDF simple fonts functionality is presented by Adobe Type 1
|
||||
*
|
||||
* PDF simple fonts functionality is presented by Adobe Type 1
|
||||
* (including standard PDF Type1 built-in fonts) and TrueType fonts support.
|
||||
*
|
||||
* Both fonts have the following properties:
|
||||
@ -40,17 +40,17 @@ require_once 'Zend/Pdf/Cmap.php';
|
||||
* into a table of 256 glyphs; the mapping from codes to glyphs is called the font’s
|
||||
* encoding.
|
||||
* PDF specification provides a possibility to specify any user defined encoding in addition
|
||||
* to the standard built-in encodings: Standard-Encoding, MacRomanEncoding, WinAnsiEncoding,
|
||||
* and PDFDocEncoding, but Zend_Pdf simple fonts implementation operates only with
|
||||
* to the standard built-in encodings: Standard-Encoding, MacRomanEncoding, WinAnsiEncoding,
|
||||
* and PDFDocEncoding, but Zend_Pdf simple fonts implementation operates only with
|
||||
* Windows ANSI encoding (except Symbol and ZapfDingbats built-in fonts).
|
||||
*
|
||||
* - Each glyph has a single set of metrics, including a horizontal displacement or
|
||||
* width. That is, simple fonts support only horizontal writing mode.
|
||||
*
|
||||
*
|
||||
*
|
||||
* The code in this class is common to both types. However, you will only deal
|
||||
* directly with subclasses.
|
||||
*
|
||||
*
|
||||
* Font objects should be normally be obtained from the factory methods
|
||||
* {@link Zend_Pdf_Font::fontWithName} and {@link Zend_Pdf_Font::fontWithPath}.
|
||||
*
|
||||
@ -81,12 +81,12 @@ abstract class Zend_Pdf_Resource_Font_Simple extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* Width for glyphs missed in the font
|
||||
*
|
||||
*
|
||||
* Note: Adobe PDF specfication (V1.4 - V1.6) doesn't define behavior for rendering
|
||||
* characters missed in the standard PDF fonts (such us 0x7F (DEL) Windows ANSI code)
|
||||
* Adobe Font Metrics files doesn't also define metrics for "missed glyph".
|
||||
* We provide character width as "0" for this case, but actually it depends on PDF viewer
|
||||
* implementation.
|
||||
* implementation.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
@ -108,13 +108,13 @@ abstract class Zend_Pdf_Resource_Font_Simple extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* @todo
|
||||
* It's easy to add other encodings support now (Standard-Encoding, MacRomanEncoding,
|
||||
* It's easy to add other encodings support now (Standard-Encoding, MacRomanEncoding,
|
||||
* PDFDocEncoding, MacExpertEncoding, Symbol, and ZapfDingbats).
|
||||
* Steps for the implementation:
|
||||
* - completely describe all PDF single byte encodings in the documentation
|
||||
* - implement non-WinAnsi encodings processing into encodeString()/decodeString() methods
|
||||
*
|
||||
* These encodings will be automatically supported for standard builtin PDF fonts as well
|
||||
*
|
||||
* These encodings will be automatically supported for standard builtin PDF fonts as well
|
||||
* as for external fonts.
|
||||
*/
|
||||
$this->_resource->Encoding = new Zend_Pdf_Element_Name('WinAnsiEncoding');
|
||||
@ -251,8 +251,8 @@ abstract class Zend_Pdf_Resource_Font_Simple extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* Convert string to the font encoding.
|
||||
*
|
||||
* The method is used to prepare string for text drawing operators
|
||||
*
|
||||
* The method is used to prepare string for text drawing operators
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $charEncoding Character encoding of source text.
|
||||
@ -263,7 +263,7 @@ abstract class Zend_Pdf_Resource_Font_Simple extends Zend_Pdf_Resource_Font
|
||||
if (PHP_OS == 'AIX') {
|
||||
return $string; // returning here b/c AIX doesnt know what CP1252 is
|
||||
}
|
||||
|
||||
|
||||
return iconv($charEncoding, 'CP1252//IGNORE', $string);
|
||||
}
|
||||
|
||||
|
@ -17,16 +17,19 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Parsed.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Parsed.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Array.php';
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
require_once 'Zend/Pdf/Element/Numeric.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple.php';
|
||||
|
||||
/** Zend_Pdf_FileParser_Font_OpenType */
|
||||
require_once 'Zend/Pdf/FileParser/Font/OpenType.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parsed and (optionaly) embedded fonts implementation
|
||||
*
|
||||
@ -48,8 +51,8 @@ abstract class Zend_Pdf_Resource_Font_Simple_Parsed extends Zend_Pdf_Resource_Fo
|
||||
public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
|
||||
|
||||
|
||||
$fontParser->parse();
|
||||
|
||||
/* Object properties */
|
||||
@ -99,5 +102,4 @@ abstract class Zend_Pdf_Resource_Font_Simple_Parsed extends Zend_Pdf_Resource_Fo
|
||||
$widthsObject = $this->_objectFactory->newObject($widthsArrayElement);
|
||||
$this->_resource->Widths = $widthsObject;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,16 +17,19 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TrueType.php 16541 2009-07-07 06:59:03Z bkarwin $
|
||||
* @version $Id: TrueType.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Parsed */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Parsed.php';
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
/** Zend_Pdf_Resource_Font_FontDescriptor */
|
||||
require_once 'Zend/Pdf/Resource/Font/FontDescriptor.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Parsed */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Parsed.php';
|
||||
|
||||
/**
|
||||
* TrueType fonts implementation
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Standard.php 16541 2009-07-07 06:59:03Z bkarwin $
|
||||
* @version $Id: Standard.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple.php';
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class definition for the standard 14 Type 1 PDF fonts.
|
||||
*
|
||||
@ -75,5 +79,4 @@ abstract class Zend_Pdf_Resource_Font_Simple_Standard extends Zend_Pdf_Resource_
|
||||
parent::__construct();
|
||||
$this->_resource->Subtype = new Zend_Pdf_Element_Name('Type1');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Courier.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Courier.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Courier.
|
||||
*
|
||||
@ -275,8 +279,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Courier extends Zend_Pdf_Resource_F
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -287,5 +292,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Courier extends Zend_Pdf_Resource_F
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Courier');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CourierBold.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: CourierBold.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Courier-Bold.
|
||||
*
|
||||
@ -276,8 +280,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierBold extends Zend_Pdf_Resour
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -288,5 +293,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierBold extends Zend_Pdf_Resour
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Courier-Bold');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CourierBoldOblique.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: CourierBoldOblique.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Courier-BoldOblique.
|
||||
*
|
||||
@ -277,8 +281,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierBoldOblique extends Zend_Pdf
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -289,5 +294,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierBoldOblique extends Zend_Pdf
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Courier-BoldOblique');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CourierOblique.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: CourierOblique.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Courier-Oblique.
|
||||
*
|
||||
@ -277,8 +281,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierOblique extends Zend_Pdf_Res
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -289,5 +294,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_CourierOblique extends Zend_Pdf_Res
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Courier-Oblique');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Helvetica.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Helvetica.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Helvetica.
|
||||
*
|
||||
@ -285,8 +289,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Helvetica extends Zend_Pdf_Resource
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -297,5 +302,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Helvetica extends Zend_Pdf_Resource
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Helvetica');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,16 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: HelveticaBold.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: HelveticaBold.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Helvetica-Bold.
|
||||
*
|
||||
@ -286,8 +289,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBold extends Zend_Pdf_Reso
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -298,5 +302,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBold extends Zend_Pdf_Reso
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Helvetica-Bold');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: HelveticaBoldOblique.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: HelveticaBoldOblique.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Helvetica-BoldOblique.
|
||||
*
|
||||
@ -288,8 +292,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBoldOblique extends Zend_P
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -300,5 +305,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBoldOblique extends Zend_P
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Helvetica-BoldOblique');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: HelveticaOblique.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: HelveticaOblique.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Helvetica-Oblique.
|
||||
*
|
||||
@ -287,8 +291,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaOblique extends Zend_Pdf_R
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -299,5 +304,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_HelveticaOblique extends Zend_Pdf_R
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Helvetica-Oblique');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Symbol.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Symbol.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Symbol.
|
||||
*
|
||||
@ -342,8 +346,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Symbol extends Zend_Pdf_Resource_Fo
|
||||
0xf8f6 => 0xb5, 0xf8f7 => 0xb6, 0xf8f8 => 0xb7, 0xf8f9 => 0xb8,
|
||||
0xf8fa => 0xb9, 0xf8fb => 0xba, 0xf8fc => 0xbb, 0xf8fd => 0xbc,
|
||||
0xf8fe => 0xbd, 0xf8ff => 0xbe);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -457,5 +462,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_Symbol extends Zend_Pdf_Resource_Fo
|
||||
}
|
||||
return $this->decodeString($string, 'UTF-16BE');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TimesBold.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TimesBold.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Times-Bold.
|
||||
*
|
||||
@ -284,8 +288,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesBold extends Zend_Pdf_Resource
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -296,5 +301,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesBold extends Zend_Pdf_Resource
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-Bold');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TimesBoldItalic.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TimesBoldItalic.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Times-BoldItalic.
|
||||
*
|
||||
@ -285,8 +289,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesBoldItalic extends Zend_Pdf_Re
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -297,5 +302,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesBoldItalic extends Zend_Pdf_Re
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-BoldItalic');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TimesItalic.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TimesItalic.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Times-Italic.
|
||||
*
|
||||
@ -285,8 +289,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesItalic extends Zend_Pdf_Resour
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -297,5 +302,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesItalic extends Zend_Pdf_Resour
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-Italic');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TimesRoman.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TimesRoman.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font Times-Roman.
|
||||
*
|
||||
@ -285,8 +289,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesRoman extends Zend_Pdf_Resourc
|
||||
0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134,
|
||||
0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138,
|
||||
0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -297,5 +302,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_TimesRoman extends Zend_Pdf_Resourc
|
||||
*/
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-Roman');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ZapfDingbats.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ZapfDingbats.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font_Simple_Standard */
|
||||
require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php';
|
||||
|
||||
|
||||
/**
|
||||
* Implementation for the standard PDF font ZapfDingbats.
|
||||
*
|
||||
@ -368,8 +372,9 @@ class Zend_Pdf_Resource_Font_Simple_Standard_ZapfDingbats extends Zend_Pdf_Resou
|
||||
0x27b5 => 0xc1, 0x27b6 => 0xc2, 0x27b7 => 0xc3, 0x27b8 => 0xc4,
|
||||
0x27b9 => 0xc5, 0x27ba => 0xc6, 0x27bb => 0xc7, 0x27bc => 0xc8,
|
||||
0x27bd => 0xc9, 0x27be => 0xca);
|
||||
require_once 'Zend/Pdf/Cmap.php';
|
||||
$this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData(
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData);
|
||||
|
||||
|
||||
/* Resource dictionary */
|
||||
@ -483,5 +488,4 @@ class Zend_Pdf_Resource_Font_Simple_Standard_ZapfDingbats extends Zend_Pdf_Resou
|
||||
}
|
||||
return $this->decodeString($string, 'UTF-16BE');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,42 +17,41 @@
|
||||
* @subpackage Fonts
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Type0.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Type0.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Internally used classes */
|
||||
require_once 'Zend/Pdf/Element/Array.php';
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
|
||||
/** Zend_Pdf_Resource_Font */
|
||||
require_once 'Zend/Pdf/Resource/Font.php';
|
||||
|
||||
/** Zend_Pdf_Resource_Font_CidFont */
|
||||
require_once 'Zend/Pdf/Resource/Font/CidFont.php';
|
||||
|
||||
/** Zend_Pdf_Resource_Font_CidFont_TrueType */
|
||||
require_once 'Zend/Pdf/Resource/Font/CidFont/TrueType.php';
|
||||
|
||||
|
||||
/**
|
||||
* Adobe PDF composite fonts implementation
|
||||
*
|
||||
*
|
||||
* A composite font is one whose glyphs are obtained from other fonts or from fontlike
|
||||
* objects called CIDFonts ({@link Zend_Pdf_Resource_Font_CidFont}), organized hierarchically.
|
||||
* In PDF, a composite font is represented by a font dictionary whose Subtype value is Type0;
|
||||
* this is also called a Type 0 font (the Type 0 font at the top level of the hierarchy is the
|
||||
* In PDF, a composite font is represented by a font dictionary whose Subtype value is Type0;
|
||||
* this is also called a Type 0 font (the Type 0 font at the top level of the hierarchy is the
|
||||
* root font).
|
||||
*
|
||||
*
|
||||
* In PDF, a Type 0 font is a CID-keyed font.
|
||||
*
|
||||
* CID-keyed fonts provide effective method to operate with multi-byte character encodings.
|
||||
*
|
||||
* The CID-keyed font architecture specifies the external representation of certain font programs,
|
||||
*
|
||||
* The CID-keyed font architecture specifies the external representation of certain font programs,
|
||||
* called CMap and CIDFont files, along with some conventions for combining and using those files.
|
||||
*
|
||||
* A CID-keyed font is the combination of a CMap with one or more CIDFonts, simple fonts,
|
||||
*
|
||||
* A CID-keyed font is the combination of a CMap with one or more CIDFonts, simple fonts,
|
||||
* or composite fonts containing glyph descriptions.
|
||||
*
|
||||
*
|
||||
* The term 'CID-keyed font' reflects the fact that CID (character identifier) numbers
|
||||
* are used to index and access the glyph descriptions in the font.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* Font objects should be normally be obtained from the factory methods
|
||||
* {@link Zend_Pdf_Font::fontWithName} and {@link Zend_Pdf_Font::fontWithPath}.
|
||||
*
|
||||
@ -65,7 +64,7 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
{
|
||||
/**
|
||||
* Descendant CIDFont
|
||||
*
|
||||
*
|
||||
* @var Zend_Pdf_Resource_Font_CidFont
|
||||
*/
|
||||
private $_descendantFont;
|
||||
@ -73,7 +72,7 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* Generate ToUnicode character map data
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
static private function getToUnicodeCMapData()
|
||||
@ -107,9 +106,9 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
public function __construct(Zend_Pdf_Resource_Font_CidFont $descendantFont)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
|
||||
$this->_objectFactory->attach($descendantFont->getFactory());
|
||||
|
||||
|
||||
$this->_fontType = Zend_Pdf_Font::TYPE_TYPE_0;
|
||||
$this->_descendantFont = $descendantFont;
|
||||
|
||||
@ -130,23 +129,23 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
$this->_ascent = $descendantFont->getAscent();
|
||||
$this->_descent = $descendantFont->getDescent();
|
||||
$this->_lineGap = $descendantFont->getLineGap();
|
||||
|
||||
|
||||
|
||||
|
||||
$this->_resource->Subtype = new Zend_Pdf_Element_Name('Type0');
|
||||
$this->_resource->BaseFont = new Zend_Pdf_Element_Name($descendantFont->getResource()->BaseFont->value);
|
||||
$this->_resource->DescendantFonts = new Zend_Pdf_Element_Array(array( $descendantFont->getResource() ));
|
||||
$this->_resource->Encoding = new Zend_Pdf_Element_Name('Identity-H');
|
||||
|
||||
|
||||
$toUnicode = $this->_objectFactory->newStreamObject(self::getToUnicodeCMapData());
|
||||
$this->_resource->ToUnicode = $toUnicode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of glyph numbers corresponding to the Unicode characters.
|
||||
*
|
||||
* Zend_Pdf uses 'Identity-H' encoding for Type 0 fonts.
|
||||
* So we don't need to perform any conversion
|
||||
* So we don't need to perform any conversion
|
||||
*
|
||||
* See also {@link glyphNumberForCharacter()}.
|
||||
*
|
||||
@ -162,7 +161,7 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
* Returns the glyph number corresponding to the Unicode character.
|
||||
*
|
||||
* Zend_Pdf uses 'Identity-H' encoding for Type 0 fonts.
|
||||
* So we don't need to perform any conversion
|
||||
* So we don't need to perform any conversion
|
||||
*
|
||||
* @param integer $characterCode Unicode character code (code point).
|
||||
* @return integer Glyph number.
|
||||
@ -171,7 +170,7 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
{
|
||||
return $characterCode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@ -230,8 +229,8 @@ class Zend_Pdf_Resource_Font_Type0 extends Zend_Pdf_Resource_Font
|
||||
|
||||
/**
|
||||
* Convert string to the font encoding.
|
||||
*
|
||||
* The method is used to prepare string for text drawing operators
|
||||
*
|
||||
* The method is used to prepare string for text drawing operators
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $charEncoding Character encoding of source text.
|
||||
|
Reference in New Issue
Block a user