Created
December 4, 2019 01:37
-
-
Save technoscavenger/407c0683aa794316a174eb6d433fa289 to your computer and use it in GitHub Desktop.
Enable ClearType using PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$signature = @' | |
[DllImport("user32.dll")] | |
public static extern bool SystemParametersInfo( | |
uint uiAction, | |
uint uiParam, | |
uint pvParam, | |
uint fWinIni); | |
'@ | |
$SPI_SETFONTSMOOTHING = 0x004B | |
$SPI_SETFONTSMOOTHINGTYPE = 0x200B | |
$SPIF_UPDATEINIFILE = 0x1 | |
$SPIF_SENDCHANGE = 0x2 | |
$FE_FONTSMOOTHINGCLEARTYPE = 0x2 | |
$winapi = Add-Type -MemberDefinition $signature -Name WinAPI -PassThru | |
[void]$winapi::SystemParametersInfo($SPI_SETFONTSMOOTHING, 1, 0, $SPIF_UPDATEINIFILE -bor $SPIF_SENDCHANGE) | |
[void]$winapi::SystemParametersInfo($SPI_SETFONTSMOOTHINGTYPE, 0, $FE_FONTSMOOTHINGCLEARTYPE, $SPIF_UPDATEINIFILE -bor $SPIF_SENDCHANGE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment