久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

FreeBSD下如何使GraphicsMagick支持中文字體?

瀏覽:142日期:2022-06-03 17:40:07

1、安裝:

pkg install GraphicsMagick

2、查看編譯參數:

重點看紅字部分,這部分決定了windows字體的存放路徑,如果系統中沒有這個路徑,就mkdir一個。

注意:FreeBSD10.3更改了這個默認路徑,以前在/usr/local/lib/X11下面,現在改到/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 -lXext -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread

3、上傳中文字體,直接在c:\windows\fonts目錄里找就可以,至少上傳兩個,一個英文字體,一個中文字體,可以是arial.ttf和simsun.ttf等sim系列,當然你也可以上傳多個。

4、編輯字體配置文件,在最后添加字體信息,arial等英文字體默認都在,只添加上傳的中文字體即可,每個字體文件都需要添加一小節:

/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"
      />
相關文章:
主站蜘蛛池模板: 红河县| 偃师市| 桃江县| 恭城| 呼图壁县| 武义县| 华蓥市| 巴林右旗| 甘肃省| 承德县| 龙里县| 札达县| 那坡县| 油尖旺区| 淮滨县| 成安县| 四平市| 瑞丽市| 西华县| 淮阳县| 尖扎县| 平陆县| 峨山| 南郑县| 石城县| 昭通市| 阜阳市| 宁都县| 永川市| 娄烦县| 鸡泽县| 清河县| 镇江市| 永嘉县| 武川县| 新和县| 东宁县| 淮北市| 福建省| 会昌县| 阳西县|