Enable/disable ClearType in Windows7

前端 未结 8 1384
栀梦
栀梦 2021-01-04 12:00

Hi I need to enable/disable Cleartype (or \"Adjust the appearance and performance of Windows > Smooth edges of screen fonts\") via cmd (or any script like VBS/JS) or from re

8条回答
  •  离开以前
    2021-01-04 12:08

    Python version:

    # make sure you install pywin32 
    # from http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
    import win32con
    import win32gui
    
    win32gui.SystemParametersInfo(win32con.SPI_SETFONTSMOOTHING, True, 0) # enable only
    win32gui.SystemParametersInfo(win32con.SPI_SETFONTSMOOTHINGTYPE,
            win32con.FE_FONTSMOOTHINGCLEARTYPE,
            win32con.SPIF_UPDATEINIFILE | win32con.SPIF_SENDCHANGE)
    

提交回复
热议问题