From 0577abd88525f03bc067d84a6a85f071761006d6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 21 Feb 2020 11:17:18 +0000 Subject: [PATCH] Hopefully enable subpixel font rendering https://github.com/vector-im/riot-web/issues/12443 points out the electron eccentricity that the background of a BrowserWindow is 'transparent' (whatever that actually means in practice) by default which causes subpixel font rendering to be disabled. Set an explicit background colour as per the faq entry. Fixes https://github.com/vector-im/riot-web/issues/12443 --- src/electron-main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/electron-main.js b/src/electron-main.js index a23a04b..35276ef 100644 --- a/src/electron-main.js +++ b/src/electron-main.js @@ -592,6 +592,9 @@ app.on('ready', async () => { const preloadScript = path.normalize(`${__dirname}/preload.js`); mainWindow = global.mainWindow = new BrowserWindow({ + // https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do + backgroundColor: '#fff', + icon: iconPath, show: false, autoHideMenuBar: store.get('autoHideMenuBar', true),