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