: Font compressor I want to use @font-face in my css but I have a lot of fonts. Does anyone know of any software will let me to compress my fonts?
I want to use @font -face in my css but I have a lot of fonts. Does anyone know of any software will let me to compress my fonts?
More posts by @Margaret670
2 Comments
Sorted by latest first Latest Oldest Best
If you add the following lines of code to your .htaccess file, it will compress the fonts and cause them to be cached in the user's browser allowing you to use more fonts than you might otherwise be inclined to get away with.
The following will declare the font types to the browser.
AddType font/ttf .ttf
AddType font/otf .otf
AddType font/x-woff .woff
AddType image/svg+xml .svg
AddType application/vnd.ms-fontobject .eot
The following will set the fonts to cache in your users browser.
ExpiresByType font/ttf "access plus 10 years"
ExpiresByType font/otf "access plus 10 years"
ExpiresByType application/vnd.ms-fontobject "access plus 10 years"
ExpiresByType font/x-woff "access plus 10 years"
ExpiresByType image/svg+xml "access plus 10 years"
The following will compress the fonts before sending them to the user
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.