Here is some code
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
htmlpath := A_scriptdir . "\Htmlfile.html"
gui Picture_Loader:default
gui, add, edit, h0 w0
gui, font, s10
gui +Border +lastfound
menuwidth := A_screenwidth / 3
menuheight := A_screenheight / 2
Gui, Add, ActiveX, x0 y0 w%menuwidth% h%menuheight% vmenu, Shell.Browser
menu.navigate(htmlpath)
sleep 100
htmlpart1 := "<!DOCTYPE html><html><head><style type=text/css> html {overflow:hidden; height:100%;} body {background:#888888; width:100%; height: 100%;}"
htmlpart1 .= "@font-face{font-family:Myfont; src:url('gamesymbols.woff') format('woff');}"
htmlpart1 .= ".custom{font-family:Myfont;}"
htmlpart2 := "</style></head><body>"
htmlpart2 .= "<p class='custom' style=""font-size:250px; width:50%; height:50%;"">Aa</p>"
htmlpart2 .= "</body></html>"
html := htmlpart1 . htmlpart2
menu.document.open()
menu.document.write(html)
menu.document.close()
gui, show
return
F11::
Reload
return
But then I realized once I started to do various things on my computer. The font would just stop working for all scripts until I restart my computer (which is so far the only solution I know)
If anyone has a clue whats going on and why and how I could fix this or if you know another place that knows more about this issue. Please tell me.
You can test the script out for yourself by downloading this file and launching the script inside
Link
One way I reliably managed to brick up the fonts was by saving an image in paint.net there's probably a bunch of other stuff as well. Here is a Gif of it