Skip to content

Instantly share code, notes, and snippets.

@PureOcean
Last active March 16, 2022 16:07
Show Gist options
  • Save PureOcean/7fa021ce9407be258aacf09f3de70c98 to your computer and use it in GitHub Desktop.
Save PureOcean/7fa021ce9407be258aacf09f3de70c98 to your computer and use it in GitHub Desktop.
"Standart Font Smotthing" for Windows (Disable Cleartype, Enable GDI font rendering)
@echo off
:: Enable the "Standart Font Smoothing" instead of ClearType
Reg.exe add "HKCU\Control Panel\Desktop" /v "FontSmoothing" /t REG_SZ /d "2" /f
Reg.exe add "HKCU\Control Panel\Desktop" /v "FontSmoothingType" /t REG_DWORD /d "1" /f
Reg.exe add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v "FontSmoothing" /t REG_SZ /d "2" /f
Reg.exe add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v "FontSmoothingType" /t REG_DWORD /d "1" /f
:: The anti-aliased Segoe UI system font is substituted with Arial, which makes text appear sharp in classic based GDI.
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes" /v "Segoe UI" /t REG_SZ /d "Arial" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes" /v "Segoe UI Bold" /t REG_SZ /d "Arial Bd" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Segoe UI (TrueType)" /t REG_SZ /d "arial.ttf" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Segoe UI Bold (TrueType)" /t REG_SZ /d "arialbd.ttf" /f
pause
:: Sources:
:: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.systeminformation.fontsmoothingtype?view=windowsdesktop-5.0#remarks
:: http://superuser.com/a/945614
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment