I have a custom font, and it is rendered well when I request a page from my local dev host (Ubuntu 14.04 in VM via Vagrant on Windows 8.1). After I commit it to git repo on Bitbucket via SourceTree and then checkout that commit to my stage server, font becomes broken - it isn't rendered in browser. Only IE gives errors CSS3111 (unknow error for @font-face) and CSS3112 (deny because of WOFF inconsistency), other browsers don't say anything. What can cause a problem? Some encoding transformations?
2 Answers
Try setting the core.autocrlf
configuration option to true. Also have a look at the core.safecrlf
option.
Actually it sounds like core.safecrlf might already be set in your repository, because (emphasis mine):
If this is not the case for the current setting of core.autocrlf, git will reject the file.
If this is the case, then you might want to check that your text editor is configured to use line endings consistently. You will likely run into problems if a text file contains a mixture of LF and CRLF line endings.
Finally, I feel that the recommendation to simply "use what you're given" and use LF terminated lines on Windows will cause more problems than it solves. Git has the above options to try to handle line endings in a sensible way, so it makes sense to use them.
credits to this question

- 1
- 1

- 9,420
- 12
- 57
- 96
The issue was in transformation from CRLF to LF in font files during commit from windows. I solved it by declaring font files as binary in .gitattributes

- 17
- 1
- 3