Merge pull request #4387 from LabhanshAgrawal/ligatures-electron

Enable ligatures addon on electron
This commit is contained in:
Daniel Imms
2023-08-01 04:57:16 -07:00
committed by GitHub
+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();