CTeX-org / ctex-kit

Macro Packages and Scripts for Chinese TeX users
968 stars 124 forks source link

xeCJK:思源宋体在已有粗体的情况下依然使用伪粗体 #585

Open irenier opened 3 years ago

irenier commented 3 years ago

在 TeX Live 2021 下,使用 XeLaTeX 编译下面的代码:

\documentclass{article}
\usepackage[AutoFakeBold=true]{xeCJK}
\usepackage[fontset=ubuntu]{ctex}
\usepackage{zhlipsum}
\begin{document}
    \songti
    测试
    \bfseries
    测试
\end{document}

结果如下:

test

但事实上,若注释 AutoFakeBold=true 所在的行,得到的结果如下:

test

muzimuzhi commented 3 years ago

好像只用 fontspec + xelatex / lualatex 就能复现,

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\noautofake{Latin Modern Roman} % Noto Serif CJK SC
\newfontfamily\autofake{Latin Modern Roman}[AutoFakeBold=10]

\begin{document}
\Huge
{\noautofake test \bfseries test}\par
{\autofake test \bfseries test}\par

\end{document}

image

使用 overleaf 上的 2018 及更早的 texlive + lualatex,不复现。

stone-zeng commented 3 years ago

AutoFakeBold 选项本身的意义就是将 bfseries 设置为伪粗体吧?

https://github.com/wspr/fontspec/blob/cf335f4cdaa07e3d6a37b4abd4525b634edba29c/fontspec-code-keyval.dtx#L841-L862

irenier commented 3 years ago

AutoFakeBold 选项本身的意义就是将 bfseries 设置为伪粗体吧?

https://github.com/wspr/fontspec/blob/cf335f4cdaa07e3d6a37b4abd4525b634edba29c/fontspec-code-keyval.dtx#L841-L862

但是 xeCJK 的文档是这么写的:

image

此外,若使用 founder 字库,将使用方正小标宋而不是伪粗体:

test

stone-zeng commented 3 years ago

应该是因为 ubuntu 字库下面并没有手动指定 BoldFont(但我也忘了当时为什么没写🤣)