gentoo中文字体设置

本文档介绍了在Gentoo Linux系统中如何设置字体和配置fcitx输入法。首先,通过指定的wiki链接和工具安装与更新字体,然后详细说明了fcitx的安装过程,包括创建启动脚本、设置locale,并提供了启用Wubi或ErBi输入法的额外步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、字体设置
参考gentoo wiki上关于字体的文章
http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts#Useful_topics

参考中文gentoo wiki的HOWTO上关于字体的文章
http://zh.gentoo-wiki.com/Index:HOWTO#.E5.AD.97.E4.BD.93

参考字体配置工具fontconfig的用户手册
http://fontconfig.org/fontconfig-user.html

字体的存放目录
/usr/share/fonts

fontconfig配置文件
/etc/fonts/fonts.conf (system wide)
~/.fonts.conf

可能要用到的字体工具
emerge mkfontdir mkfontscale

下载好看的英文字体:
emerge ttf-bitstream-vera corefonts

下载好看的中文字体:
emerge media-fonts/wqy-bitmapfont

在xorg.conf中Section "Files"中加入新增的字体目录

使用fc-cache更新系统字体

使用xlsfonts检查字体是否已经存在


二、fcitx输入法
emerge fcitx

touch /etc/X11/xinit/xinitrc.d/100-xinputrc
chmod +x /etc/X11/xinit/xinitrc.d/100-xinputrc

100-xinputrc文件内容
cat /etc/X11/xinit/xinitrc.d/100-xinputrc
# !/bin/bash
# This script set the "XIM" and some other environment variable,
# then starts fcitx automatically when loading X

XIM="fcitx"
XIM_PROGRAM="fcitx"
XIM_ARGS="-d"
XMODIFIERS="@im=fcitx"
GTK_IM_MODULE="fcitx"

export XIM XIM_PROGRAM XMODIFIERS GTK_IM_MODULE

# start xim server
$XIM_PROGRAM $XIM_ARGS &

修改系统locale
LC_CTYPE="zh_CN"

 * You should export the following variables to use fcitx
 *  export XMODIFIERS="@im=fcitx"
 *  export XIM=fcitx
 *  export XIM_PROGRAM=fcitx
 *
 * If you want to use WuBi or ErBi
 *  cp /usr/share/fcitx/data/wbx.mb ~/.fcitx
 *  cp /usr/share/fcitx/data/erbi.mb ~/.fcitx
 *  cp /usr/share/fcitx/data/tables.conf ~/.fcitx
 *
 * Note that fcitx only works in the zh_CN locale.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值