How to use different CJK font weight in different elements but not affect the latin characters?

It depends on whether the font of the heading or strong is the same as the main text. Bluss gives the latter case, and here’s the former case.

#set page(width: auto, height: auto, margin: 1em)

#set text(
  lang: "zh",
  font: (
    (name: "Libertinus Serif", covers: "latin-in-cjk"),
    "Noto Serif CJK SC",
  ),
  top-edge: "ascender",
  bottom-edge: "descender",
)

#show strong: set text(font: (
  (name: "Libertinus Serif", covers: "latin-in-cjk"),
  "Noto Sans CJK SC",
))
#show strong: it => {
  show regex("\p{Han}"): set text(weight: 100)
  it
}


= Heading 标题

text正文*强调 strong*

#set strong(delta: 0)
*strong 强调*

Besides, I recommend replace show-func with show-set whenever possible, especially for template authors.
The reason is that show-func rules are hard to override. See Which show rule takes precedence? for explanation.


Maybe you could install SourceHanSans-Regular alone (without other weights)…

1 Like