Page MenuHomeFreeBSD

D37447.id114549.diff
No OneTemporary

D37447.id114549.diff

diff --git a/documentation/tools/asciidoctor.sh b/documentation/tools/asciidoctor.sh
--- a/documentation/tools/asciidoctor.sh
+++ b/documentation/tools/asciidoctor.sh
@@ -68,14 +68,22 @@
local asciidoctor_file_name="_index.adoc"
fi
- local theme_font=""
+ local theme_font="-a pdf-theme=default-with-fallback-font"
- if [ "$doc_lang" = "zh-tw" ]; then
- theme_font="-a pdf-theme=./shared/zh-tw/zh-tw-theme.yml -a pdf-fontsdir=/usr/local/share/fonts/noto/"
- else
- theme_font="-a pdf-theme=default-with-fallback-font"
+ if [ "$doc_lang" = "zh-tw" ] && [ -f "/usr/ports/distfiles/Noto/CJK/2.004/NotoSansTC-Medium.otf" ]; then
+ theme_font="-a pdf-theme=./shared/zh-tw/zh-tw-theme.yml -a pdf-fontsdir=/usr/ports/distfiles/Noto/CJK/2.004/"
+ elif [ "$doc_lang" = "zh-tw" ] && [ ! -f "/usr/ports/distfiles/Noto/CJK/2.004/NotoSansTC-Medium.otf" ]; then
+ echo "Lack of zh-tw fonts."
fi
+ if [ "$doc_lang" = "zh-cn" ] && [ -f "/usr/ports/distfiles/Noto/CJK/2.004/NotoSansSC-Medium.otf" ]; then
+ theme_font="-a pdf-theme=./shared/zh-cn/zh-cn-theme.yml -a pdf-fontsdir=/usr/ports/distfiles/Noto/CJK/2.004/"
+ elif [ "$doc_lang" = "zh-cn" ] && [ ! -f "/usr/ports/distfiles/Noto/CJK/2.004/NotoSansSC-Medium.otf" ]; then
+ echo "Lack of zh-cn fonts."
+ fi
+
+
+
$ASCIIDOCTORPDF_CMD \
-r ./shared/lib/man-macro.rb \
-r ./shared/lib/git-macro.rb \
diff --git a/shared/zh-tw/zh-tw-theme.yml b/shared/zh-cn/zh-cn-theme.yml
copy from shared/zh-tw/zh-tw-theme.yml
copy to shared/zh-cn/zh-cn-theme.yml
--- a/shared/zh-tw/zh-tw-theme.yml
+++ b/shared/zh-cn/zh-cn-theme.yml
@@ -2,15 +2,14 @@
font:
catalog:
merge: true
- Noto Sans TC: NotoSansCJKtc-Regular.otf
- Noto Sans Mono TC: NotoSansMonoCJKtc-Regular.otf
+ Noto Sans SC: NotoSansSC-Medium.otf
fallbacks:
- Noto Serif
base:
text-align: left
- font-family: Noto Sans TC
+ font-family: Noto Sans SC
codespan:
- font-family: Noto Sans Mono TC
+ font-family: Noto Sans SC
kbd:
font-family: $codespan-font-family
code:
diff --git a/shared/zh-tw/zh-tw-theme.yml b/shared/zh-tw/zh-tw-theme.yml
--- a/shared/zh-tw/zh-tw-theme.yml
+++ b/shared/zh-tw/zh-tw-theme.yml
@@ -2,15 +2,14 @@
font:
catalog:
merge: true
- Noto Sans TC: NotoSansCJKtc-Regular.otf
- Noto Sans Mono TC: NotoSansMonoCJKtc-Regular.otf
+ Noto Sans TC: NotoSansTC-Medium.otf
fallbacks:
- Noto Serif
base:
text-align: left
font-family: Noto Sans TC
codespan:
- font-family: Noto Sans Mono TC
+ font-family: Noto Sans TC
kbd:
font-family: $codespan-font-family
code:

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 12:11 PM (7 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28576941
Default Alt Text
D37447.id114549.diff (2 KB)

Event Timeline