Created
February 23, 2013 23:46
-
-
Save tksmaru/5021890 to your computer and use it in GitHub Desktop.
カードの印刷で日本語が化けるので、代替としてMiguフォントを使用するようにした。
また、ttfフォルダに当該フォントファイルを置けば、ひとまずbacklogsのカードを印刷しても文字化けしない。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fontdir = File.dirname(__FILE__) + '/ttf' | |
@pdf.font_families.update( | |
"DejaVuSans" => { | |
:bold => "#{fontdir}/migu-1p-bold.ttf", | |
:italic => "#{fontdir}/migu-1p-regular.ttf", | |
:bold_italic => "#{fontdir}/migu-1p-bold.ttf", | |
:normal => "#{fontdir}/migu-1p-regular.ttf"" | |
} | |
) | |
@pdf.font "DejaVuSans" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment