I try to include a CSS file with custom font (via using @font-face)
Lib/main.js :
var pageMod = require("sdk/page-mod");
var self = require("sdk/self");
pageMod.PageMod({
include: "*",
contentStyleFile: [self.data.url("css/fontello/fontello.css")]
});
(This work correctly, tested by adding background-color)
But I think I have problem to local font path..
This is my folder look like
And my fontello.css with @font-face look like.. (This is just a part of fontello)
@font-face {
font-family: 'fontello';
src: url('fontello.eot?25255831');
src: url('fontello.eot?25255831#iefix') format('embedded-opentype'),
url('fontello.woff?25255831') format('woff'),
url('fontello.ttf?25255831') format('truetype'),
url('fontello.svg?25255831#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
After this , I try to add a element with my custom font, It doesnt work
What is this src sholud be ?
Tested :
data/css/fontello/fontello.{font-ex}
/data/css/fontello/fontello.{font-ex}
css/fontello/fontello.{font-ex}
/css/fontello/fontello.{font-ex}
fontello/fontello.{font-ex}
/fontello/fontello.{font-ex}
fontello.{font-ex}
/fontello.{font-ex}
Noone works :(