Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Indyaner

TweenMax tries to access a font on a path, that does not exists and throws an error

Recommended Posts

I wonder if you guys could help me solve this error:

 

TweenMax.min.js:15 

GET file:///G:/ProjectJim/Code/stages/v03/css/css/fonts/Brooks/Brooks.ttf net::ERR_FILE_NOT_FOUND(anonymous function)

 

TweenMax tries to access a font on a path, that does not exists and throws this error.

 

I have included the TweenMax dependecy on the bottom of my HTML:

<script type="text/javascript" src="js/vendor/TweenMax.min.js"></script>

Somehow, he is looking for a wrong path for a Font I'm using. Why is he doing that?

 

My Project:

v03
|-- css
|    |-- scss 
|    |    |-- _media-queries.scss
|    |    +-- style.scss
|    |-- fonts
|    |    +-- Brooks
|    |         +-- Brooks.ttf
|    +-- style.css
|-- img
|-- js
|    |-- vendor
|    +-- plugins
|-- index.html
|-- config.rb

As you can see, I use a pre-processor, so it might be a problem with that.

 

Here is my analysis:

 

  • When not inserting any Font in my scss, no error (not a suprise).
  • when using @include font-face("Brooks", font-files("Brooks/Brooks.ttf")); the errors appears
  • The path in my SCSS is correct, as in the HTML the Font appears perfectly normal. The Console states no other errors and the processed CSS is pointing to the correct location (read: The font shows up).

Any Ideas what is going on here?

Can I somehow define the CSS path for TweenMax manually?

 

Sincerely

Indyaner

Link to comment
Share on other sites

Very strange. Are you doing a className tween? 

Does it happen in all browsers?

 

It would really help if you could post the most basic example possible that replicates the error (with processed CSS), just a simple set of files we can open up and look into quickly. CodePen would be perfect.

 

This is the only discussion I can recall on errors relating to @font-face: 

http://greensock.com/forums/topic/6759-ie8-unspecified-error-tweenmax/

  • Like 1
Link to comment
Share on other sites

Ok, the problem was on my side. In the process of stripping down a demo for you I've found a non-relative setting in the config.rb

 

Mea culpa. Thank you for pushing me to do the demo and finding the error myself! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×