(PHP) Using browser fonts with SWFText and SWFShape

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using the current XAMPP for Windows (version 1.7.2) which has PHP 5.3 and MING 0.4.2. I am having great difficulty using browser fonts. For example, the following code snippet will produce an error when trying to set the font for SWFText, but the SWFTextField works OK:

<?php

   $font = new SWFBrowserFont("arial");
$txtfld = new SWFTextField(SWFTEXTFIELD_DRAWBOX);
   $txtfld->setFont($font);
$txt = new SWFText();
   $txt->setFont($font);
?>

The error being returned is:
*Warning*: SWFText::setFont() [swftext.setfont <http://ming.com/swftext.setfont>]: Unable to find property font in *E:\ming\new_file.php* on line *9*

*Fatal error*: SWFText::setFont() [<a href='swftext.setfont'>swftext.setfont</a>]: Called object is not an SWFFont in *E:\ming\new_file.php* on line *9

*I get the same error when trying to use SWFShape->drawGlyph(). Can anyone provide a working example for SWFText and SWFShape using browser fonts? Please no C code since I'm using PHP. The examples provided by gazb (which have helped me tremendously in the past) do not work with ming 0.4.2.

Larry Dunbar

begin:vcard
fn:Larry Dunbar
n:Dunbar;Larry
org:LowTechGeezer.com
adr:;;4595 Rosebud St.;Cocoa;FL;32927;US
email;internet:ldunbar@xxxxxxxxxxxxxxxx
tel;work:(321) 482-5753
tel;home:(321) 482-5753
x-mozilla-html:TRUE
version:2.1
end:vcard

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Ming-users mailing list
Ming-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ming-users

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux