Windows 7 Premium, SP1.
Try the updated version. It loads the font specifically for the current program only, meaning that when the program ends, then font is unloaded automatically (which was a problem for that original code of mine you are using).
print "Standard font"
if FontLoaded("Adventurer Light SF") = 0 then LoadFont("advlit.ttf")
set text font "Adventurer Light SF"
set text size 30
print "Loaded font"
wait key
end
function LoadFont(FontFile as string)
load dll "gdi32.dll", 1
result = call dll(1, "AddFontResourceExA", FontFile, 0x10, 0)
delete dll 1
endfunction result
function UnloadFont(FontFile as string)
load dll "gdi32.dll", 1
call dll 1, "RemoveFontResourceExA", FontFile, 0x10, 0
delete dll 1
endfunction
function FontLoaded(FontName as string)
local i as integer
FontName = upper$(FontName)
perform checklist for fonts
for i = 1 to checklist quantity()
if upper$( checklist string$(i) ) = FontName then exitfunction 1
next i
endfunction 0