inter
inter copied to clipboard
Bug in Apache module mod_negotiation causes issues with filenames with ".var" in their name
Describe the bug
Well, "bug"... It is more of an incompatibility.
On some webhosts, the Inter font files with the text ".var." in the file name are not loaded. The browser console shows a status code "500 Internal Server Error" for these files.
To Reproduce
It simply depends on your webhost; whether or not it uses type maps for content negotiation. For me the problem occurred while preparing a switch to a different webhost. All of a sudden the Inter variable font files could no longer be loaded. The server error log shows messages like "AH00681: Syntax error in type map, no ':' in
This is caused by the Apache type-map handler. When it finds a text ".var." in a file name, treats that file as a type map - which is obviously not the case, resulting in an error.
I found that the same problem was reported for the WordPress TwentyTwenty theme, that includes the Inter variable font, (see https://github.com/WordPress/twentytwenty/pull/827), back in October 2019. WP (@carolinan) decided to address this by renaming the font-files.
Although there are other 'solutions', like adding a directive "RemoveHandler .var" in your .htaccess file, I think it would be best if the variable font files in this repository would be renamed.
Best regards, Henk
Wow! This definitely sounds like a bug in Apache HTTP Server. Could you simply rename the font file yourself? For example:
cd path/to/inter-font-files
for f in *.var.*; do echo mv "$f" "$(echo "$f" | sed 's/.var./-VF./g')"; done
documentation of the "mod_negotiation" apache module: https://httpd.apache.org/docs/2.4/mod/mod_negotiation.html
It claims to look for .var
files but clearly there's a bug that makes it look for files with ".var" anywhere in its name, not just as the file name extension.
Hi Rasmus,
Yes, this could very well be a bug in the Apache mod_negotiation module. Googling on it showed me that this problem has been present for years already, so I did not bother to find out if it is really a bug or not.
I can rename the files, of course, but I prefer the solution to add a .htaccess file with a directive "RemoveHandler .var" in the folder with the Inter-files, or in one of its ancestor folders. That way I can, for example, replace the Inter-files by release 3.16, some time from now, without having to think about the filename problem.
Someone have a working alternative solution to this problem?
Hi Carlos,
It is now ten months later and I found that by far the simplest alternative solution for me was doing the same as Google did and WordPress for the Twenty-Twenty theme: simply change the names of the font files.
So, Inter-roman.var.woff2
became inter-roman-var.woff2
, etc.
Of course this will go wrong if you don't think about it when upgrading the font files, but in practice I almost never do this.
Best regards, Henk
I get this issue, but for files like index.html
and index.en.html
.