Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109876928
D36623.id111965.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36623.id111965.diff
View Options
Index: documentation/tools/asciidoctor.sh
===================================================================
--- documentation/tools/asciidoctor.sh
+++ documentation/tools/asciidoctor.sh
@@ -61,6 +61,13 @@
local asciidoctor_file_name="_index.adoc"
fi
+ local theme_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 "
+ fi
+
$ASCIIDOCTORPDF_CMD \
-r ./shared/lib/man-macro.rb \
-r ./shared/lib/git-macro.rb \
@@ -73,9 +80,10 @@
-a lang="$doc_lang" \
-a isonline=1 \
-a env-beastie=1 \
- -a pdf-theme=default-with-fallback-font \
+ $theme_font \
-o "${cur_dir_output}${doc_name}_${doc_lang}.pdf" \
- "${cur_dir_source}${asciidoctor_file_name}"
+ "${cur_dir_source}${asciidoctor_file_name}"
+
}
Index: shared/zh-tw/zh-tw-theme.yml
===================================================================
--- /dev/null
+++ shared/zh-tw/zh-tw-theme.yml
@@ -0,0 +1,17 @@
+extends: default
+font:
+ catalog:
+ merge: true
+ Noto Sans TC: NotoSansCJKtc-Regular.otf
+ Noto Sans Mono TC: NotoSansMonoCJKtc-Regular.otf
+ fallbacks:
+ - Noto Serif
+base:
+ text-align: left
+ font-family: Noto Sans TC
+codespan:
+ font-family: Noto Sans Mono TC
+kbd:
+ font-family: $codespan-font-family
+code:
+ font-family: $codespan-font-family
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 4:01 PM (11 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16597639
Default Alt Text
D36623.id111965.diff (1 KB)
Attached To
Mode
D36623: Fix freebsd-doc zh-tw pdf font(has tofu) problem
Attached
Detach File
Event Timeline
Log In to Comment