Skip to content

Commit

Permalink
IDE Module Error Fix
Browse files Browse the repository at this point in the history
When loading a font, and that  font wasn't found, we were tossing an IDE Module Error at the users.  This corrects that glitch and even pops up a notification letting them know that the font wasn't found, before reverting back to the old font handle.
  • Loading branch information
SteveMcNeill committed Dec 8, 2023
1 parent 2e5b2cd commit 79d4811
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/ide/ide_methods.bas
Original file line number Diff line number Diff line change
Expand Up @@ -16268,8 +16268,9 @@ FUNCTION idedisplaybox
IF o(7).sel = 1 AND x = 1 THEN
oldhandle = idecustomfonthandle
idecustomfonthandle = _LOADFONT(v$, v%, "MONOSPACE")
IF idecustomfonthandle = -1 THEN
IF idecustomfonthandle < 1 THEN
'failed! - revert to default settings
_MessageBox "Font not found!", "ERROR: Font not found, or is invalid format, at specified location. Reverting back to existing font.", "error"
o(7).sel = 0: idetxt(o(8).txt) = "C:\Windows\Fonts\lucon.ttf": idetxt(o(9).txt) = "21": IF IDE_UseFont8 THEN _FONT 8 ELSE _FONT 16
ELSE
_FONT idecustomfonthandle
Expand Down

0 comments on commit 79d4811

Please sign in to comment.