Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
I can not load the font
  • my code on css file
    @font-face {
        font-family: 'Titillium Maps';
        src: url('assets/fonts/swz721n-webfont.eot');
        src: url('assets/fonts/swz721n-webfont.eot?#iefix') format('embedded-opentype'),
             url('assets/fonts/swz721n-webfont.woff') format('woff'),
             url('assets/fonts/swz721n-webfont.ttf') format('truetype'),
             url('assets/fonts/swz721n-webfont.svg#Swis721BTRoman') format('svg');
        font-weight: normal;
        font-style: normal;

    }

    The css not load me the sources files,
    How to add the url to the css file sources?
    Thanks.
  • If you use relative paths in url(), the path is relative to the location of the css file you define it in.

    So assuming your css file in in assets/css, it should be

    src: url('../fonts/swz721n-webfont.eot');
  • not work.
  • Then maybe your css is somewhere else? Either use a full path, or the correct relative path. I don't know what the correct path is in your application.
  • I can not access from fuel to font file, or using the full url.
    I have copied the folder fonts in img, css, fonts to try and nothing.

    if I try to access the file from the url (eg http://localhost/rev/public/assets/img/fonts/swz721b-webfont.eot)
    I get error 404 (file and folder exsite and the path is correct)
  • Fuel doesn't do anything with css, that's between your browser and the webserver.

    What is possible is that a rewrite rule in your .htaccess is not correct, and rewrites the request for the font file.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion