简体   繁体   中英

How to install font locally from web page

Is there any way to install font from a webpage like display a button and if user click on this some font will install on local system. I don't know its is possible or not through JavaScript or any other client side.

Not the way you describe it, no. You can easily hook up a button to trigger a download for the font (or any file, for that matter), but the user will then still have to install the font themselves after it has been downloaded to their computer.

The browser does not get to initiate that action in the Operating System: it would be incredibly insecure if it was allowed to, because fonts are very complicated bits of software, and you might be able to take advantage of a bug in one of the many font parsers. If you could make the browser "force" a font to be installed for a user, you would be able to do all sorts of bad stuff depending on how bad the bug was, from remote code execution to crashing their computer to even silently taking over their computer entirely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM