Skip to content

Commit 2dafb73

Browse files
sreichelcolinmollenhour
authored andcommitted
Replace font LinLibertineFont with FONT_HELVETICA, ref #86, closes #272 #274 (#425)
1 parent 56bafb1 commit 2dafb73

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ protected function _drawItem(Varien_Object $item, Zend_Pdf_Page $page, Mage_Sale
790790
*/
791791
protected function _setFontRegular($object, $size = 7)
792792
{
793-
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf');
793+
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
794794
$object->setFont($font, $size);
795795
return $font;
796796
}
@@ -804,7 +804,7 @@ protected function _setFontRegular($object, $size = 7)
804804
*/
805805
protected function _setFontBold($object, $size = 7)
806806
{
807-
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf');
807+
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);
808808
$object->setFont($font, $size);
809809
return $font;
810810
}
@@ -818,7 +818,7 @@ protected function _setFontBold($object, $size = 7)
818818
*/
819819
protected function _setFontItalic($object, $size = 7)
820820
{
821-
$font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf');
821+
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_OBLIQUE);
822822
$object->setFont($font, $size);
823823
return $font;
824824
}

app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ public function getItemOptions() {
317317
*/
318318
protected function _setFontRegular($size = 7)
319319
{
320-
// $font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf');
321320
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
322321
$this->getPage()->setFont($font, $size);
323322
return $font;
@@ -331,8 +330,7 @@ protected function _setFontRegular($size = 7)
331330
*/
332331
protected function _setFontBold($size = 7)
333332
{
334-
// $font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf');
335-
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
333+
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);
336334
$this->getPage()->setFont($font, $size);
337335
return $font;
338336
}
@@ -345,8 +343,7 @@ protected function _setFontBold($size = 7)
345343
*/
346344
protected function _setFontItalic($size = 7)
347345
{
348-
// $font = Zend_Pdf_Font::fontWithPath(Mage::getBaseDir() . '/lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf');
349-
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
346+
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_OBLIQUE);
350347
$this->getPage()->setFont($font, $size);
351348
return $font;
352349
}

0 commit comments

Comments
 (0)