Skip to content

Instantly share code, notes, and snippets.

@hidaruma
Created September 24, 2019 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hidaruma/2bd78a05da1ac430a7e5878511412914 to your computer and use it in GitHub Desktop.
Save hidaruma/2bd78a05da1ac430a7e5878511412914 to your computer and use it in GitHub Desktop.
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dEmbedAllFonts=true -sOutputFile=$YOUR_OUTPUT_FILE.pdf -f $YOUR_INPUT_FILE.pdf
# ghostscriptの少なくともUbuntuでは、日本語フォント埋め込みを指定された際に該当のフォントが無いと次にfonts-japanese-(mincho|gothic)-ttfを探し、
# 最終的にDroidSansにフォールバックするのが現行の動作らしい。で、fonts-japanese-***-ttfはaptでtakaoなどを入れたときに設定される。
# 自力でフォント指定できてもいいはずだが、単なるリンクなのかよく分からん。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment