bool imagechar ( resource $image , int $font , int $x , int $y , string $c , int$color )

imagechar() 将字符串 c 的第一个字符画在 image 指定的图像中,其左上角位于 xy(图像左上角为 0, 0),颜色为 color。如果 font 是 1,2,3,4 或 5,则使用内置的字体(更大的数字对应于更大的字体)。

Example #1 imagechar() 例子

<?php
@header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30); $white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white); $text = 'Testing...';
$font = 'arialnarrow.ttf';
$font_size=12;
$wing=0;
$left=5;
$high=21; imagettftext($im, $font_size, $wing, $left,$high, $grey, $font, $text); imagepng($im);
imagedestroy($im);
?>

解决方案:更换字体,例如  arialnarrow.ttf

 问题解决! 

最新文章

  1. CGAL
  2. CentOS7.0安装Nginx 1.7.9
  3. 根据配置文件加载js依赖模块(JavaScript面试题)
  4. 【转】Android开发实践:自定义带消息循环(Looper)的工作线程
  5. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)
  6. (转)优化tomcat,提高网站运行速度
  7. CURL_INIT()
  8. Spring技术_邮箱注册_激活_获取验证码
  9. JS常用校验方法(判断输入框是否为空,数字,电话,邮件,四舍五入等)
  10. redis object 对象系统
  11. MongoDB--数据库与Collection注意事项
  12. 详谈JavaScript原型链
  13. 夏令营提高班上午上机测试 Day 4 解题报告
  14. Lintcode221 Add Two Numbers II solution 题解
  15. Egret 按钮点击缩放效果
  16. HTML-全局属性 / 事件属性(转)
  17. nginx的80端口跳转到443
  18. Vasya And The Mushrooms CodeForces - 1016C (前缀和模拟)
  19. static--Android静态变量使用陷阱
  20. 处于ESTABLISHED 状态的socket 却没有进程信息

热门文章

  1. json的使用(JObect,JsonData,JArray)
  2. Spring与SpringMVC的关系
  3. [javaEE] Servlet中Session的使用
  4. 笔记本(华硕UL80VT)软件超频setFSB
  5. 撩课-Java每天10道面试题第3天
  6. hadoop fs -put localfile . 时出现如下错误: could only be replicated to 0 nodes, instead of 1
  7. IDEA 搭建 springmvc maven 项目
  8. HDU3629:Convex
  9. Android踩坑随笔Fragment中onActivityResult方法不被调用
  10. JDK配置步骤