Skip to content

Instantly share code, notes, and snippets.

@tetlabo
Created April 26, 2021 06:22
Show Gist options
  • Save tetlabo/c91a3409c91b94400a0eb2ec55457c49 to your computer and use it in GitHub Desktop.
Save tetlabo/c91a3409c91b94400a0eb2ec55457c49 to your computer and use it in GitHub Desktop.
shinyapps.ioでIPAexフォントを使ってグラフの日本語表示をするためのスクリプト
#!/bin/bash
### shinyapps.ioでグラフの日本語表示をするためのスクリプト
### Author: Kenta Tanaka (https://mana.bi/)
### 以下の記事を参考 (ほぼ丸パクり) にしました
### https://ziomatrix18.blog.fc2.com/blog-entry-853.html
###
### 使い方
### Shinyアプリ内で以下のように実行してください
### download.file("https://raw.githubusercontent.com/ltl-manabi/shinyapps.io_japanese_font/master/use_ipaex_font.sh", destfile = "use_ipaex_font.sh")
### system("bash ./use_ipaex_font.sh")
mkdir ~/tmp
cd ~/tmp
curl -O -L https://moji.or.jp/wp-content/ipafont/IPAexfont/IPAexfont00401.zip
unzip IPAexfont00401.zip
mkdir -p ~/.fonts/ipa
cp ./IPAexfont00401/*.ttf ~/.fonts/ipa
fc-cache -f ~/.fonts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment