XF 1.5 custom font not working after upgrade

Nobitakung

Member
Hi, I use custom fonts in several parts of my site by adding @font css rules in the EXTRA.CSS, but after upgrading from 1.5.0 to 1.5.6 , those fonts are no longer applied to the html elements. What happen?
 

Arty

Well-known member
If files for those fonts are hosted on your server, check they are still there. Maybe you've accidentally deleted them.

Or maybe you've edited some style properties, which got overwritten during update, but forgot about them.
 

Nobitakung

Member
Thank you to all of you. I've found the cause of the issue finally, it's about that the .htaccess was replaced during upgrade, so the code that redirect the www version to non-www version which I've added in the original .htaccess is no longer exist there. And I happened to use absolute font url in @font-face rules, that is I point it to http://mysite.com/fonts/...... and when I access the site with http://www.mysite.com the fonts seem to not loaded. So, this problem can be fixed by changing the @font-face to use relative font url , like "./fonts/...." or add the missing redirect code in the .htaccess file.

But, I still wonder why in www version and the browser have problem in loading the font file in non-www version? I'd appreciate if anyone will kindly explain this. Thanks.
 
Top