Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.