【问题标题】:FontAwesome and GITFontAwesome 和 GIT
【发布时间】:2017-05-29 08:01:21
【问题描述】:

我得到:

OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

在我的项目中使用我的 FontAwesome 时没有加载图标。首先是使用 git 进行版本控制。我已经试过了:

https://stackoverflow.com/a/33792610/4439693https://github.com/Microsoft/fonts/blob/master/.gitattributes

但是没有运气。有什么想法吗?

【问题讨论】:

  • 这需要更多细节。您是在 HTML 中加载字体,还是在本地使用它们?您运行了什么命令来获取错误消息?
  • 修复了再次从源上传文件的问题。我猜在我修复 gitattributes 之前它们编码错误。

标签: git font-awesome


【解决方案1】:

解决方案是再次从http://fontawesome.io/get-started/ 上传文件(.eot .woff 等)。我猜他们之前的编码方式错误并添加了

*.eot binary
*.ttf binary
*.woff binary
*.woff2 binary

.gitattributes 文件没有改变编码。

所以上传到 font-awesome/fonts 并推送更改修复了问题。

【讨论】:

    【解决方案2】:

    首先 转到下面的文件并将其设为 'hideDefaultLocaleInURL' => false, config/laravellocalization.php

    比 请在 .htaccess 文件中的所有代码下方设置

    RewriteEngine On
    
    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]
    
    RewriteRule ^(themes|modules|css|js|fonts|assets)/(.*) /public/$1/$2 [L]
    
    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ /public/index.php [L]
    

    我希望这对你有用,我通过这个解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 2020-01-28
      • 2014-05-22
      • 2020-09-05
      • 2019-01-04
      • 2015-03-08
      • 2019-04-04
      相关资源
      最近更新 更多