0

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!

Chuck
  • 234,037
  • 30
  • 302
  • 389
Adam Ashwal
  • 1,472
  • 1
  • 19
  • 36

2 Answers2

1

According to the documentation, you need to specify the size at least. Try:

@font = FXFont.new(app, "times,12")
Mark Thomas
  • 37,131
  • 11
  • 74
  • 101
0

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.