1

首先,我以推荐的方式使用bootswatch:readable主题 - 在<head>. 但是,在我合并的自定义样式表并覆盖了应该覆盖 Bootstrap 的内容之后,Bootstrap 正在加载。

然后我尝试简单地安装它meteor add bootswatch:readable,它会工作,我的覆盖也可以工作,但问题是 Glyphicons - 我会得到

Failed to decode downloaded font:
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.woff2
OTS parsing error: invalid version tag
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.woff
OTS parsing error: invalid version tag
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.ttf
OTS parsing error: invalid version tag

我看到图标路径可能是错误的,但不确定在哪里或如何修复它。

4

1 回答 1

2

在 GitHub 上发现了这个问题,它为我提供了一个临时解决方案。

我安装了主题meteor add bootswatch:readable并将其添加到我自己的样式表中:

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.eot');
  src: url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.eot?') format('embedded-opentype'),
    url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2') format('woff2'),
    url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.woff') format('woff'),
    url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
    url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.svg') format('svg');
}

瞧,图标有效!

于 2015-11-18T10:15:35.663 回答