cjk-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font shape substitute for boldface


From: Liang-Ting Chen
Subject: Re: Font shape substitute for boldface
Date: Mon, 21 Oct 2024 18:02:12 +0800


Hi Werner, 

Thanks for your reply! 

> However, nothing prevents you from adding `\DeclareFontShape` commands to the preamble of your document; this should solve your problem locally.

When I moved `\DeclareFontShape` commands to the preamble from .fd, LaTeX emits the following error:

> ! LaTeX Error: Font family `C70+bkai' unknown.

Maybe I am missing something, but I don't see why it fails to find it.

My current solution is to add a hook after `\begin{CJK}` to change the `\bfdefault` to `bx`. 

> Today, people should rather use LuaTeX or XeTeX for typesetting CJK documents, which both come with much better font (and font feature) support.

I agree that XeTeX should be used to typeset CJK documents. 

However, my document only has a few CJK characters (and it is perhaps common to typeset a technical document in English for a native-CJK reader). 
XeTeX is still about two times slower than pdflatex, and in particular, compiling my document often exceeds the time limit on Overleaf with XeTeX. (This is why I changed the engine from XeTeX to pdflatex.) 
The package `microtype` also works better with pdflatex than XeTeX. 
Overall, I think the `CJK` package is still very handy in some cases. 

Cheers,
Liang-Ting

On Mon, 21 Oct 2024 at 14:39, Werner LEMBERG <wl@gnu.org> wrote:

Hello Liang-Ting,


sorry for the late reply.

> The CJK package assumes the default value `bx` will be used and does
> not provide an explicit substitute, so using CJK in conjunction with
> other fonts that change the default breaks `\textbf{...}` in CJK.
>
> Now I wonder if adding substitutes explicitly by
>
>> \DeclareFontShape{C70}{bkai}{b}{n}{<-> ssub * bkai/bx/n}{\CJKbold}
>
> to c70bkai.fd and other .fd files is a proper solution.

I'm not sure.  The decision whether to classify a font as 'b' or 'bx'
is highly subjective, and some 'b' fonts look bolder than 'bx' series
of other fonts...

However, nothing prevents you from adding `\DeclareFontShape` commands
to the preamble of your document; this should solve your problem
locally.

> And, is the CJK package still accepting any new contributions?

Not really, except necessary bug fixes (due to changes to the LaTeX
kernel, for example).  Today, people should rather use LuaTeX or XeTeX
for typesetting CJK documents, which both come with much better font
(and font feature) support.


    Werner


--
Dr Liang-Ting Chen
Institute of Information Science
Academia Sinica, Taiwan

https://l-tchen.github.io

reply via email to

[Prev in Thread] Current Thread [Next in Thread]