You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
componentDidUpdate(prevProps, prevState) {
if (prevState.activeFontFamily !== this.state.activeFontFamily) {
const font = new FontFaceObserver(this.state.activeFontFamily);
font.load().then(() => {
console.log(`${this.state.activeFontFamily} has loaded`);
}, () => {
console.log(`${this.state.activeFontFamily} is not available`);
});
}
}
Is there a way to know when the new selected font has been loaded? In case of using a canvas for the rendering. Thanks!
The text was updated successfully, but these errors were encountered: