0

I have a bundle calling MyBundle. In bundle on the public folder have css/fontes.css and have too the fontes folder.

In fontes folder have: sourcesanspro-regular-webfont.eot, sourcesanspro-regular-webfont.woff, sourcesanspro-regular-webfont.ttf, sourcesanspro-regular-webfont.svg, sourcesanspro-bold-webfont.eot, sourcesanspro-bold-webfont.woff, sourcesanspro-bold-webfont.ttf, sourcesanspro-bold-webfont.svg, sourcesanspro-light-webfont.eot, sourcesanspro-light-webfont.woff, sourcesanspro-light-webfont.ttf, sourcesanspro-light-webfont.svg.

Above the content fontes.css


    @font-face {
        font-family: 'source_sans_proregular';
        src: url('fontes/sourcesanspro-regular-webfont.eot');
        src: url('fontes/sourcesanspro-regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('fontes/sourcesanspro-regular-webfont.woff') format('woff'),
             url('fontes/sourcesanspro-regular-webfont.ttf') format('truetype'),
             url('fontes/sourcesanspro-regular-webfont.svg#source_sans_proregular') format('svg');
        font-weight: normal;
        font-style: normal;

    }


    @font-face {
        font-family: 'source_sans_probold';
        src: url('fontes/sourcesanspro-bold-webfont.eot');
        src: url('fontes/sourcesanspro-bold-webfont.eot?#iefix') format('embedded-opentype'),
             url('fontes/sourcesanspro-bold-webfont.woff') format('woff'),
             url('fontes/sourcesanspro-bold-webfont.ttf') format('truetype'),
             url('fontes/sourcesanspro-bold-webfont.svg#source_sans_probold') format('svg');
        font-weight: normal;
        font-style: normal;

    }


    @font-face {
        font-family: 'source_sans_prolight';
        src: url('fontes/sourcesanspro-light-webfont.eot');
        src: url('fontes/sourcesanspro-light-webfont.eot?#iefix') format('embedded-opentype'),
             url('fontes/sourcesanspro-light-webfont.woff') format('woff'),
             url('fontes/sourcesanspro-light-webfont.ttf') format('truetype'),
             url('fontes/sourcesanspro-light-webfont.svg#source_sans_prolight') format('svg');
        font-weight: normal;
        font-style: normal;

    }

Could anyone help me loading the fonte.css and sources without using the command "asset:dump".

2
  • What? Can you please clarify what you're asking? Do you mean assets:install ?
    – Touki
    Sep 6, 2013 at 15:28
  • thanks for your assistence, but I wanted to read straight from the folder public without using the command asset:install. This would avoid duplication of files. Sep 6, 2013 at 15:44

2 Answers 2

0

You could symlink the folder with fonts to the web folder.

2
  • Thanks for answer, but I'd like read from public folder on MyBundle. Sep 9, 2013 at 1:47
  • You can read from it, but you can't make it accessible from the Internet without putting files to web/ in some way. Sep 9, 2013 at 10:14
0

You have your css in public/ folder of your bundle, which enables you to use assetic with the cssrewrite filter, to rewrite paths to the real path under web. See Fixing CSS Paths with the cssrewrite Filter

All other assets you can install with the symlink option under the web/ folder to make them accessible:

php app/console assets:install web --symlink --relative

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.