Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

CentOS 安裝 Windows 字體 (微軟雅黑、Consolas、黑體) 讓桌面與終端機更好看

編輯:系統常見問題解答

CentOS 最小桌面安裝後預設字體粗糙,將 Windows 常用字體 (Consolas、微軟雅黑、黑體、新細明體) 複製進系統字體目錄並重建快取,即可在 GNOME/KDE、終端機、編輯器中使用。

操作步驟

  1. 建立字體目錄:
    mkdir -p /usr/share/fonts/msfonts
  2. 複製字體檔 (從 Windows C:\Windows\Fonts 複製):
    cp consola*.ttf msyh*.ttf simhei.ttf simsunb.ttf /usr/share/fonts/msfonts/
  3. 修改字體配置 (可選,通常 /etc/fonts/fonts.conf 已包含 /usr/share/fonts 遞迴):
    vi /etc/fonts/fonts.conf
    確認含 <dir>/usr/share/fonts/msfonts</dir> (若無則在 <dir>/usr/share/fonts</dir> 後新增)。
  4. 重建字體快取:
    fc-cache -fv
  5. 套用至桌面環境:
    系統 → 偏好設定 → 外觀 → 字體 頁籤:
    應用程式字體:黑體 Normal 10pt
    文件字體:Consolas 10pt
    桌面字體:黑體 Normal 10pt
    視窗標題字體:黑體 Bold 10pt
    等寬字體:Consolas 10pt

字體授權提醒

Windows 字體授權僅允許在已授權 Windows 系統上使用。若在 Linux 使用,請確認擁有合法 Windows 授權,或改用開源替代字體:

  • Consolas 替代:DejaVu Sans Mono、Fira Code、JetBrains Mono (支援連字)
  • 微軟雅黑 替代:文泉驛微米黑 (wqy-zenhei)、思源黑體 (Source Han Sans)
  • 黑體/新細明體 替代:文泉驛正黑、Noto Sans CJK

一鍵安裝開源中文字體 (CentOS/RHEL)

yum install -y wqy-zenhei-fonts wqy-microhei-fonts google-noto-sans-cjk-fonts

安裝後同樣執行 fc-cache -fv 即可使用,完全合法免授權疑慮。

Copyright © Windows教程網 All Rights Reserved