With .htaccess you can do it like this if the font file fontfile.otf.gzis a browser request that is likefontfile.otf
RewriteEngine On
RewriteCond "%{HTTP:Accept-Encoding}" "gzip.*deflate|deflate.*gzip"
RewriteCond %{REQUEST_FILENAME} "\.(otf)$"
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^.*$ %{REQUEST_URI}.gz [L]
<FilesMatch "\.otf\.gz$">
AddEncoding gzip .gz
ForceType "text/plain"
</FilesMatch>
And if the font file and the website are cross-domain, you need to install Access-Control-Allow-Origin, firefox will not load cross-domain font objects .
Gecko - ( , ), HTTP- .
Header set Access-Control-Allow-Origin *