From 8a3f7e95d207c49a6576b387d50a43d7ece7c585 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Mon, 6 May 2024 10:00:49 -0700 Subject: [PATCH] feat: add disable-lcd-text flag (#211716) --- src/main.js | 5 ++++- src/vs/platform/environment/common/argv.ts | 1 + src/vs/platform/environment/node/argv.ts | 1 + src/vs/workbench/electron-sandbox/desktop.contribution.ts | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 90de17b278b..9fe5654081d 100644 --- a/src/main.js +++ b/src/main.js @@ -202,7 +202,10 @@ function configureCommandlineSwitchesSync(cliArgs) { 'disable-hardware-acceleration', // override for the color profile to use - 'force-color-profile' + 'force-color-profile', + + // disable LCD font rendering, a Chromium flag + 'disable-lcd-text' ]; if (process.platform === 'linux') { diff --git a/src/vs/platform/environment/common/argv.ts b/src/vs/platform/environment/common/argv.ts index f8d2ed05f8c..ba2a22ea621 100644 --- a/src/vs/platform/environment/common/argv.ts +++ b/src/vs/platform/environment/common/argv.ts @@ -129,6 +129,7 @@ export interface NativeParsedArgs { 'inspect'?: string; 'inspect-brk'?: string; 'js-flags'?: string; + 'disable-lcd-text'?: boolean; 'disable-gpu'?: boolean; 'disable-gpu-sandbox'?: boolean; 'nolazy'?: boolean; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 91b5d5aeaba..3b6f55bd851 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -120,6 +120,7 @@ export const OPTIONS: OptionDescriptions> = { 'inspect-extensions': { type: 'string', allowEmptyValue: true, deprecates: ['debugPluginHost'], args: 'port', cat: 't', description: localize('inspect-extensions', "Allow debugging and profiling of extensions. Check the developer tools for the connection URI.") }, 'inspect-brk-extensions': { type: 'string', allowEmptyValue: true, deprecates: ['debugBrkPluginHost'], args: 'port', cat: 't', description: localize('inspect-brk-extensions', "Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI.") }, + 'disable-lcd-text': { type: 'boolean', cat: 't', description: localize('disableLCDText', "Disable LCD font rendering.") }, 'disable-gpu': { type: 'boolean', cat: 't', description: localize('disableGPU', "Disable GPU hardware acceleration.") }, 'disable-chromium-sandbox': { type: 'boolean', cat: 't', description: localize('disableChromiumSandbox', "Use this option only when there is requirement to launch the application as sudo user on Linux or when running as an elevated user in an applocker environment on Windows.") }, 'sandbox': { type: 'boolean' }, diff --git a/src/vs/workbench/electron-sandbox/desktop.contribution.ts b/src/vs/workbench/electron-sandbox/desktop.contribution.ts index ff0aeec2494..2115ddfecc0 100644 --- a/src/vs/workbench/electron-sandbox/desktop.contribution.ts +++ b/src/vs/workbench/electron-sandbox/desktop.contribution.ts @@ -356,6 +356,10 @@ import { MAX_ZOOM_LEVEL, MIN_ZOOM_LEVEL } from 'vs/platform/window/electron-sand type: 'string', description: localize('argv.locale', 'The display Language to use. Picking a different language requires the associated language pack to be installed.') }, + 'disable-lcd-text': { + type: 'boolean', + description: localize('argv.disableLcdText', 'Disables LCD font antialiasing.') + }, 'disable-hardware-acceleration': { type: 'boolean', description: localize('argv.disableHardwareAcceleration', 'Disables hardware acceleration. ONLY change this option if you encounter graphic issues.')