神剑山庄资源网 Design By www.hcban.com

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"
      />
标签:
FreeBSD,GraphicsMagick,中文字体

神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网 免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com

评论“FreeBSD下如何使GraphicsMagick支持中文字体?”

暂无FreeBSD下如何使GraphicsMagick支持中文字体?的评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。