Font-Face not working in Firefox 18.0.1 (code and URL included) - firefox

Hello and thanks a ton for any help with my problem. Here are the facts:
The URL is www.thecloudz.net, regarding the navigation links at the very top, the font is called brooklyn. The font on the URL appears correctly in Safari and Chrome, but not in Firefox. I was told I may have a plugin installed that's interfering with font-face.
The font-face settings for the URL are below, 'rock salt' is the default font showing up in FF, but according to the code below it should first show brooklyn. Why is it working on every browser except Firefox? Please help if you can, thank you!
`/* CHANGES FONT FOR NAVIGATION */
#font-face {
font-family: brooklyn;
src: url('http://thecloudz.net/files/BROOKLYN.eot');
src: url('http://thecloudz.net/files/BROOKLYN.eot?#iefix') format('embedded- opentype'),
url('http://thecloudz.net/files/brooklyn.woff') format('woff'),
url('http://thecloudz.net/files/BROOKLYN.TTF') format('truetype');
}
#navigation ul li a {
font-family: brooklyn, 'rock salt', serif;
font-size: 1.3em;
padding-top: 7px;
height: 50px;
}`

Firefox enforces a same origin policy.
http://thecloudz.net/ and http://www.thecloudz.net/ are not the same.

Related

Firefox completelly refuses font load due to EOT

I noticed Firefox refuses to load custom fonts on one of my web pages. I'm 90% sure it worked one month ago. Now I use Firefox 43.04 (Windows). The error in the console is:
downloadable font: rejected by sanitizer (font-family: "PT Serif" style:normal weight:bold stretch:normal src index:0) source: https://localhost:8443/project/fonts/2/pt-serif-v8-latin_latin-ext-700.eot
and the html text is rendered with a system font (Times New Roman) instead.
The relevant CSS is:
#font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: 700;
src: url('../fonts//pt-serif-v8-latin_latin-ext-700.eot'); /* IE9 Compat Modes */
src: local('PT Serif Bold'), local('PTSerif-Bold'),
url('../fonts//pt-serif-v8-latin_latin-ext-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts//pt-serif-v8-latin_latin-ext-700.woff') format('woff'), /* Modern Browsers */
url('../fonts//pt-serif-v8-latin_latin-ext-700.ttf') format('truetype'), /* Safari, Android, iOS */
}
If I remove both lines with eot, then it works correctly (web font is used).
The question is, why does it reject the entire font family when the problem is just with one format?
I need eot for IE (strange, caniuse claims IE supports WOFF since v9, but it does not seem to work with my IE11).
I downloaded the font files thru https://google-webfonts-helper.herokuapp.com/fonts
The CSS line (the one with "Safari, Android, iOS") ends with a comma instead of semicolon. (blush)
The correct (tested to work) version is:
#font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: 700;
src: url('../fonts//pt-serif-v8-latin_latin-ext-700.eot'); /* IE9 Compat Modes */
src: local('PT Serif Bold'), local('PTSerif-Bold'),
url('../fonts//pt-serif-v8-latin_latin-ext-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts//pt-serif-v8-latin_latin-ext-700.woff') format('woff'), /* Modern Browsers */
url('../fonts//pt-serif-v8-latin_latin-ext-700.ttf') format('truetype'); /* Safari, Android, iOS */
}

Buttons not showing correctly (Videojs font not working on subdomain)

