Cls
Declare fontList$'mit einer globalen Variable müssen wir die Liste nur einmal generieren
Proc FontExists
Parameters font$
If (fontList$ = "")'gibts schon eine Liste?
ClearList
AddFonts
fontList$ = "##" + lower$(MoveListToStr$("##")) + "##"
Endif
Return (InStr("##" + lower$(font$ )+ "##", fontList$) > 0)'nur genaue Treffer, welche von Trennzeichen eingeschlossen sind
EndProc
Print "Arial Black: " + if(FontExists("Arial Black"), "existiert", "fehlt")
Print "Consolas: " + if(FontExists("Consolas"), "existiert", "fehlt")
Print "Courier New: " + if(FontExists("Courier New"), "existiert", "fehlt")
Print "qwertzuiop: " + if(FontExists("qwertzuiop"), "existiert", "fehlt")
Waitkey
End