ctex-kit icon indicating copy to clipboard operation
ctex-kit copied to clipboard

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

Open irenier opened this issue 4 years ago • 4 comments

在 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

irenier avatar Aug 03 '21 14:08 irenier

好像只用 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,不复现。

muzimuzhi avatar Aug 04 '21 04:08 muzimuzhi

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

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

stone-zeng avatar Aug 04 '21 12:08 stone-zeng

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

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

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

image

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

test

irenier avatar Aug 04 '21 13:08 irenier

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

stone-zeng avatar Aug 04 '21 13:08 stone-zeng