I'm having problems with video.js. On the main domain everthings works fine. But on the www. subdomain the buttons are not showing correctly (It's just showing ).
It looks like the font doesn't work on the subdomain. Any ideas to fix this?
VideoJS uses a custom font, defined using the #font-face directive in video-js.css. The paths defined inside are relative. When FireFox goes to load the fonts, it uses the root URL of the CSS file and concatenates the font paths.
The custom fonts are thus being loaded from your main domain when viewing the subdomain. Doesn't sound like a problem, right? But Firefox does not allow cross-domain fonts without access control headers for security.
In other words, FireFox normally requires every custom font to be loaded from the domain of the page that's showing. If you're viewing www.example.com, your fonts have to come from www.example.com, not example.com.
You can either
Use the solution linked above to add the appropriate headers to your server (if you have control) to allow the "cross-domain" fonts (www.example.com is considered a different domain from example.com)
Load the VideoJS CSS file dynamically from whichever domain is active.
If you want to go the latter route, when the user's viewing www.example.com, load http://*www.*example.com/path/to/video-js/video-js.min.css. When viewing example.com, load http://example.com/path/to/video-js/video-js.min.css.
Note that Webkit doesn't care -- seems to just be a Firefox problem.
Apply this css and get output
#font-face {
font-family: 'VideoJS';
src: url('https://vjs.zencdn.net/f/1/vjs.eot');
src: url('https://vjs.zencdn.net/f/1/vjs.eot?#iefix') format('embedded-opentype'),
url('https://vjs.zencdn.net/f/1/vjs.woff') format('woff'),
url('https://vjs.zencdn.net/f/1/vjs.ttf') format('truetype');
}
.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
content: "\f103";
font-family: 'VideoJS';
}
.video-js .vjs-mute-control .vjs-icon-placeholder:before, .vjs-icon-volume-high:before {
content: "\f107";
font-family: 'VideoJS';
}
.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .vjs-icon-play:before {
content: "\f101";
font-family: 'VideoJS';
}
.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before, .vjs-icon-picture-in-picture-enter:before {
content: "\f121";
font-family: 'VideoJS';
}
.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before, .vjs-icon-fullscreen-enter:before {
content: "\f108";
font-family: 'VideoJS';
}
This solution worked for me when the icons were rendering blank:
#font-face {
font-family: VideoJS;
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOe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xjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) format("woff");
font-weight: normal;
font-style: normal;
}

Issues with #font-face

I am using the #font-face. I had to break it up into two section because firefox continued to use the first font and it showed up crappy. Actually it still displays blurry/pixelated in firefox. Any solutions for that? Anyways it all seems to work fine now, but I can't get any of the bold functions to work. Doesn't seem to matter where I add it in the code whether it is in the CSS or directly in the html it work make the font bolder. Is this normal?
#font-face {
font-family: TektonPro-BoldExt;
src:url('../fonts/TektonPro-BoldExt.eot') format('embedded-opentype'), /* For IE */
url('../fonts/TektonPro-BoldExt.eot?#iefix') format('embedded-opentype'), /* For fix-IE */
url('../fonts/TektonPro-BoldExt.woff') format('woff'), /* For new-IE */
url('../fonts/TektonPro-BoldExt.otf') format('opentype'), /* For non-IE */
url('../fonts/TektonPro-BoldExt.ttf') format('truetype'), /* For non-IE */
url('../fonts/TektonPro-BoldExt.svg') format('svg'); /* For non-IE */
font-weight: bolder;
font-style: normal;
}
#font-face {
font-family: TektonPro-BoldExt-FF;
src:url('../fonts/TektonPro-BoldExt.otf') format('opentype'); /* For Firefox */
font-weight: bolder;
font-style: normal;
}
Not all fonts have a bold spite that can render as bold. You can try adjusting the font-weight in increments of 100 to see if that makes any difference.
Regarding Firefox using the first font, do you mean it was caching another font you used before?

jqGrid Pager Area - Using Font Awesome Icons

