Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144448096
D37447.id114549.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D37447.id114549.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37447: freebsd-doc zh-tw font problem in pdf
Attached
Detach File
Event Timeline
Log In to Comment