Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143396678
D36623.id110710.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
D36623.id110710.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
@@ -61,21 +61,41 @@
local asciidoctor_file_name="_index.adoc"
fi
- $ASCIIDOCTORPDF_CMD \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- -r ./shared/lib/cross-document-references-macro.rb \
- --doctype="$asciidoctor_type" \
- -a skip-front-matter \
- -a lang="$doc_lang" \
- -a isonline=1 \
- -a env-beastie=1 \
- -a pdf-theme=default-with-fallback-font \
- -o "${cur_dir_output}${doc_name}_${doc_lang}.pdf" \
- "${cur_dir_source}${asciidoctor_file_name}"
+ if [ "$doc_lang" = "zh-tw" ]; then
+ $ASCIIDOCTORPDF_CMD \
+ -r ./shared/lib/man-macro.rb \
+ -r ./shared/lib/git-macro.rb \
+ -r ./shared/lib/packages-macro.rb \
+ -r ./shared/lib/inter-document-references-macro.rb \
+ -r ./shared/lib/sectnumoffset-treeprocessor.rb \
+ -r ./shared/lib/cross-document-references-macro.rb \
+ --doctype="$asciidoctor_type" \
+ -a skip-front-matter \
+ -a lang="$doc_lang" \
+ -a isonline=1 \
+ -a env-beastie=1 \
+ -a pdf-theme=./shared/zh-tw/zh-tw-font/zh-tw-theme.yml \
+ -a pdf-fontsdir=./shared/zh-tw/zh-tw-font \
+ -o "${cur_dir_output}${doc_name}_${doc_lang}.pdf" \
+ "${cur_dir_source}${asciidoctor_file_name}"
+ else
+ $ASCIIDOCTORPDF_CMD \
+ -r ./shared/lib/man-macro.rb \
+ -r ./shared/lib/git-macro.rb \
+ -r ./shared/lib/packages-macro.rb \
+ -r ./shared/lib/inter-document-references-macro.rb \
+ -r ./shared/lib/sectnumoffset-treeprocessor.rb \
+ -r ./shared/lib/cross-document-references-macro.rb \
+ --doctype="$asciidoctor_type" \
+ -a skip-front-matter \
+ -a lang="$doc_lang" \
+ -a isonline=1 \
+ -a env-beastie=1 \
+ -a pdf-theme=default-with-fallback-font \
+ -o "${cur_dir_output}${doc_name}_${doc_lang}.pdf" \
+ "${cur_dir_source}${asciidoctor_file_name}"
+ fi
+
}
diff --git a/shared/zh-tw/zh-tw-font/zh-tw-theme.yml b/shared/zh-tw/zh-tw-font/zh-tw-theme.yml
new file mode 100644
--- /dev/null
+++ b/shared/zh-tw/zh-tw-font/zh-tw-theme.yml
@@ -0,0 +1,17 @@
+extends: default
+font:
+ catalog:
+ merge: true
+ Noto Sans CN: NotoSansCJKsc-VF.ttf
+ Noto Sans Mono CN: NotoSansMonoCJKsc-VF.ttf
+ fallbacks:
+ - Noto Serif
+base:
+ text-align: left
+ font-family: Noto Sans CN
+codespan:
+ font-family: Noto Sans Mono CN
+kbd:
+ font-family: $codespan-font-family
+code:
+ font-family: $codespan-font-family
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 30, 10:39 PM (11 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28104980
Default Alt Text
D36623.id110710.diff (2 KB)
Attached To
Mode
D36623: Fix freebsd-doc zh-tw pdf font(has tofu) problem
Attached
Detach File
Event Timeline
Log In to Comment