Set relative font path Home › Forums › Use Any Fonts › Set relative font path This topic contains 3 replies, has 2 voices, and was last updated by Dinesh 7 months, 2 weeks ago. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts March 7, 2016 at 4:34 pm #5389 Fidel72 Hello, I need a way to set a relative font path. I could not find a way to change this in php. Reason is the content is on one server, the domain on another. So the font does not show up! Thx for help March 7, 2016 at 4:36 pm #5390 Fidel72 Oh, I did check this: Use relative path for font (Needed when you have domain mapping). March 7, 2016 at 5:00 pm #5391 Fidel72 I actually fond a solution. for those who encounter the same problem: You need to put this in your .htaccess file (change the http://yoursite.com URL…): <IfModule mod_headers.c> <FilesMatch “\.(eot|font.css|otf|ttc|ttf|woff)$”> Header set Access-Control-Allow-Origin “http://yoursite.com” </FilesMatch> </IfModule> <IfModule mod_mime.c> # Web fonts AddType application/font-woff woff AddType application/vnd.ms-fontobject eot # Browsers usually ignore the font MIME types and sniff the content, # however, Chrome shows a warning if other MIME types are used for the # following fonts. AddType application/x-font-ttf ttc ttf AddType font/opentype otf # Make SVGZ fonts work on iPad: # https://twitter.com/FontSquirrel/status/14855840545 AddType image/svg+xml svg svgz AddEncoding gzip svgz </IfModule> March 8, 2016 at 4:20 am #5395 DineshKeymaster Hi, Sorry for the delay in reply due to weekend here. Ya, that’s how you to need fix when there is cross domain issue even after enabling relative path option from additional settings. Thank you so much for sharing your solution here. 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) The topic ‘Set relative font path’ is closed to new replies.