Fork me on github

Overleaf/ShareLaTeX登陆后安装中文字体

# Ref: https://tug.ctan.org/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf
# Ref: https://linuxvox.com/blog/install-fonts-ubuntu/#using-system-wide-vs-user-specific-fonts

apt update
apt -y upgrade
apt autoremove

wget https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/update-tlmgr-latest.sh
sh update-tlmgr-latest.sh -- --upgrade

tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr update --self --repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr update --all --repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr install scheme-full --repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr update --all --repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr path add

apt update
apt install -y xfonts-utils fonts-noto-cjk fonts-noto-cjk-extra ttf-mscorefonts-installer ttf-wqy-zenhei

mkfontscale
mkfontdir


# Install Fonts: Moving Windows fonts to overleaf folder
mkdir -p /usr/local/share/fonts
cp -R /var/lib/overleaf/WindowsFonts /usr/local/share/fonts
chmod 0644 /var/lib/overleaf/WindowsFonts
chmod -R 0755 /var/lib/overleaf/WindowsFonts/*

fc-cache -fv
fc-list
posted @ 2026-05-21 16:55  fang-d  阅读(15)  评论(0)    收藏  举报