Skip to content

Commit

Permalink
Ubuntu 下 fontconfig 路径问题
Browse files Browse the repository at this point in the history
  • Loading branch information
OsbertWang committed Aug 11, 2023
1 parent a78b830 commit 19d9917
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions appendix/updateinfo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

\chapter{版本信息}

\section*{v2023.9.1}

\begin{itemize}
\item Ubuntu 下 fontconfig 路径问题
\end{itemize}

\section*{v2023.7.1}

\begin{itemize}
Expand Down
2 changes: 1 addition & 1 deletion chapter/preface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ \chapter*{前言}

本文所涉及到的代码需结合上下文说明, 不能简单地复制粘贴. 红色文字都是可点的超链接, 可直接跳转.
\menu{菜单} 表示软件菜单. \keys{k} 表示键盘按键.
建议用户阅读 \href{https://www.tug.org/texlive/doc/texlive-zh-cn/texlive-zh-cn.pdf}{texlive-zh-cn}
建议用户阅读 \href{https://www.tug.org/texlive/doc/texlive-en/texlive-en.pdf}{texlive-en}
\href{http://mirrors.ctan.org/info/lshort/chinese/lshort-zh-cn.pdf}{lshort-zh-cn}
以更全面地了解基础内容.

Expand Down
10 changes: 7 additions & 3 deletions chapter/ubuntu.tex
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ \section{安装 \TeX{} Live}
\end{lstlisting}
刷新字体缓存.
这样一来, \TeX{} Live 中的字体才能够被正确调用.
更多内容请参考 \href{https://www.tug.org/texlive/doc/texlive-zh-cn/texlive-zh-cn.pdf}{texlive-zh-cn}.
更多内容请参考 \href{https://www.tug.org/texlive/doc/texlive-en/texlive-en.pdf}{texlive-en}.

如果用户更改了安装路径,
要注意将
Expand Down Expand Up @@ -194,9 +194,13 @@ \subsection{在用户文件夹安装}\label{subsec:ubuntu-user-folder}
export MANPATH=~/texlive/2023/texmf-dist/doc/man:$MANPATH
export INFOPATH=~/texlive/2023/texmf-dist/doc/info:$INFOPATH
\end{lstlisting}
有关字体的处理变为
有关字体的处理变为\footnote{这里并未使用 \href{https://www.tug.org/texlive/doc/texlive-en/texlive-en.pdf}{texlive-en} 中建议的路径 \texttt{\~/.fonts.conf.d/},
因为根据 \href{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{freedesktop} 的说法,
该路径已废弃,
故此处采用新的路径,
\texttt{\$XDG\_CONFIG\_HOME/fontconfig/conf.d}}
\begin{lstlisting}[language=bash]
cp ~/texlive/2023/texmf-var/fonts/conf/texlive-fontconfig.conf ~/.fonts.conf/09-texlive.conf
cp ~/texlive/2023/texmf-var/fonts/conf/texlive-fontconfig.conf $XDG_CONFIG_HOME/fontconfig/conf.d/09-texlive.conf
\end{lstlisting}
然后执行
\begin{lstlisting}[language=bash]
Expand Down

0 comments on commit 19d9917

Please sign in to comment.