ActiveX font importing stops working randomly

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mipha
Posts: 77
Joined: 27 Jul 2018, 17:08

ActiveX font importing stops working randomly

06 Dec 2018, 03:41

I have tried to replicate this issue on a html file and I couldn't get it to replicate so this seems to only happen on activeX windows.

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
Its relatively simple. It navigates to a htmlfile in the same directory and imports a font from the same directory and puts down the letter A to see if the font works. This all worked fine for some time
Image
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
Mipha
Posts: 77
Joined: 27 Jul 2018, 17:08

Re: ActiveX font importing stops working randomly

07 Dec 2018, 07:55

It has been over a day. Is there at least someone that knows a place where they know more about activeX so I can ask there?
Mipha
Posts: 77
Joined: 27 Jul 2018, 17:08

Re: ActiveX font importing stops working randomly

09 Dec 2018, 11:47

Does seriously no one around here have any clue? Why do fonts in ahk have to be by far the most troublesome feature I ever had to work with :/

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DecimalTurn, macromint, peter_ahk and 348 guests