2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Fixes #9925: convert font data to base64, fixing 0xefbfbd (Unicode Replacement Character) chars in customizer fonts.

Merges #9982
This commit is contained in:
herom
2013-08-21 14:16:45 +04:30
committed by Chris Rebert
parent 58a47b6bfd
commit aad70834fc
4 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -3,6 +3,7 @@
module.exports = function(grunt) {
"use strict";
var btoa = require('btoa')
// Project configuration.
grunt.initConfig({
@@ -209,7 +210,8 @@ module.exports = function(grunt) {
return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
return files[path] = fs.readFileSync(type + '/' + path, 'utf8')
return type == 'fonts' ? files[path] = btoa(fs.readFileSync(type + '/' + path)) :
files[path] = fs.readFileSync(type + '/' + path, 'utf8')
})
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
}