0

http://ttgdark.com/plugins/xboximg.php?gamertag=testing ...

http://ttgdark.com/plugins/xboximg.php?gamertag=別のテスト

お気付きのとおり、2 番目のリンクには「テスト」という単語が書かれていません。今日、動的な画像の書き込みについて学び始めることにしましたが、何が問題なのかを理解するためにどこから始めればよいのか本当にわかりません。これが私のコードです:

<?php

    header ("Content-type: image/png");

    $font = 'micross.ttf';
    $image = @imagecreatefrompng( 'test.png' );
    $white = @imagecolorallocate( $image, 255, 255, 255 );
    $grey = @imagecolorallocate( $image, 128, 128, 128 );
    $black = @imagecolorallocate( $image, 0, 0, 0 );

    $text = $_GET['gamertag'];
      //$text = urlencode( $text ); // Replaces spaces with plus signs
    @imagettftext( $image, 11, 0, 40, 50, $black, $font, $text );
    @imagepng( $image );
    @imagedestroy( $image );

?>

PHP Warning: imagettftext() [<a href='function.imagettftext'>function.imagettftext</a>]: Problem rendering glyph in /var/www/vhosts/ttgdark.com/httpdocs/plugins/xboximg.php on line 12

4

1 に答える 1

2

次に、 imagettftext() が気に入らないスペースについて何かがあります。フォントやエンコーディングが気に入らないのではないでしょうか? 別のフォントを試してみて、どうなるか見てみましょう。

于 2011-06-25T11:46:05.107 に答える