lithron font problems

38 views
Skip to first unread message

Schmunk

unread,
May 25, 2010, 8:47:00 AM5/25/10
to phundament-dev
[Lithron ext]

SVN rev.140 (p2b9)

In WAMP (@WIN XP) I got problems with getting right fonts:

PDFlibException
Description

Font 'C:\wamp\www\p2b9\data\fonts\gw-fonts-ttf-1.0\CasUni\CaslonRoman'
with encoding 'unicode': Font file (AFM, PFM, TTF, OTF etc.) or host
font not found
Source File

C:\wamp\www\p2b9\lib\lithron\Lithron.php(321)

00309: }
00310: $this->Fonts[$family][$subtype]["spacewidth"] =
$this->DummyPDF->stringwidth(" ", $handle, 1);
00311: }
00312: }
00313:
00314: public function getFontHandle($pdf, $handlekey, $family,
$subtype)
00315: {
00316: $f = $this->Fonts[$family][$subtype];
00317: if (!isset($f[$handlekey]))
00318: {
00319: $emb = isset($f["embedding"]) ? $f["embedding"] :
"false";
00320: $enc = isset($f["encoding"]) ? $f["encoding"] :
$this->DefaultEncoding;
00321: $handle = $pdf->load_font($f["name"], $enc, "embedding={".
$emb."}");
00322: $this->Fonts[$family][$subtype][$handlekey] =
$handle;
00323: }
00324: else
00325: $handle = $f[$handlekey];
00326: return $handle;
00327: }
00328:
00329:
00330: public function getStringWidth($node, $string)
00331: {
00332: $family = Property::get($node, "font-family");
00333: $weight = Property::get($node, "font-weight");

Stack Trace

#0 C:\wamp\www\p2b9\lib\lithron\Lithron.php(321): PDFlib->load_font('C:
\wamp\www\p2b...', 'unicode', 'embedding={true...')
#1 C:\wamp\www\p2b9\lib\lithron\Lithron.php(303): Lithron-
>getFontHandle(Object(PDFlib), 'dummyhandle', 'junicode', 'normal')
#2 C:\wamp\www\p2b9\lib\lithron\Lithron.php(119): Lithron-
>initializeFonts()
#3 C:\wamp\www\p2b9\modules\p2\extensions\pdf\EPdfManager.php(97):
Lithron->init()
#4 C:\wamp\www\p2b9\modules\p2\extensions\pdf
\EPdfRenderAction.php(49): EPdfManager->renderJob()
#5 C:\wamp\www\p2b9\lib\yii\web\CController.php(300): EPdfRenderAction-
>run()
#6 C:\wamp\www\p2b9\lib\yii\web\filters\CFilterChain.php(129):
CController->runAction(Object(EPdfRenderAction))
#7 C:\wamp\www\p2b9\lib\yii\web\filters\CFilter.php(41): CFilterChain-
>run()
#8 C:\wamp\www\p2b9\lib\yii\web\CController.php(999): CFilter-
>filter(Object(CFilterChain))
#9 C:\wamp\www\p2b9\lib\yii\web\filters\CInlineFilter.php(59):
CController->filterAccessControl(Object(CFilterChain))
#10 C:\wamp\www\p2b9\lib\yii\web\filters\CFilterChain.php(126):
CInlineFilter->filter(Object(CFilterChain))
#11 C:\wamp\www\p2b9\lib\yii\web\CController.php(283): CFilterChain-
>run()
#12 C:\wamp\www\p2b9\lib\yii\web\CController.php(257): CController-
>runActionWithFilters(Object(EPdfRenderAction), Array)
#13 C:\wamp\www\p2b9\lib\yii\web\CWebApplication.php(320): CController-
>run('renderPdf')
#14 C:\wamp\www\p2b9\lib\yii\web\CWebApplication.php(120):
CWebApplication->runController('p2/ajax/renderP...')
#15 C:\wamp\www\p2b9\lib\yii\base\CApplication.php(135):
CWebApplication->processRequest()
#16 C:\wamp\www\p2b9\www\index.php(13): CApplication->run()
#17 {main}


problem somewhere here \p2b9\modules\p2\views\pdfTemplates\test.php
<font font-family="junicode"
file-normal="<?php echo Yii::app()-
>basePath.DS."data".DS."fonts".DS."gw-fonts-
ttf-1.0".DS."CasUni".DS."CaslonRoman" ?>"
embedding-normal="true"
file-bold="<?php echo Yii::app()-
>basePath.DS."data".DS."fonts".DS."gw-fonts-
ttf-1.0".DS."CasUni".DS."CaslonBold" ?>"
embedding-bold="true"
file-italic="<?php echo Yii::app()-
>basePath.DS."data".DS."fonts".DS."gw-fonts-
ttf-1.0".DS."CasUni".DS."CaslonBold" ?>"
embedding-italic="true"
file-oblique="<?php echo Yii::app()-
>basePath.DS."data".DS."fonts".DS."gw-fonts-
ttf-1.0".DS."CasUni".DS."CaslonItalic" ?>"
embedding-oblique="true"
/>


Nevertheless not including fonts renders test.php except Flash Preview
windows:
Error: HTTP request error


Greetings,
CoLT

Schmunk

unread,
May 25, 2010, 8:48:33 AM5/25/10
to phundament-dev
Hi CoLT,

could you post a directory output (ls -la) of
Yii::app()->basePath.DS."data".DS."fonts".DS."gw-fonts-
ttf-1.0".DS."CasUni".DS."CaslonBold"?


Thanks,
schmunk

Sarunas D.

unread,
May 25, 2010, 9:03:43 AM5/25/10
to phundam...@googlegroups.com
Hello,

I believe its same problem with DS, because when installing Phundament2 no css files are included (on Pii was working good).

Directory output:
C:\wamp\www\ssis\data\fonts>cd gw-fonts-ttf-1.0

C:\wamp\www\ssis\data\fonts\gw-fonts-ttf-1.0>dir
 Volume in drive C has no label.
 Volume Serial Number is 4CE0-4E1E

 Directory of C:\wamp\www\ssis\data\fonts\gw-fonts-ttf-1.0

2010.05.18  18:16    <DIR>          .
2010.05.18  18:16    <DIR>          ..
2010.04.13  23:56            79.660 Caliban.ttf
2010.05.18  18:16    <DIR>          CasUni
2010.04.13  23:56             1.515 COPYING
2010.05.18  18:16    <DIR>          CupUniTTF
2010.04.13  23:56             2.048 fonts-ttf-gw.spec
2010.05.18  18:16    <DIR>          MonospaceTTF
2010.04.13  23:56             9.587 README
               4 File(s)         92.810 bytes
               5 Dir(s)   1.027.186.688 bytes free

Or simply "dir C:\wamp\www\ssis\data\fonts\gw-fonts-ttf-1.0" on Win machine.

Best regards,
CoLT
Reply all
Reply to author
Forward
0 new messages