Windows SDK 1.12.3
I've got a global font, which loads and draws fine. But when I try to call getTextWidth on it I'm getting a nil. So I put some nil checks in the loading code and I'm just flummoxed here.
Here's my loading code:
print("loading font.") font_mpl = font.new("mpl-14.fnt") if font_mpl == nil then print("font is nil") end gfx.setFont(font_mpl) if font_mpl == nil then print("font is nil") end
this prints out "loading font." and then "font is nil" twice, but the font still runs and draws properly.
What is happening here?