GD를 이용해 TTF폰트를 브라우져에 이미지로 나타내기..

<?
  Header("Content-type: image/gif");
  if(!isset($s)) $s=11;
  $size = imagettfbbox($s,0,"/fonts/폰트명",$text);
  $dx = abs($size[2]-$size[0]);
  $dy = abs($size[5]-$size[3]);
  $xpad=9;
  $ypad=9;
  $im = imagecreate($dx+$xpad,$dy+$ypad);
  $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
  $black = ImageColorAllocate($im, 0,0,0);
  $white = ImageColorAllocate($im, 255,255,255);
  ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
  ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
  ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "/fonts/폰트명", $text);
  ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "/fonts/폰트명", $text);
  ImageGif($im);
  ImageDestroy($im);
?>
 
 
설명서 :  클릭
 
 
어디가 잘못된거죠?
스킨에 적용시킬려하는데..
엔지오라는 사이트에서 글거왔습니다.
혹시 아시는분 부탁드립니다. 감사합니다.
|

댓글 1개

다음 링크의 내용도 참고해보세요
http://www.sir.co.kr/bbs/board.php?bo_table=g3_tiptech&wr_id=2418
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
bbbking
20년 전 조회 1,734
20년 전 조회 2,756
20년 전 조회 1,705
아꽈
20년 전 조회 1,768
20년 전 조회 1,522
20년 전 조회 1,839
20년 전 조회 1,538
20년 전 조회 1,685
20년 전 조회 1,747
20년 전 조회 1,662
20년 전 조회 1,799
20년 전 조회 1,433
슈가쭌
20년 전 조회 1,425
20년 전 조회 2,105
20년 전 조회 1,709
러브레터
20년 전 조회 1,623
20년 전 조회 1,310
20년 전 조회 1,795
20년 전 조회 1,474
20년 전 조회 4,905
20년 전 조회 1,518
20년 전 조회 1,321
20년 전 조회 1,409
20년 전 조회 1,905
20년 전 조회 1,398
20년 전 조회 1,364
러브레터
20년 전 조회 1,299
러브레터
20년 전 조회 1,848
러브레터
20년 전 조회 1,543
20년 전 조회 1,440