Using external TTF fonts to generate PDF with Japanese text using prawn

Viewed 2840

Prawn has a limited number of fonts under Prawn::BASEDIR}/data/fonts/

I have tried gkai00mp.ttf, but generated PDF shows only the 1st letter "千" of 千葉, for example.

I feel like this font is good for Chinese characters.

font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf") do
  text "千葉"
end

Is it possible to upload and use external fonts? If yes, where that fonts can be obtained from?

My environment: Latest Ruby and Rails. Prawn version 0.12.0

2 Answers
Related