netnr / libgdiplus-mkfontscale
2018-10-20 09:56
Linux安装字体,asp.net core 验证码
# 安装字体
yum -y install fontconfig
cd /usr/share/fonts
# 创建新的字体文件夹
mkdir cfont
# 修改cfont目录的权限使root用户以外的用户也可以使用
chmod -R 755 /usr/share/fonts/cfont
# 拷贝字体到cfont文件夹
yum install mkfontscale
mkfontscale && mkfontdir
# 刷新内存中的字体缓存
fc-cache –fv
# 字体生效
source /etc/profile
# 查看
fc-list

# help
https://blog.csdn.net/chen_jl168/article/details/79288584


# 生成验证码,安装依赖

# Ubuntu 16.04 and above:
apt-get install libgdiplus
cd /usr/lib && ln -s libgdiplus.so gdiplus.dll

# Fedora 23 and above:
dnf install libgdiplus
cd /usr/lib64/ && ln -s libgdiplus.so.0 gdiplus.dll

# CentOS 8
dnf install libgdiplus glibc glibc-devel

# CentOS 7 and above:
yum install autoconf automake libtool
yum install freetype-devel fontconfig libXft-devel
yum install libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel
yum install glib2-devel cairo-devel
git clone https://github.com/mono/libgdiplus
cd libgdiplus && ./autogen.sh
make -j && make install -j
cd /usr/lib64/ && ln -s /usr/local/lib/libgdiplus.so gdiplus.dll

# help
https://github.com/zkweb-framework/zkweb.system.drawing
ˆ