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,714
20년 전 조회 2,720
20년 전 조회 1,682
아꽈
20년 전 조회 1,737
20년 전 조회 1,483
20년 전 조회 1,807
20년 전 조회 1,501
20년 전 조회 1,649
20년 전 조회 1,712
20년 전 조회 1,631
20년 전 조회 1,761
20년 전 조회 1,395
슈가쭌
20년 전 조회 1,390
20년 전 조회 2,065
20년 전 조회 1,667
러브레터
20년 전 조회 1,578
20년 전 조회 1,281
20년 전 조회 1,759
20년 전 조회 1,441
20년 전 조회 4,865
20년 전 조회 1,481
20년 전 조회 1,286
20년 전 조회 1,375
20년 전 조회 1,864
20년 전 조회 1,361
20년 전 조회 1,329
러브레터
20년 전 조회 1,256
러브레터
20년 전 조회 1,813
러브레터
20년 전 조회 1,503
20년 전 조회 1,391