Edge doesn't support document fonts

pull/75/head
Sheng 2019-06-22 13:35:30 +08:00
parent 8fce3db5d2
commit 5daca37f5c
1 changed files with 9 additions and 7 deletions

View File

@ -43,7 +43,7 @@ jQuery(function($){
title_element = document.querySelector('title'), title_element = document.querySelector('title'),
form_id = '#connect', form_id = '#connect',
debug = document.querySelector(form_id).noValidate, debug = document.querySelector(form_id).noValidate,
custom_font = document.fonts.values().next().value, custom_font = document.fonts ? document.fonts.values().next().value : undefined,
default_fonts, default_fonts,
DISCONNECTED = 0, DISCONNECTED = 0,
CONNECTING = 1, CONNECTING = 1,
@ -739,6 +739,7 @@ jQuery(function($){
window.Terminal.applyAddon(window.fullscreen); window.Terminal.applyAddon(window.fullscreen);
} }
if (document.fonts) {
document.fonts.ready.then( document.fonts.ready.then(
function () { function () {
if (custom_font_is_loaded() === false) { if (custom_font_is_loaded() === false) {
@ -746,6 +747,7 @@ jQuery(function($){
} }
} }
); );
}
restore_items(fields); restore_items(fields);