Skip to content

Commit 8096ed0

Browse files
mportugaSouthpaw17
authored andcommitted
fix(fonts): Ensuring that fonts are added to the ui-grid package. (#5844)
Ran the fontello task once to generate the font files, then added them to the build so that they can be updated by anyone and to prevent chinese characters from displaying instead of the correct icons. #5806
1 parent d25c993 commit 8096ed0

File tree

9 files changed

+115
-2
lines changed

9 files changed

+115
-2
lines changed

grunt/aliases.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function (grunt, options) {
1010
'default': ['before-test', 'test:single', 'after-test'],
1111

1212
// Build with no testing
13-
'build': ['ngtemplates', 'concat', 'uglify', 'less', 'ngdocs', 'copy:site', 'copy:less_customizer',],
13+
'build': ['ngtemplates', 'concat', 'uglify', 'less', 'ngdocs', 'copy:font_dist', 'copy:site', 'copy:less_customizer',],
1414

1515
// Auto-test tasks for development
1616
'autotest:unit': ['karmangular:start'],

grunt/copy.js

+56
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,62 @@ module.exports = function ( grunt ) {
1818
}
1919
]
2020
},
21+
font_dist: {
22+
files: [
23+
{
24+
expand: true,
25+
cwd: 'src/font',
26+
src: '**/*.eot',
27+
dest: '<%= dist %>/release/'
28+
},
29+
{
30+
expand: true,
31+
cwd: 'src/font',
32+
src: '**/*.svg',
33+
dest: '<%= dist %>/release/'
34+
},
35+
{
36+
expand: true,
37+
cwd: 'src/font',
38+
src: '**/*.ttf',
39+
dest: '<%= dist %>/release/'
40+
},
41+
{
42+
expand: true,
43+
cwd: 'src/font',
44+
src: '**/*.woff',
45+
dest: '<%= dist %>/release/'
46+
}
47+
]
48+
},
49+
font_cut_release: {
50+
files: [
51+
{
52+
expand: true,
53+
cwd: '<%= dist %>/release/',
54+
src: '**/*.eot',
55+
dest: '<%= dist %>/release/' + currentTag
56+
},
57+
{
58+
expand: true,
59+
cwd: '<%= dist %>/release/',
60+
src: '**/*.svg',
61+
dest: '<%= dist %>/release/' + currentTag
62+
},
63+
{
64+
expand: true,
65+
cwd: '<%= dist %>/release/',
66+
src: '**/*.ttf',
67+
dest: '<%= dist %>/release/' + currentTag
68+
},
69+
{
70+
expand: true,
71+
cwd: '<%= dist %>/release/',
72+
src: '**/*.woff',
73+
dest: '<%= dist %>/release/' + currentTag
74+
}
75+
]
76+
},
2177
less_customizer: {
2278
files: [
2379
{

grunt/cut-release.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
cleanup: true,
44
keepUnstable: false,
55
stableTasks: [
6+
'copy:font_cut_release',
67
'copy:less_cut_release'
78
]
89
},
File renamed without changes.

grunt/fontello.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
},
55
dist: {
66
options: {
7-
config : 'src/font/config.json',
7+
config : 'grunt/font-config.json',
88
fonts : 'dist/release',
99
styles : '.tmp/font',
1010
scss : false

src/font/ui-grid.eot

10.1 KB
Binary file not shown.

src/font/ui-grid.svg

+56
Loading

src/font/ui-grid.ttf

9.92 KB
Binary file not shown.

src/font/ui-grid.woff

5.59 KB
Binary file not shown.

0 commit comments

Comments
 (0)