Skip to content

Instantly share code, notes, and snippets.

@masaha03
Created January 22, 2012 06:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save masaha03/1655867 to your computer and use it in GitHub Desktop.
MacのRGtk2で文字化け
library(RGtk2)
win <- gtkWindowNew(show=FALSE)
win$add(gtkLabelNew("123abcあいうえお"))
win$setSizeRequest(300,300)
win$showAll()
settings <- gtkSettingsGetDefault()
settings$setStringProperty("gtk-font-name", "Hiragino Kaku Gothic Pro 32", NULL)
settings$setStringProperty("gtk-font-name", "Hiragino Mincho Pro 32", NULL)
settings$setStringProperty("gtk-font-name", "IPAGothic 32", NULL)
settings$setStringProperty("gtk-font-name", "IPAMincho 32", NULL)
settings$setStringProperty("gtk-font-name", "IPAexGothic 32", NULL)
settings$setStringProperty("gtk-font-name", "MS Mincho 32", NULL)
settings$setStringProperty("gtk-font-name", "Meiryo 32", NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment