使用php gd和google webfonts将图像添加到图像 [英] Add text to image using php gd and google webfonts

查看:168
本文介绍了使用php gd和google webfonts将图像添加到图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想使用google webfonts中的字体向图像添加文字,是否可以?使用PHP图像GD

Is is possible if I want adding text to image with font from google webfonts? using PHP image GD

推荐答案

为了做到这一点,你需要将字体作为ttf / otf。没有别的方法不幸 - 或者更好地说,你会尝试的其他任何事情都会因为结果而过于复杂,甚至不会考虑它。

You will need the font as a ttf / otf in order to do that. There is no other way unfortunatelly - or better said, anything else you would try would be way overcomplicated for the result, don't even think about it.

稍后编辑你说你可以下载ttf文件,所以你只需要: http:// php .net / manual / en / function.imagettftext.php

Later edit You said you can download the ttf files, so all you need is: http://php.net/manual/en/function.imagettftext.php

这篇关于使用php gd和google webfonts将图像添加到图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