Skip to content

Commit 39eb34f

Browse files
docs: regular minor updates (#101)
1 parent e8cde32 commit 39eb34f

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

main.typ

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,39 @@ $ f(x) = y "(定义8)" $
390390
zh: [这一问题算作 Basic,因为`gb-7714-2015-numeric`样式的引用采用上标。],
391391
)
392392

393+
=== #bbl(
394+
en: [KaiTi and Noto Serif CJK are misaligned in sub/superscripts],
395+
zh: [在上下标中,楷体与思源宋体对不齐],
396+
) <mix-super-metric>
397+
398+
#level.ok
399+
#issue("typst#8090", closed: true)
400+
#pull("typst#8095", merged: true)
401+
// TODO: Link to typst.app/docs when Typst v0.15 is released.
402+
403+
#babel(
404+
en: [KaiTi (aka. 中易楷体, 楷体, simkai) and Noto Serif CJK (思源宋体) are two common fonts. They set incompatible metrics for superscripts and subscripts, resulting in misalignment when used together.],
405+
zh: [KaiTi(又名“中易楷体”、楷体、simkai)和 Noto Serif CJK(思源宋体)是两种常见字体。它们设置的上下标度量信息不兼容,导致混合使用时对不齐。],
406+
)
407+
408+
```example-page
409+
>>> #set par(leading: 1em) // for displaying superscripts
410+
#set text(font: "Noto Serif CJK SC")
411+
#show emph: set text(font: "KaiTi")
412+
413+
>>> Current: \
414+
标#super[字_词_]
415+
416+
>>> Expected: \
417+
>>> #set super(baseline: -0.5em, size: 0.6em)
418+
>>> 标#super[字_词_]
419+
```
420+
421+
#babel(
422+
en: [This affects Chinese particularly, because switching from Song (Serif) to Kai is a common way to express emphasis. However, this issue is still marked as OK. After all, it is straightforward to fix, and superscripts and subscripts rarely use emphasis.],
423+
zh: [中文特别受此影响,因为从宋体切换为楷体是表达强调的常见手段。不过这一问题仍算作 OK,毕竟它很容易修复,而且上下标很少需要强调。],
424+
)
425+
393426
=== #bbl(
394427
en: [Unable to infer the writing script across elements, making `locl` sometimes ineffective],
395428
zh: [无法跨越元素推断文字种类,导致`locl`特性有时失效],

scripts/download_fonts.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ if ! typst fonts --font-path . | rg --quiet '^Source Han Serif SC VF$'; then
2222
curl --location --remote-name https://mirrors.cernet.edu.cn/adobe-fonts/source-han-serif/Variable/OTF/SourceHanSerifSC-VF.otf
2323
fi
2424

25-
# A specific version of SimSun
26-
if ! typst fonts --font-path . | rg --quiet '^SimSun$'; then
25+
# KaiTi and a specific version of SimSun
26+
if ! typst fonts --font-path . | rg --quiet '^KaiTi$' || \
27+
! typst fonts --font-path . | rg --quiet '^SimSun$'; then
2728
curl --location --remote-name https://github.com/typst-doc-cn/guide/releases/download/files/fonts.7z
2829
7z x fonts.7z -ofonts
2930
rm fonts.7z

0 commit comments

Comments
 (0)