Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install tytanic
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: tytanic@0.2.2
tool: tytanic@0.3.1
- name: Install Fandol fonts
run: |
FONT_DIR=~/.local/share/fonts/opentype/fandol
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install tytanic
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: tytanic@0.2.2
tool: tytanic@0.3.1
- name: Install Fandol fonts
run: |
$FONT_DIR = "C:\\Windows\\Fonts"
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Install tytanic
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: tytanic@0.2.2
tool: tytanic@0.3.1
- name: Install Fandol fonts
run: |
FONT_DIR=~/Library/Fonts/Fandol
Expand Down
4 changes: 3 additions & 1 deletion src/ctyp.typ
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@

/// [Font Settings] Begin
/// This region apply fonts to default text, emph, and strong.
let font-select = ("text", "emph", "strong", "raw", "heading").map(k => (k, _font-latin-cover(k))).to-dict()
let font-select = ("text", "emph", "strong", "raw", "heading", "title").map(k => (k, _font-latin-cover(k))).to-dict()
set text(font: font-select.text.font)
show: if fix-smartquote { (body) => {
show smartquote: set text(font: font-select.text.font.at(0).name)
Expand All @@ -222,6 +222,8 @@
show raw: _apply-font-to-cjk.with(..font-select.raw)
show heading: set text(font: font-select.heading.font)
show heading: _apply-font-to-cjk.with(..font-select.heading)
show title: set text(font: font-select.title.font)
show title: _apply-font-to-cjk.with(..font-select.title)
/// [Font Settings] End

set par(justify: true)
Expand Down
1 change: 1 addition & 0 deletions src/fonts/fandol.typ
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
emph: (cjk: "kai", latin: "serif"),
raw: (cjk: "fang", latin: "mono"),
heading: (cjk: "song:bold", latin: "serif"),
title: (cjk: "song:bold", latin: "serif"),
)
)
Binary file modified tests/core/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/core/ref/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/core/ref/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/core/ref/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/core/ref/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions tests/core/test.typ
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
body
}

#testcase[
#let (theme, (song, hei, kai, fang)) = ctyp()
#show: theme

= 元素字体映射

#title[临江仙]

= 标题

滚滚长江东逝水,*浪花淘尽英雄。*
_是非成败转头空。_`青山依旧在,几度夕阳红`。
]

#testcase[
#let (theme, (song, hei, kai, fang)) = ctyp()
#show: theme
Expand Down
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = [
"text",
"languages",
]
compiler = "0.13.1"
compiler = "0.14.1"
exclude = ["*.pdf", "thumbnail.png", ".gitignore", "doc", "tests"]

[tool]