Display a list of fonts on the system: https://www.autohotkey.com/boards/viewtopic.php?t=14838
Code: Select all
#NoEnv
#Warn
Gui Add, ListView, x8 y8 w273 h362, Font name
LV_ModifyCol(1, 250)
Global FontList := []
EnumFonts() {
hDC := DllCall("GetDC", "UInt", DllCall("GetDesktopWindow"))
Callback := RegisterCallback("EnumFontsCallback", "F")
DllCall("EnumFontFamilies", "UInt", hDC, "UInt", 0, "Ptr", Callback, "UInt", lParam := 0)
DllCall("ReleaseDC", "UInt", hDC)
}
EnumFontsCallback(lpelf) {
FontList.Push(StrGet(lpelf + 28, 32))
Return True
}
EnumFonts()
Loop % FontList.MaxIndex() {
LV_Add("", FontList[A_Index])
}
Gui Show, w290 h379, Fonts
Return
GuiEscape:
GuiClose:
ExitApp