とりあえずmingを使ってみる

Twitter ツイート Hatena Bookmark ブックマーク

前回mingをインストールまでできたのでPHPをつかってSWFを生成したいと思います。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
$font = new SWFFont("/home/polidog/ming-0.4.3/test/Media/font01.fdb");

$text = new SWFText();
$text->setFont($font);
$text->setColor(255,255,255);
$text->moveTo(10,50);
$text->setHeight(20);

$text->addString("polidog ");


$swf = new SWFMovie();

$swf->setDimension(400, 300);
$swf->setBackground(0, 0, 0);
$swf->add($text);

header('Content-type: application/x-shockwave-flash');
$swf->output();

日本語表示させるためには、日本語のフォントを作らなきゃだめみたいですね。。。
次回はswfの合成をやってみようと思います。

comments powered by Disqus
Built with Hugo
テーマ StackJimmy によって設計されています。