Commit f1a84439 authored by ROBERT PATRICK CAREY III's avatar ROBERT PATRICK CAREY III 🗿

Favor FontFaceObserver

parent f41011bb
...@@ -73,7 +73,8 @@ const userPreferences = ({ ...@@ -73,7 +73,8 @@ const userPreferences = ({
return this; return this;
}, },
fetchFontFace(params){ fetchFontFace(params){
var font = new FontFace(params.name, "url("+params.url+")"); let FontFaceObserver = require('fontfaceobserver');
let font = new FontFaceObserver(params.name, "url("+params.url+")");
font.load().then(function() { font.load().then(function() {
document.fonts.add(font); document.fonts.add(font);
......
...@@ -4249,6 +4249,11 @@ ...@@ -4249,6 +4249,11 @@
"readable-stream": "^2.0.4" "readable-stream": "^2.0.4"
} }
}, },
"fontfaceobserver": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.1.0.tgz",
"integrity": "sha512-ReOsO2F66jUa0jmv2nlM/s1MiutJx/srhAe2+TE8dJCMi02ZZOcCTxTCQFr3Yet+uODUtnr4Mewg+tNQ+4V1Ng=="
},
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"webpack-glob-entries": "^1.0.1" "webpack-glob-entries": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.0.0" "@babel/polyfill": "^7.0.0",
"fontfaceobserver": "^2.1.0"
} }
} }
...@@ -12,8 +12,8 @@ const config = { ...@@ -12,8 +12,8 @@ const config = {
module: { module: {
rules: [ rules: [
{ {
test: /\.js$/, test: /\.m?js$/,
exclude: /node_modules/, exclude: /(node_modules|bower_components)/,
use: { use: {
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment