note 106048 added to function.swffont.construct

From: Date: Wed, 05 Oct 2011 21:30:22 +0000
Subject: note 106048 added to function.swffont.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-183650@lists.php.net to get a copy of this message
Correcttion to the given example: (add a space after new) <?php $f = new SWFFont("_sans"); ?> I've tested this example on PHP5.3.5 and it failed measurably. The library is great but it's not up-to-date. It keeps sending a Fatal error: Loading font failed! Please use new SWFBrowserFont(string:fontname) for player/browser fonts I've tried using SWFBrowserFont $font = new SWFBrowserFont('_sans'); $text = new SWFText(); $text->setFont($font); Again it failed to set the font (Fatal error: SWFText::setFont() [swftext.setfont]: Called object is not an SWFFont). The only work around is to use a textfield instead as shown below $font = new SWFBrowserFont('_sans'); $text = new SWFTextField(); $text->setFont($font); or handle the text using Action Script. ---- Server IP: 208.69.120.55 Probable Submitter: 166.20.224.11 ---- Manual Page -- http://www.php.net/manual/en/function.swffont.construct.php Edit -- https://master.php.net/note/edit/106048 Del: integrated -- https://master.php.net/note/delete/106048/integrated Del: useless -- https://master.php.net/note/delete/106048/useless Del: bad code -- https://master.php.net/note/delete/106048/bad+code Del: spam -- https://master.php.net/note/delete/106048/spam Del: non-english -- https://master.php.net/note/delete/106048/non-english Del: in docs -- https://master.php.net/note/delete/106048/in+docs Del: other reasons-- https://master.php.net/note/delete/106048 Reject -- https://master.php.net/note/reject/106048 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183650) next »