有些字体的夹注符号并不贴边,可能导致调整空间不同
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 809
- Forks
- 66
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
[!NOTE]
This issue is forwarded from https://github.com/typst/typst/issues/8390#issuecomment-4585935142 (in English) by https://github.com/yangtze314.
问题
关于《》()【】「」『』等夹注符号的调整空间,目前 CLReq 的插图、正文都认为夹注符号不靠被夹注内容的那一侧可以挤压到半个字,而另一侧不可挤压。
这种规则似乎要求夹注符号贴边,即要求字体提供的字形紧贴汉字正方形框的左边或右边。比如下图的「,其短横基本上贴到所在正方形框的右边界了。
然而如下图,只有思源宋体、朱雀仿宋的夹注符号贴边贴得比较紧,其它很多字体的夹注符号都更靠中间。
生成上图的源代码
第一份文档由 https://github.com/yangtze314 导出,第二份由我导出。
#set page(paper: "a5")
#show heading: set block(above: 2em, below: 1em)
== Differences between fonts
#let emsq = (body) => highlight(fill: silver, sym.zws + body + sym.zws)
#let sample = [
#emsq[「] #emsq[」] #emsq[(] #emsq[)] #emsq[【] #emsq[】]
]
#text(font: "Noto Serif TC")[Noto Serif TC 思源宋體: #sample]
#text(font: "PMingLiU")[PMingLiu 新細明體: #sample]
#text(font: "TW-Kai")[TW-Kai 全字庫正楷體: #sample]
#text(font: "jf open 粉圓 2.1")[jf open 粉圓: #sample]
// Typst v0.14.2
#set text(
lang: "zh",
fallback: false,
top-edge: "ascender",
bottom-edge: "descender",
)
#set page(height: auto, width: auto, margin: 15pt)
#let emsq = body => highlight(fill: silver, sym.zws + body + sym.zws)
#let sample = [
#emsq[「] #emsq[」] #emsq[(] #emsq[)] #emsq[【] #emsq[】]
]
#set align(right)
#text(font: "KaiTi")[KaiTi 中易楷体: #sample]
#text(font: "SimHei")[SimHei 中易黑体: #sample]
#text(font: "FZNewShuSong-Z10")[FZNewShuSong-Z10 方正新书宋: #sample]
#text(font: "Zhuque Fangsong (technical preview)")[Zhuque Fangsong (technical preview) 朱雀仿宋: #sample]
对于不贴边的字体,如果仍采用「只挤一边,最多挤半个字」,那么夹注符号到被夹注内容的距离可能大于它到夹注符号外的距离,不合逻辑。极端时,相邻夹注符号还会撞到一起,更不合适。
生成上图的源代码
// Typst v0.14.2
#set page(height: auto, width: auto, margin: 15pt)
#set text(lang: "zh", font: "KaiTi", fallback: false)
国国#h(-0.5em)《国》#h(-0.5em)国国
《风》#h(-1em)《雅》#h(-1em)《颂》
// #block(width: 6em, stroke: (x: green))[
// #set par(justify: true)
// 国国《国》国国
// 《风》《雅》《颂》
// ]
目前 MS Word 可能也存在这一问题,用文本框能触发。(不过 MS Word 有玄学:把文本框改成右对齐再撤销,会断成两行。)
CLReq 可能的修改方式
提示有些字体的夹注符号并不贴边,这时排版软件不能真挤到半个字,有可能还需要双侧不对称挤压。
提示字体设计者尽量让夹注符号贴边。
如果OpenType有相关字段(本人不太了解……),也可提示排版软件、字体设计者使用。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CLReq sections on punctuation adjustment space and inter-character spacing reduction, then compare them with the supplied Typst font examples. Review the issue comments and the referenced OpenType possibility. Done means the specification’s treatment of non-edge-aligned brackets and any guidance for fonts or layout software is agreed and documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, internationalization
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100