sunflowerdeath / webfonts-generator

Generator of webfonts from svg icons
The Unlicense
271 stars 152 forks source link

how can i use cssFontsPath in a webpack-loader? #19

Open ovi1337 opened 7 years ago

ovi1337 commented 7 years ago

Hi, now i'm trying many hours to use cssFontsPath to modify the fonts path inside of the generated template and i don't get it work. Otherwise, is there any way to fetch the file-hash of the font-file inside of the template to getting it work manually?

something like:

    @font-face {
        font-family: "{{fontName}}";
        src: url('../fonts/{{fontName}}.eot?{{hash}}');
        src: url('../fonts/{{fontName}}.eot#iefix?{{hash}}') format('eot'),
        url('../fonts/{{fontName}}.woff2?{{hash}}') format('woff2'),
        url('../fonts/{{fontName}}.woff?{{hash}}') format('woff'),
        url('../fonts/{{fontName}}.ttf?{{hash}}') format('truetype'),
        url('../fonts/{{fontName}}.svg#{{fontName}}?{{hash}}') format('svg');
    }

or can i attach an anonymous callback function to the src attribute, to generate my own?

I would be happy for some hints of you. Thank you in advance! :)

Malin88 commented 7 years ago

Same issue here :/ Any fix for this ?