FreeBSD系統(tǒng)下如何使GraphicsMagick支持中文字體?
FreeBSD下如何使GraphicsMagick支持中文字體?今天小編為大家?guī)?lái)的是FreeBSD下使GraphicsMagick支持中文字體的方法!有需要的朋友一起去看看吧。1、安裝:pkg install GraphicsM...
FreeBSD下如何使GraphicsMagick支持中文字體?今天小編為大家?guī)?lái)的是FreeBSD下使GraphicsMagick支持中文字體的方法!有需要的朋友一起去看看吧。
1、安裝:
pkg install GraphicsMagick
2、查看編譯參數(shù):
重點(diǎn)看紅字部分,這部分決定了windows字體的存放路徑,如果系統(tǒng)中沒(méi)有這個(gè)路徑,就mkdir一個(gè)。
注意:FreeBSD10.3更改了這個(gè)默認(rèn)路徑,以前在/usr/local/lib/X11下面,現(xiàn)在改到/usr/local/share里面,更為合理一些。
# gm -version
GraphicsMagick 1.3.23 2015-11-07 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2015 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP yes
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG yes
JPEG-2000 yes
JPEG yes
Little CMS yes
Loadable Modules no
OpenMP yes (201107)
PNG yes
TIFF yes
TRIO no
UMEM no
WebP yes
WMF yes
X11 yes
XML yes
ZLIB yes
Host type: amd64-portbld-freebsd10.1
Configured using the command:
./configure '--enable-shared' '--enable-static' '--with-windows-font-dir=/usr/local/share/fonts/webfonts' '--without-perl' '--without-dps' '--without-fpx' '--with-threads' '--enable-onmp' '--disable-openmp-slow' '--with-quantum-depth=16' '--with-webp' '--with-wmf' '--with-x' '--with-xml' '--x-libraries=/usr/local/lib' '--x-includes=/usr/local/include' '--prefix=/usr/cal' '--localstatedir=/var' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.1' 'build_alias=amd64-portbld-freebsd10.1' 'CC=gcc48' 'CFLAGS=-O2 -pip -isystem /usr/local/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -L/usr/lal/lib/gcc48' 'LIBS=' 'CPPFLAGS=-isystem /usr/local/include' 'CPP=cpp48' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -isystem /usr/local/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-rict-aliasing -isystem /usr/local/include -Wl,-rpath=/usr/local/lib/gcc48'
Final Build Parameters:
CC = gcc48 -std=gnu99
CFLAGS = -fopenmp -O2 -pipe -isystem /usr/local/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wall -D_THREAD_SAFE
CPPFLAGS = -isystem /usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libxml2
CXX = c++
CXXFLAGS = -O2 -pipe -isystem /usr/local/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -isystem /usr/local/include -Wl,-rpath=/usr/local/lib/gcc48 -D_TEAD_SAFE
LDFLAGS = -L/usr/local/lib -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -L/usr/local/lib/gcc48 -L/usr/local/lib
LIBS = -ljbig -lwebp -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng16 -lwmflite -lX
3、上傳中文字體,直接在c:\windows\fonts目錄里找就可以,至少上傳兩個(gè),一個(gè)英文字體,一個(gè)中文字體,可以是arial.ttf和simsun.ttf等sim系列,當(dāng)然你也可以上傳多個(gè)。
4、編輯字體配置文件,在最后添加字體信息,arial等英文字體默認(rèn)都在,只添加上傳的中文字體即可,每個(gè)字體文件都需要添加一小節(jié):
/usr/local/lib/GraphicsMagick/config # vi type-windows.mgk
name="simli"
fullname="simli"
family="simli"
weight="400"
style="normal"
stretch="normal"
glyphs="/usr/local/share/fonts/webfonts/simli.ttf"
/>
- FreeBSD10系統(tǒng)安裝內(nèi)核源代碼方法講解
- Unix系統(tǒng)中的dot命令的使用方法詳解
- Unix文件系統(tǒng)和pwd命令實(shí)現(xiàn)詳解
- FreeBSD系統(tǒng)下zfs: failed with error 6錯(cuò)誤的解決方
- Freebsd P怎么安裝?Freebsd PF 安裝使用詳解
- FreeBSD系統(tǒng)怎么添加硬盤(pán)?FreeBSD系統(tǒng)添加硬盤(pán)的方法教
- Ubuntu系統(tǒng)里怎樣設(shè)置靜態(tài)IP?Ubuntu系統(tǒng)設(shè)置靜態(tài)IP的方
- ubuntu系統(tǒng)怎么選擇最佳服務(wù)器?ubuntu系統(tǒng)選擇最佳服務(wù)
- solaris系統(tǒng)中有關(guān) TCP/IP配置的文件與命令
- windows XP+Fedora 8+solaris 11三系統(tǒng)安裝方法教程
FreeBSD10系統(tǒng)安裝內(nèi)核源代碼方法講解
下面小編為大家?guī)?lái)的是FreeBSD10安裝內(nèi)核源代碼方法講解!希望能夠幫助到大家!有需要的朋友一起去看看吧。安裝FreeBSD10之后,發(fā)現(xiàn)沒(méi)有安裝內(nèi)核源代碼。(沒(méi)有/usr/src/sys目錄)...
Unix系統(tǒng)中的dot命令的使用方法詳解
今天小編將為大家?guī)?lái)的是Unix中的dot命令詳解!希望對(duì)大家會(huì)有幫助!有需要的朋友一起去看看吧...
Unix文件系統(tǒng)和pwd命令實(shí)現(xiàn)詳解
小編要為大家?guī)?lái)的是Unix文件系統(tǒng)和pwd命令實(shí)現(xiàn)詳解,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧...
FreeBSD系統(tǒng)下zfs: failed with error 6錯(cuò)誤的解決方法
FreeBSD下zfs: failed with error 6錯(cuò)誤如何解決?今天小編要為大家?guī)?lái)的是 FreeBSD下zfs: failed with error 6錯(cuò)誤的解決方法,有需要的朋友一起去看看吧...
Freebsd P怎么安裝?Freebsd PF 安裝使用詳解
今天小編為大家?guī)?lái)的是Freebsd PF 安裝使用詳解,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧...
FreeBSD系統(tǒng)怎么添加硬盤(pán)?FreeBSD系統(tǒng)添加硬盤(pán)的方法教程
FreeBSD如何添加硬盤(pán)?別擔(dān)心,今天小編就為大家分享FreeBSD添加硬盤(pán)的方法,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧...
Ubuntu系統(tǒng)里怎樣設(shè)置靜態(tài)IP?Ubuntu系統(tǒng)設(shè)置靜態(tài)IP的方法教程
系統(tǒng)裝好后,源也設(shè)置好了(把以前默認(rèn)的源注釋掉了,改成了幾個(gè)教育網(wǎng)的源,北交的源相對(duì)比較快),下來(lái)的任務(wù)就是更新系統(tǒng)和安裝所需的軟件,但是前提是必須可以上網(wǎng),因?yàn)閷?shí)驗(yàn)室用的都...
ubuntu系統(tǒng)怎么選擇最佳服務(wù)器?ubuntu系統(tǒng)選擇最佳服務(wù)器的教程
ubuntu系統(tǒng)怎么選擇最佳服務(wù)器?ubuntu系統(tǒng)默認(rèn)的服務(wù)器在美國(guó),想要用國(guó)內(nèi)鏡像服務(wù)器,需要選擇最佳服務(wù)器就可以了,該怎么設(shè)置呢?下面我們就來(lái)看看詳細(xì)的教程,...
solaris系統(tǒng)中有關(guān) TCP/IP配置的文件與命令
solaris中有關(guān) TCP/IP 配置的文件與命令,供大家參考。 /etc/hostname.eri0 主機(jī)名和IP地址文件 /etc/nodename 本地計(jì)算機(jī)名文件 /etc/defaultdomain 域名文件...
windows XP+Fedora 8+solaris 11三系統(tǒng)安裝方法教程
我用的三個(gè)系統(tǒng)分別是:windows是xp sp2;linux是Fedora 8;;unix是Solaris Nevada snv_60 X86(自動(dòng)安裝光盤(pán))(solaris 11)。...