Problems with loading TypeKit font locally

I’m coding a site that will use a font from TypeKit. I want to see how that font looks while developing locally.

All I get from TypeKit is this article where it says putting localhost will work, but I’m previewing the HTML file in a local browser, no local machine and the like. Perhaps it would help if I somehow download the JS files that need to be embedded and link them, or do they have some protection against it?

1 Like

The way I understand it, you are loading the file directly in browser. Is your path something like: file:///C:/...? The article you linked says specifically that it won’t work:

Typekit will not work on pages that you open from your file system (file://); this is because Typekit requires a referrer, which a local file system cannot send.

If that is the case, then you must view it via a web server, like Apache.

2 Likes

As @AdrianSandu said already, you need to serve your pages through a server like Apache. You could use XAMPP but there is an easier option, though not entirely free: Prepros. Just drop you project folder on the application window and right click on the .html file you are working on, then select Live Preview this File. The “trial” version will nag from time to time though.

1 Like

Thanks, I’ll try your suggestions.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.