I do a lot of optimization work and have noticed that no matter how many tutorials I go over the fonts request are not being compressed. There is no Content-Encoding header being set and I'm verifying the issue through both Chrome and Firefox via the network panels of the built in developer tools and the Apache access logs. I am not a web host myself, my host is the one using LiteSpeed.
Here are just some of the things I tried to do to compress the ttf files:
Example #1
Example #2
Example #3
Example #4
Example #5
It's not difficult to verify if a file is compressed before it's been transferred as Waterfox's Developer Tools Network Panel will show total and transferred; if they are the same for an HTTP request then there was no compression.
Here are just some of the things I tried to do to compress the ttf files:
Example #1
Code:
AddOutputFilterByType DEFLATE application/x-font-ttf application/vnd.ms-fontobject
Code:
AddEncoding x-compress .ttf
Code:
AddEncoding x-gzip .ttf
Code:
AddOutputFilterByType DEFLATE *
Code:
AddType application/x-font-ttf ttf ttc
AddType application/x-font-woff woff
AddType font/opentype otf
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf