使用ImageMagick 在图片上绘制粗斜体的中文也许是一个错误。
測試發(fā)現(xiàn):
ImageMagick使用中文字體,在圖片上繪制帶粗或斜體的中文,看不到效果。
如果使用英文字體,繪制粗或斜體的英文,99%都有效果。
?
今天無意看到一篇文章提到:
convert?-list?font?獲得系統(tǒng)目前擁有的字體的列表,其中g(shù)lyphs一項(xiàng)是字體的文件。 試了一下,果然能列出所有的字體。 但和windows的字體選擇對話框一對比,郁悶了。 比如windows的字體選擇對話框里顯示“宋體”和“新宋體”。 但在?convert?-list?font?列出來的是: Font:?宋體-&-新宋體??family:?宋體?&?新宋體
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\simsun.ttc ---------------------------------------------------------------------------------------- 從下面的字體列表中也能看出來,為什么用中文字體看,設(shè)置了粗斜體也沒有效果了。?
?Font:?Arial
??family:?Arial
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\arial.ttf
Font:?Arial-Black
??family:?Arial
??style:?Normal
??stretch:?Normal
??weight:?900
??glyphs:?c:\windows\fonts\ariblk.ttf
Font:?Arial-Bold
??family:?Arial
??style:?Normal
??stretch:?Normal
??weight:?700
??glyphs:?c:\windows\fonts\arialbd.ttf
Font:?Arial-Bold-Italic
??family:?Arial
??style:?Italic
??stretch:?Normal
??weight:?700
??glyphs:?c:\windows\fonts\arialbi.ttf
Font:?Arial-Italic
??family:?Arial
??style:?Italic
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\ariali.ttf
Font:?Arial-Narrow
??family:?Arial?Narrow
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\arialn.ttf
Font:?Arial-Narrow-Bold
??family:?Arial?Narrow
??style:?Normal
??stretch:?Normal
??weight:?700
??glyphs:?c:\windows\fonts\arialnb.ttf
Font:?Arial-Narrow-Bold-Italic
??family:?Arial?Narrow
??style:?Italic
??stretch:?Normal
??weight:?700
??glyphs:?c:\windows\fonts\arialnbi.ttf
Font:?Arial-Narrow-Italic
??family:?Arial?Narrow
??style:?Italic
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\arialni.ttf
?
Font:?華康正顏楷體W7-&-華康正顏楷體W7(P)
??family:?華康正顏楷體W7?&?華康正顏楷體W7(P)
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\萢康正顏楷體w7.ttc
Font:?宋體-&-新宋體
??family:?宋體?&?新宋體
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\simsun.ttc
Font:?蘇新詩卵石體
??family:?蘇新詩卵石體
??style:?Normal
??stretch:?Normal
??weight:?400
??glyphs:?c:\windows\fonts\蘇新詩卵石體.ttf
?
?
2012-10-08
?
轉(zhuǎn)載于:https://www.cnblogs.com/personnel/p/4584823.html
總結(jié)
以上是生活随笔為你收集整理的使用ImageMagick 在图片上绘制粗斜体的中文也许是一个错误。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Tuxedo学习门户网站
- 下一篇: Linux而不必进入password登陆