git.psu.edu has been upgraded to 13.8.4. Please email support@git.psu.edu with any Gitlab problems. See the git.psu.edu yammer group for more information. 13.9.x will be soon.

Commit 1808a0c5 authored by ROBERT PATRICK CAREY III's avatar ROBERT PATRICK CAREY III 🗿

FontAPI + FontFaceObserver

parent dc82a5d6
...@@ -74,9 +74,10 @@ const userPreferences = ({ ...@@ -74,9 +74,10 @@ const userPreferences = ({
}, },
fetchFontFace(params){ fetchFontFace(params){
let FontFaceObserver = require('fontfaceobserver'); let FontFaceObserver = require('fontfaceobserver');
let font = new FontFaceObserver(params.name); let fontFace = new FontFaceObserver(params.name);
let font = new FontFace(params.name, "url("+params.url+")");
font.load().then(function() { fontFace.load().then(function() {
document.fonts.add(font); document.fonts.add(font);
}); });
}, },
......
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