|
swf_definefont
Defines a font
(PHP 4)
The swf_definefont() function defines a font parameter and gives it the specified id. It then sets the font given by fontname to the current font. Code Examples / Notes » swf_definefontgreg
These are the standard fonts that I have found so far that come with this engine. "Curl-Roman" "Haeberli" "Inja" "Ligon-Bold" "Ligon-Roman" "Mod" "Pix3" Most of them are not too great but they are the only ones that come by default. There are ways to convert other fonts so that you can use them. I haven't converted any yet so I don't know for sure how well it works. hotkey
For detailed instructions on how to convert fonts into Flash-Fonts check http://developer.bestbytes.de regards, HotKey joachim kruyswijk
<?php # Show seven fonts in random sizes and colors. # Reload to see the changes header("Content-type: application/x-shockwave-flash"); # Higher values for $frames make it quicker! $frames = 1; swf_openfile("php://stdout", 256, 256, $frames, .9, .9, .9); # Viewport. Bigger values give a bigger viewport and tinier content define("VIEWPORT", 150); swf_ortho2(-VIEWPORT, VIEWPORT, -VIEWPORT, VIEWPORT); # Start with empty frame swf_showframe(); $tmp = 500; $fontnum = -1; $fonts = explode(",", "Curl-Roman,Haeberli,Inja,Ligon-Bold,Ligon-Roman,Mod,Pix3"); swf_translate(-100, 100, 0); for( $i = 0; $i< sizeof( $fonts ); $i++ ){ swf_addcolor(rnd01(), rnd01(), rnd01(), 0); swf_definefont(++$fontnum, $fonts[$i]); swf_fontsize( rand(6,45) ); # Show font name. Remove "-" from font name as Curl-Roman does not support that character! swf_definetext(++$tmp, str_replace("-", "", $fonts[$i] ), 0); swf_translate(0, -20, 0); swf_placeobject($tmp, 60); swf_showframe(); } swf_closefile(); # Return random color value i.e. value between 0 and 1 function rnd01(){ return (mt_rand(0,0xFF) / 0xFF); } ?> |
Change Languageswf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport |