ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 15日 (土) 05:25:35 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-fichoo-fontbtt ------------------------- @@ -94,3 +94,13 @@ :Gtk::Widget#modify_font(font_desc) Sets the font to use for a widget to "font_desc" (the Pango::FontDescription to use). All other style values are left untouched. See also Gtk::Widget#modify_style. + +Let's look at a short code snippet: + + # font = Pango::FontDescription.new("Monospace Bold 10") + # font = Pango::FontDescription.new("Times, Italic 20") + # font = Pango::FontDescription.new("Comic Sans MS, Bold Italic 20") + + font = Pango::FontDescription.new("Nimbus Mono L, Bold Italic, 12") + + textview.modify_font(font)