如何在项目中包含 ui-grid 字体文件 [英] How to include ui-grid font files into the project

查看:33
本文介绍了如何在项目中包含 ui-grid 字体文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直坚持使用 anjularjs ui-grid,它显示一些中文符号来代替图标.在深入研究之后,我知道我必须使用 ui-grid 团队提供的一些字体文件,我下载了这些文件并将它们包含在我的项目中,但仍然没有获得正确的图标图像和字体,如何包含这些文件进入项目?

I have been stuck with anjularjs ui-grid, it's showing some Chinese symbols in place of icons. After digging about it I get to know I have to use some font-files provided by ui-grid team, I downloaded the files and included them into my project but still m not getting the correct icon images and fonts, how to include these files into the project?

这些是我下载并包含在我的项目中的文件名:

These are the file names which I downloaded and included in my project:

1 ui-grid.eot 
2 ui-grid.svg
3 ui-grid.ttf
4 ui-grid.woff

推荐答案

我也遇到了同样的问题,现在解决如下

I had the same issue, now it is rectified as follows

我使用最新的稳定版本 (v3.0.0-rc.3) 或不稳定版本 (v3.0.0-rc.16) 更新了 Ui-grid.

I updated the Ui-grid with either latest stable version(v3.0.0-rc.3) or the unstable version(v3.0.0-rc.16).

然后将字体文件全部放在 ui-grid.css 所在的目录中,就像这样

then place the font files all in the same directory as your ui-grid.css lives, like this

app
- lib
  - ui-grid.js
  - ui-grid.css
  - ui-grid.eot
  - ui-grid.svg
  - ui-grid.ttf
  - ui-grid.woff

你可以打开CSS并将文件路径更改为@font-face url中的相对位置

you can open the CSS and change the file path to the relative location in @font-face url's

检查这里http://ui-grid.info/docs/#/tutorial/116_fonts_and_installation

这篇关于如何在项目中包含 ui-grid 字体文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