Reputation: 991
I know I can import the font I would like to use into the CSS file with the Devtools open. It just seems like a no-brainer for Google to have their massive Fonts library linked to Devtools. Is there a way to do this?
Upvotes: 7
Views: 2589
Reputation: 8894
The answer is too old, but this might help others. Type in console following code, then you can use it in Element>styles
var link = document.createElement('link');
link.href = "https://fonts.googleapis.com/css?family=Roboto";
link.rel = "stylesheet";
document.body.prepend(link);
Upvotes: 5
Reputation: 25907
Select an element in Elements panel > DOM Tree and press F2 to edit the <head
> tag of your HTML. From there, just add the <link>
tag to your HTML. Press Command+Enter (Mac) or Control+Enter to save your changes.
In the Network panel you'll see a request for the font file.
Upvotes: 3