swf_definefont

(PHP 4)

swf_definefontDefines a font

Описание

void swf_definefont ( int $fontid , string $fontname )

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.

Список параметров

fontid

The id to be given to the font.

fontname

The font so be set as current font.

Возвращаемые значения

Эта функция не возвращает значения после выполнения.

Смотрите также

Коментарии

Автор:
<?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"256256$frames.9.9.9);

   
#    Viewport. Bigger values give a bigger viewport and tinier content
   
define("VIEWPORT"150);
   
swf_ortho2(-VIEWPORTVIEWPORT, -VIEWPORTVIEWPORT);

   
#    Start with empty frame
   
swf_showframe();

   
$tmp 500;
   
$fontnum = -1;

   
$fonts explode(",""Curl-Roman,Haeberli,Inja,Ligon-Bold,Ligon-Roman,Mod,Pix3");
   
swf_translate(-1001000);
    for( 
$i 0$isizeof$fonts ); $i++ ){
       
swf_addcolor(rnd01(), rnd01(), rnd01(), 0);
       
swf_definefont(++$fontnum$fonts[$i]);
       
swf_fontsizerand(6,45) );
       
# Show font name. Remove "-" from font name as Curl-Roman does not support that character!
       
swf_definetext(++$tmpstr_replace("-"""$fonts[$i] ), 0);
       
swf_translate(0, -200);
       
swf_placeobject($tmp60);
       
swf_showframe();
    }

   
swf_closefile();

   
#    Return random color value i.e. value between 0 and 1
   
function rnd01(){ return (mt_rand(0,0xFF) / 0xFF); }
?>
2006-01-28 07:50:54
http://php5.kiev.ua/manual/ru/function.swf-definefont.html

    Поддержать сайт на родительском проекте КГБ