How to set an exact line height no matter which font is used in the line?

I am a multilingual user, English and Chinese at the same time. Currently I need four different fonts and I set them up like this:

//default fonts & text settings
#let ENsans = "Helvetica Neue"
#let ENserif = "Charter"
#let Hei = "Heiti SC"
#let Song = "Songti SC"

//font Groups
#let sans = (ENsans, Hei)
#let serif = (ENserif, Song)
#set text(
  font: serif,
  size: 12pt,
  weight: "regular",
)

The problem is that in cases where I need two fonts in a line (Charter for English & Songti for Chinese), the default line height is the determined by the highest font in the line, which make the paragraphy line distributed unevenly. An example of the problem can be seen in the picture below.

The lines with English words like “LaTeX”, “Markdown” are noticably higher, even when they are in the same paragraph.

I have tried #set par(leading: 0.65em), but this only affects the spacing between lines instead of the exact height of the line. How can I force the height of lines to be the same? And if it is not possible, 使用中文的同志们有没有样式比较正常的同时支持中英文的字体推荐呢?

You need set text(top-edge: 1em) or something similar. The default is cap-height, which is font-dependent.

1 Like

Great Thanks! This does solve the problem!! The lines are now distributing evenly!

However another problem occurring is that, the baseline of English words are a little bit too high up, compare to that of Chinese characters, can I adjust another parameter to make the baseline higher?

I also did this experiment:

rect(fill: aqua)[
  然后我又尝试用 LaTeX 来写实
]

As you can see,
image
the baseline is a bit low in the line.

There is a baseline parameter, but I’ve never used it.