Skip to content

Commit

Permalink
Handle the error if we can't read ligatures from a font
Browse files Browse the repository at this point in the history
Fixes #402
  • Loading branch information
sedwards2009 committed May 5, 2023
1 parent 78fefdc commit fe3fe0c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main/src/Window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,13 @@ export class Window implements Disposable {

let ligatureMarker: LigatureMarker = null;
if (config.terminalDisplayLigatures && fontInfo.path != null) {
const plainLigatureMarker = await loadFontFile(fontInfo.path);
if (plainLigatureMarker != null) {
ligatureMarker = new CachingLigatureMarker(plainLigatureMarker);
try {
const plainLigatureMarker = await loadFontFile(fontInfo.path);
if (plainLigatureMarker != null) {
ligatureMarker = new CachingLigatureMarker(plainLigatureMarker);
}
} catch(ex) {
this._log.warn(`Unable to read ligature data from font. Error was '${ex.message}'`);
}
}

Expand Down

0 comments on commit fe3fe0c

Please sign in to comment.