Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

console error "typekit" #590

Closed
jimlongo56 opened this issue Dec 7, 2015 · 5 comments
Closed

console error "typekit" #590

jimlongo56 opened this issue Dec 7, 2015 · 5 comments
Labels

Comments

@jimlongo56
Copy link
Contributor

Hi, there's a javascript file that's trying to load an Adobe font package in the javascript/custom/typekit.js folder. Its throwing a 403.

@colin-marshall
Copy link
Collaborator

@jimlongo56: Got the same error and figured out the cause. You have to add the domains you want to use the fonts on for Typekit to work on a site. This kit has localhost added as a domain so it works if you view the site through Browsersync (or any local server using localhost as the domain), but if you were viewing the site on a domain other than localhost then it wouldn't work because the domain hasn't been added to the kit.

The intention is for you to replace the Typekit embed code in typekit.js that comes with FoundationPress with your own Typekit embed: https://github.com/olefredrik/FoundationPress/blob/master/library/enqueue-scripts.php#L25-L26

@jimlongo56
Copy link
Contributor Author

@colin-marshall Sometimes we use TypeKit, sometimes fonts.com, sometimes Google fonts.
Doesn't Foundation just load font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;

I think FP should be agnostic as to fonts. There can be many different configurations to load fonts, and sometimes these javascript loaders need to be in the head (as in fonts.com), so it should be left to the individual project developer.

The last time I used typeKit I was instructed to put it in the header.php
`<script type="text/javascript" src="//use.typekit.net/mu35uor.js"></script>

<script type="text/javascript">try{Typekit.load({ classes:false, events:false });}catch(e){}</script>`

Or maybe just comment that line out in enqueue-script.php? If someone wants it they can turn it on. I personally like the fact it's pretty bare bones, not a theme with a lot of built in assumptions or extra options.

Also the file is in the custom folder so isn't is also being concatenated into foundation.js?

Thanks again.

@colin-marshall
Copy link
Collaborator

@jimlongo56: You make some good points about the fonts. I was just explaining how it's setup and @olefredrik should be the one to speak on the use of Typekit in FP.

And yes the file should not be in the custom folder since it's in the enqueue scripts and it's currently loading in the header and footer. I discovered that yesterday in #604. That will be fixed once I hear back where to put it.

@olefredrik
Copy link
Owner

@jimlongo56 @colin-marshall : I agree. l'll remove all typekit references and just stick with Helvetica Neue as the default font for FP. Will still use Proxima Nova in the demo site, but I'll remove it from the source code in the master branch. Thank you for your input.

@olefredrik
Copy link
Owner

Fixed #610

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants