Rでggplot2を使用してxkcdフォントを動作させようとしています。しかし、私はいくつかの問題に直面しています。これが私がこれまでに行ったことです。1) ディレクトリ ~/.fonts の xkcd サイトから "Humor Sans" フォントをインストールしました。2) "extrafont" パッケージをインストールしました。このインストールはスムーズに機能しました。3) ライブラリをロードする
library(extrafont)
ただし、フォントをインポートしようとすると、次のエラーが発生します。
> font_import(pattern="Humor Sans")
Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
Continue? [y/n] y
Scanning ttf files in /usr/share/fonts/, ~/.fonts/ ...
Extracting .afm files from .ttf files...
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1
私が間違っている可能性があること、または他に何をすべきかについての提案はありますか? よろしくお願いします
編集:ubuntu 12.04の実行