I am developing a splash screen for a public Wi-Fi hotspot, and Firefox refuses to display my custom font while it works in any other browser (well, not IE <9, but this was expected).
The page should work in the following restriction:
- No access to the Internet: this page is displayed before the user accepts the term and condition, therefore everything is blocked
- The page is stored in the access point: this means that the embedded server may have been written in C, and I cannot add an extra header or anything else. Well its open source, so it's possible, but I'm definitely not an embedded developer!
- Wi-Fi is used to advertise the small town in which it is offered, so it should be as beautiful as possible.
To satisfy these restrictions, I used @ font-face with uri data, for example:
@font-face { font-family: Lato-Light; src: url(data:application/font-woff;base64,<large base64 string>) format('woff'); } h1{ font-family: Lato-Light, Helvetica, sans-serif; }
It works like a charm ... Except Firefox. Now I understand that it will not work in older IE, but I am ready to work with it. But it seems strange to me that the so-called modern browser will not offer this feature. Why is this not working?
EDIT: Of course, I have a lot of ideas for returning, but my question is more: why does Firefox have such behavior that does not match with other browsers? Is this a security setting? Error implementing uri data? Size limit for uri data?
source share