A PowerShell tool for configuring Windows DPI scaling and font smoothing settings to improve text clarity.
Languages: English (this page) | Русский | Deutsch
FontSharpener modifies Windows registry settings related to DPI scaling and font smoothing. It is designed for users who experience blurry or poorly scaled fonts on high-DPI displays or after certain Windows updates.
Scope: Current user only (HKCU registry hive). No system-wide changes, no services installed.
Safety: Dual backup strategy (JSON files + registry underscore copies), dry-run mode, automatic elevation, idempotent operations.
# Preview changes (no modifications)
.\FontSharpener.ps1 -DryRun
# Apply 100% scaling (default)
.\FontSharpener.ps1
# Apply 125% scaling without prompts
.\FontSharpener.ps1 -ScalingPercent 125 -Force
# List all available backups
.\FontSharpener.ps1 -ListBackups
# Restore from a specific backup
.\FontSharpener.ps1 -Restore "C:\Users\YourName\Documents\FontSharpener-Backups\FontSharpener-backup-20250115-143022.json" -Force- Windows 10 or Windows 11
- PowerShell 5.1 or PowerShell 7+
- Administrator rights (script will auto-elevate if needed)
- Download
FontSharpener.ps1from the latest release - Save to a directory of your choice
- Run PowerShell as Administrator (or let the script auto-elevate)
| Parameter | Type | Default | Description |
|---|---|---|---|
-ScalingPercent |
int | 100 | Target DPI scaling: 100, 125, 150, or 175 |
-DryRun |
switch | - | Preview changes without applying |
-BackupPath |
string | Documents\FontSharpener-Backups\ | Custom backup directory or file |
-Restore |
string | - | Path to JSON backup file to restore from |
-Force |
switch | - | Skip confirmation prompts |
-ListBackups |
switch | - | Show all available backups and exit |
-Verbose |
switch | - | Show detailed operation output |
-WhatIf |
switch | - | Standard PowerShell what-if mode |
All changes are made under HKCU:\Control Panel\Desktop:
| Key | Value | Description |
|---|---|---|
DpiScalingVer |
0x00001000 (4096) |
DPI scaling state flag |
Win8DpiScaling |
0x00000001 (1) |
Enable Windows 8-style DPI scaling |
LogPixels |
96/120/144/168 |
DPI value based on -ScalingPercent |
FontSmoothing |
0x00000001 (1) |
Enable ClearType font smoothing |
Before any change, the script creates:
-
JSON backup file (default location:
%USERPROFILE%\Documents\FontSharpener-Backups\){ "SchemaVersion": 2, "Created": "2025-01-15T14:30:22", "ToolVersion": "2.0.0", "ScalingPercent": 100, "Values": { "DpiScalingVer": 4096, "Win8DpiScaling": 1, "LogPixels": 96, "FontSmoothing": 1 } } -
Registry underscore copies in the same registry location:
DpiScalingVer→DpiScalingVer_Win8DpiScaling→Win8DpiScaling_LogPixels→LogPixels_FontSmoothing→FontSmoothing_
# List available backups
.\FontSharpener.ps1 -ListBackups
# Restore from specific backup
.\FontSharpener.ps1 -Restore "$env:USERPROFILE\Documents\FontSharpener-Backups\FontSharpener-backup-20250115-143022.json"Or manually via PowerShell:
$regPath = 'HKCU:\Control Panel\Desktop'
$keys = 'DpiScalingVer', 'Win8DpiScaling', 'LogPixels', 'FontSmoothing'
foreach ($k in $keys) {
$bk = Get-ItemProperty -Path $regPath -Name "${k}_" -ErrorAction SilentlyContinue
if ($bk) {
Set-ItemProperty -Path $regPath -Name $k -Value $bk."${k}_"
}
}This documentation is available in multiple languages:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -ForceEnsure PowerShell is running as Administrator. The script will attempt auto-elevation, but manual elevation may be required in some environments.
Restore from backup:
.\FontSharpener.ps1 -ListBackups
.\FontSharpener.ps1 -Restore "<path-to-backup>" -ForceOr sign out and back in — some changes require session restart.
See CONTRIBUTING.md for guidelines.
See SECURITY.md for vulnerability reporting and security policy.
MIT License — see LICENSE file.
- Unified version combining Set-DpiScaling.ps1 and PR #1 features
- Added
-ScalingPercentparameter (100/125/150/175) - Added
-DryRun,-Force,-ListBackupsparameters - JSON backup format with schema version
- Automatic elevation support
- Full PSScriptAnalyzer compliance
- Multilingual documentation
- Initial release as Set-DpiScaling.ps1
- Basic registry modification with underscore backups