Clearing font cache on Windows


I’m trying to receive and react to a Windows broadcast message (WM_FONTCHANGE ). Is it actually possible somehow inside electron? With some extension maybe?

The other thing is to update the electron font cache. I add new fonts using AddFontResource and other apps are seeing the newly added font, so it works. But electron does not react, and does not see the added font. I tried relaunching it and clearing the cache, but no result. On the other hand, Chrome 47.0.2526.73 beta-m (64-bit) sees the added fonts after a re-launch. I also tried this in Atom, and atom does not see the font.

So the question is: is Chrome using some method to clear the font cache of some sort? How can I achieve the same in electron? I will be glad to hear any suggestions.


I don’t know about the latest version of Electron, but Atom is using Chromium 45 in the latest master. So that would be one reason that it isn’t behaving the same as Chrome 47.

Sadly, other than that, I don’t have a whole lot to add :frowning:


I’m curious on this too.
As a worker without admin privileges, that AddFontResource function is the only way to add new fonts. And that’s why I can’t use Electron based editors as a main editor.

By the way, Electron is going to be updated to Chrome 47. (FYI)
Would you please take a look at it again after the update?