| |
|
|
 Sven Bader | Da die Windows API Funktion EnumFontFamiliesEx etwas unhandlich ist, habe ich eine Profan-Lösung hierfür gebaut. Es funktioniert schnell und zuverlässig.
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
|
|
|
| |
|
|
|
 Georg Teles | Nabend,
ziemlich simpel aber genial 
per XProfan X4 dann Move(... nehmen 
Grüße |
|
|
| |
|
|