In Ruby when 开发者_开发技巧trying to specify a font I get an error "FXDCWindow::setFont: illegal or NULL font specified.". I tried doing it like this:
@font = FXFont.new(app, 'times')
I need to set a font in order to use drawText in my program and I can't figure out how to. Oh and for the record I'm justt a beginner. Thanks!
According to the documentation, you need to specify the size at least. Try:
@font = FXFont.new(app, "times,12")
Make sure you're not trying to use the font object before it has been created; see http://www.fox-toolkit.org/faq.html#ILLEGALICON.
精彩评论