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:
+3
-1
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user