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

Favor FontFaceObserver

parent f41011bb
......@@ -73,7 +73,8 @@ const userPreferences = ({
return this;
},
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() {
document.fonts.add(font);
......
......@@ -4249,6 +4249,11 @@
"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": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
......
......@@ -47,6 +47,7 @@
"webpack-glob-entries": "^1.0.1"
},
"dependencies": {
"@babel/polyfill": "^7.0.0"
"@babel/polyfill": "^7.0.0",
"fontfaceobserver": "^2.1.0"
}
}
......@@ -12,8 +12,8 @@ const config = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
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