I would like to use Font Awesome icons:
<i class="icon-edit"></i>
in the jqGrid pager area instead of the physical images by default.
.navButtonAdd('#vw_ComplaintSearchGridPager', { caption: '', buttonicon: 'ui-icon-disk', title: 'Save Grid Settings', onClickButton: function () { $(this).SaveGridSetting(); } })
Does anyone know how to achieve this?
It's very interesting question! I never used Font Awesome icons before, but it seems very interesting project.
jqGrid has currently no direct support of Font Awesome icons, but I prepared the simple demo which shows how to replace the standard jQuery UI navigator icons with the corresponding icons from Font Awesome.
One can see mostly clear the difference to the original navigator icons after zoom of the page. I included below the navigator displayed with zoom 400%:
The original navigator using jQuery UI icons
The navigator with Font Awesome icons:
The code which I used is very simple. Instead of usage
$grid.jqGrid("navGrid", "#pager", {view: true});
I used
$grid.jqGrid("navGrid", "#pager", {editicon: "icon-pencil",
addicon: "icon-plus", delicon: "icon-trash", searchicon: "icon-search",
refreshicon: "icon-refresh", viewicon: "icon-file",view: true});
$("#pager .navtable .ui-pg-div>span").removeClass("ui-icon");
I added the CSS
.ui-jqgrid .ui-jqgrid-pager .ui-pg-div>span { margin: 0 5px; font-size: 12px; }
I think it's possible to replace more jQuery UI icons to Font Awesome icons, but it's not very simple. I will think about the problem more and will contact the developer of jqGrid (Tony Tomov) to consider to make jqGrid more friendly to Font Awesome icons, so that it could be possible very simple switch to Font Awesome icons.
UPDATED: I added the code which allows top replace more icons from the pager:
var $pager = $grid.closest(".ui-jqgrid").find(".ui-pg-table");
$pager.find(".ui-pg-button>span.ui-icon-seek-first")
.removeClass("ui-icon ui-icon-seek-first")
.addClass("icon-step-backward");
$pager.find(".ui-pg-button>span.ui-icon-seek-prev")
.removeClass("ui-icon ui-icon-seek-prev")
.addClass("icon-backward");
$pager.find(".ui-pg-button>span.ui-icon-seek-next")
.removeClass("ui-icon ui-icon-seek-next")
.addClass("icon-forward");
$pager.find(".ui-pg-button>span.ui-icon-seek-end")
.removeClass("ui-icon ui-icon-seek-end")
.addClass("icon-step-forward");
As the result one get the following pager:
instead of
UPDATED 2: The code for changing minimizing icon looks a little completer. One should first change the icon initially
$grid.closest(".ui-jqgrid")
.find(".ui-jqgrid-titlebar>.ui-jqgrid-titlebar-close>.ui-icon-circle-triangle-n")
.removeClass("ui-icon ui-icon-circle-triangle-n")
.addClass("icon-circle-arrow-down");
and then change it after every click on the icon:
onHeaderClick: function (gridstate) {
if (gridstate === "visible") {
$(this.grid.cDiv).find(">.ui-jqgrid-titlebar-close>span")
.removeClass("icon-circle-arrow-up ui-icon-circle-triangle-n")
.addClass("icon-circle-arrow-down");
} else if (gridstate === "hidden") {
$(this.grid.cDiv).find(">.ui-jqgrid-titlebar-close>span")
.removeClass("icon-circle-arrow-down ui-icon-circle-triangle-s")
.addClass("icon-circle-arrow-up");
}
}
Additionally one need to add the CSS
.ui-jqgrid .ui-jqgrid-titlebar-close>span { margin: 0 3px; font-size: 16px; }
.ui-jqgrid .ui-jqgrid-titlebar-close { text-decoration: none; }
To fix the sorting icons I used the code
var $sortables = $grid.closest(".ui-jqgrid")
.find(".ui-jqgrid-htable .ui-jqgrid-labels .ui-jqgrid-sortable span.s-ico");
$sortables.find(">span.ui-icon-triangle-1-s")
.removeClass("ui-icon ui-icon-triangle-1-s")
.addClass("icon-sort-down");
$sortables.find(">span.ui-icon-triangle-1-n")
.removeClass("ui-icon ui-icon-triangle-1-n")
.addClass("icon-sort-up");
and the CSS
.ui-jqgrid .ui-icon-asc { height: auto; margin-top: 0; }
.ui-jqgrid .ui-icon-asc, .ui-jqgrid .ui-icon-desc {
height: auto; margin-top: 0; margin-left: 5px;
}
.ui-jqgrid .s-ico>.ui-state-disabled, .s-ico>.ui-state-disabled { padding: 0; }
As the result one will get the following:
UPDATED 3: In the next demo one can find more full replacement of jQuery UI icons to Font Awesome icons.
UPDATED 4: The answer provides solution for Font Awesome version 4.x.
Figured I would put a CSS alternative answer for those interested. One of our developers implemented a JS option, which did functionally work, however, there was a delay before it rendered correctly (not ideal).
We used font-awesome icons for our paging options, and here is how we implemented it.
Found the four classes that jqGrid was using for the paging icons we desired to customize and created the following css to apply base font awesome styles
.ui-icon-seek-next, .ui-icon-seek-prev, .ui-icon-seek-end, .ui-icon-seek-first
{
display: inline-block;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
Then it is simply a matter of grabbing the content from font-family icon and using them as your own.
.ui-icon-seek-next:before
{
content: "\f105";
}
.ui-icon-seek-prev:before
{
content: "\f104";
}
.ui-icon-seek-end:before
{
content: "\f101";
}
.ui-icon-seek-first:before
{
content: "\f100";
}
So the entire CSS together looks like this
.ui-icon-seek-next, .ui-icon-seek-prev, .ui-icon-seek-end, .ui-icon-seek-first
{
display: inline-block;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.ui-icon-seek-next:before
{
content: "\f105";
}
.ui-icon-seek-prev:before
{
content: "\f104";
}
.ui-icon-seek-end:before
{
content: "\f101";
}
.ui-icon-seek-first:before
{
content: "\f100";
}
And the output on our grid without JS and without delay
By looking at answer from Oleg above, I did the following to simplify things.
Additional CSS
.ui-jqgrid .ui-jqgrid-pager .ui-pg-div>span.fntawsm { margin: 0 5px; font-size: 12px; padding-left:2px;padding-right:2px;}
** padding-left:2px;padding-right:2px; is optional
And this only works with icons only with no caption ...
And then just start adding fontawesome icons in navButtonAdd like
caption:"", // important for above
title:"Give any",
buttonicon:"fntawsm icon-remove"
buttonicon:"fntawsm icon-eject icon-rotate-90"
etc .. You can use all extra functionality from font-awesome like icon-rotate-XX too.
Thisway i did`nt have to remove ui-icon class from spans.
Inspired by #afreeland answer, I created a css available on github which allows you to convert your icons to Font-Awesome icons.
The performance advantage of this over the jquery method that #Oleg described is important in my opinion.
It is also a very elegant solution in my opinion.
You are welcome to use it: https://github.com/guylando/ToAF
Note: you must give priority for this ToAF.css file styles over your other icons styles so that can be achieved for example by copying the css content into a tag in your document.

background image is not working in mozilla firefox

The body background is not displaying in firefox.
here is my CSS
body{
font-family:"Trebuchet MS", Helvetica, sans-serif;
font-size:15px;
color: #fff;
overflow-x:hidden;
background: url(../images/2.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Generally when I have ran into this problem, the error comes from the path to the image. If I were you I would try changing that from your relative path url('../images/yourimage.jpg') to the absolute path:
ex. url('home/user/Desktop/website/images/yourimage.jpg').
If you're site is linked to the folder containing images though(which it should), you won't need to do that. All you need is url('image/yourimage.jpg'); Because your site is already pulling the files from that folder
I have had this problem in the past.....Your background images would not work in Firefox and Internet Explorer unless you set the display property to 'block' in your media queries.
For Example:
#media only screen and (max-width:740px) {
table.Class {
background:url('images/divider_small.png') no-repeat 10px 0;
width:430px;
height:22px;
display:block;
}
}
I had the same issue problem was with the file path, I had "url('/images/yourimage.jpg')" which got loaded in chrome but not in ie and firefox so I changed to url('../images/yourimage.jpg') and it worked
I notice that you have no '' around the URL to your image. On W3C schools it says you should:
For example:
background-image:url('yourImage.png');
Please see here:
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image

Resources