Is there a way to load a new font via the developer console?

1,882 views
Skip to first unread message

Duke Dougal

unread,
Sep 14, 2017, 7:11:41 AM9/14/17
to Google Chrome Developer Tools
I want to fiddle with CSS settings, plus I want to see what new fonts look like, but I do not want to (and indeed, cannot) modify the source file on the server.

Is there a way in chrome developer tools to load a new font in to the current page?

thanks!

David Wakelin

unread,
Sep 14, 2017, 7:46:48 AM9/14/17
to google-chrome-...@googlegroups.com
Just inject an HTML tag directly into the page from the console:

var link = document.createElement('link');
link.rel = "stylesheet";
document.body.prepend(link);


David Wakelin

IT Manager & Senior Developer




Unit 10 Silverdale Industrial Estate
Meadow Road Worthing BN11 2RZ

      

     

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/096009e0-c7d8-4948-b1d7-bc3a1046de89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages