Enable ligatures addon on electron

This commit is contained in:
Labhansh Agrawal
2023-02-23 23:49:40 +05:30
parent 9154831afa
commit a8cec5f02f
+1 -1
View File
@@ -65,7 +65,7 @@ export default async function load(fontFamily: string, cacheSize: number): Promi
}
}
// Latest proposal https://bugs.chromium.org/p/chromium/issues/detail?id=1312603
else if (typeof process !== 'object' && 'queryLocalFonts' in window) {
else if (typeof window !== 'undefined' && 'queryLocalFonts' in window) {
const fonts: Record<string, IFontMetadata[]> = {};
try {
const fontsIterator = await (window as any).queryLocalFonts();