It is currently May 7th, 2021, 12:47 pm

Rainmeter and DPI in Windows 10

Tips and Tricks from the Rainmeter Community
User avatar
Posts: 21674
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Rainmeter and DPI in Windows 10

Post by jsmorley »

While this isn't going to go into all the ins and outs of how DPI (Dots Per Inch) works in Windows 10 , I did want to address one facet of it that can impact Rainmeter.
Dots per inch (DPI)) is the physical measurement of number of pixels in a linear inch of a display. DPI is a function of display resolution and size; a higher resolution or a smaller size will lead to higher DPI, and a lower resolution or a larger size will lead to lower DPI. When a display has a higher DPI, pixels are smaller and closer together, so that the user interface (UI) and other displayed content appears smaller than intended.

Windows ensures that everything appears on the screen at a usable and consistent size by instructing applications (including the Windows desktop shell) to resize their content by a scale factor. This number depends on the display DPI as well as other factors that impact the user’s perception of the display. Almost all desktop displays and most current laptop displays are in the range of 95-110 DPI; for these devices, no scaling is required, and Windows sets a scale factor of 100%. However, there are a number of new devices, particularly in the premium laptop and tablet markets, which have higher displays with over 200 DPI. For these devices, Windows sets higher scale factors to ensure that the user experience is comfortably viewable.

When you change the DPI scaling level for your displays, it changes the size of text, apps and other items to appear larger or smaller. A higher DPI level has everything appear larger, and a lower DPI level has everything appear smaller.

The default DPI level is 100% (96 DPI).
If Windows has automatically set the DPI level to 125%, which it may do on some high-resolution monitors, laptops and tablets, or if you prefer the 125% DPI level and set it manually, Rainmeter will obey that setting like any other Windows application.

However, that may not be what you want. Most of the skins you might download and use were almost certainly designed with a DPI setting of 100% (96 DPI) in mind. They may display much larger than the author intended, and not fit where they used to, and may be somewhat "pixelated" and ugly.

What you might want is to allow Windows (the Windows interface elements and application windows) to be at the 125% or even larger value, but have Rainmeter use 100% (96 DPI) for its skins. You can do that.

The setting for DPI is done in the Setting panels in Windows. Here we are set to 125%, which we want.
To change Rainmeter to ignore this and use 100% DPI, find the "shortcut" for Rainmeter, which you will find in your Startup folder in Windows:
Right-click that shortcut, and select "Properties". Under Properties, select the "Compatibility" tab, and check the box labeled "Disable display scaling on high DPI settings".

Restart Rainmeter using the shortcut.

Note that there are a couple of places in Rainmeter that won't be effected by this, since they are things that are not actually created and rendered by Rainmeter, but by Windows itself. These are the FontSize in InputText fields, and the size of context menus in skins. These will always use the DPI setting in Windows.
You do not have the required permissions to view the files attached to this post.
Posts: 3
Joined: January 29th, 2016, 2:23 pm

Re: Rainmeter and DPI in Windows 10

Post by Borck »

I implemented a rainmeter skin which supports HiDPI:
Posts: 3
Joined: September 17th, 2017, 11:39 pm

Re: Rainmeter and DPI in Windows 10

Post by socrates »

Thanks mate, this helped a lot. I've just posted this issue in the help section.
I have a dpi scaling of 150%, use a 80" TV as a HTPC monitor from about 8 feet away.
Posts: 1037
Joined: February 7th, 2016, 6:08 am

Re: Rainmeter and DPI in Windows 10

Post by dvo »

it doesn't matter how big your thing is's what you can do with it :) not even see a nixel ( transparant pixel ) :D :rofl: :oops:
same here 40 inch :P ;-)
Posts: 1
Joined: October 9th, 2018, 10:09 pm

Re: Rainmeter and DPI in Windows 10

Post by phcreery »

I have Microsoft Surface Pro 4 and default scaling is 200% and this trick worked perfectly.
You can also change it by:
Right Clicking C:\Program Files\Rainmeter\Rainmeter.exe > Properties > Compatability > etc
User avatar
Posts: 143
Joined: May 12th, 2019, 8:55 am

Re: Rainmeter and DPI in Windows 10

Post by Cariboudjan »

Made up this little trick to fix over-sized font when using InputText fields in Rainmeter.

Gets current DPI setting from the registry

This will result in accurate text for InputText fields regardless of the user's DPI setting or if they have Rainmeter set to DPI override — the only stipulation being that if Rainmeter is set to DPI override, that the user toggles #DPIOverride# to 1. This can be achieved with a built-in toggle switch in your skins.

Code: Select all


RegKey=Control Panel\Desktop\WindowMetrics

IfCondition=InputTextFontSize = 1.25
IfTrueAction=[!SetVariable InputFontSize 15][!Update]
IfCondition2=InputTextFontSize = 1.5
IfTrueAction2=[!SetVariable InputFontSize 13][!Update]
IfCondition3=InputTextFontSize = 1.75
IfTrueAction3=[!SetVariable InputFontSize 11][!Update]
IfCondition4=InputTextFontSize = 2
IfTrueAction4=[!SetVariable InputFontSize 9][!Update]
IfCondition5=InputTextFontSize = 2.25
IfTrueAction5=[!SetVariable InputFontSize 9][!Update]
IfCondition6=InputTextFontSize = 2.5
IfTrueAction6=[!SetVariable InputFontSize 8][!Update]
IfCondition6=InputTextFontSize > 2.5
IfTrueAction6=[!SetVariable InputFontSize 7][!Update]

Command1=[!SetVariable userInput "$UserInput$"][!Update]
User avatar
Posts: 195
Joined: September 3rd, 2018, 11:18 am

Re: Rainmeter and DPI in Windows 10

Post by Jeff »
Does the option on the actual .exe achieve the same thing or do you need to do it exclusively on the shortcut?
I would find it a bit more appealing to suggest on the actual exe rather than the shortcut
Also from what friends told me, the section is different in the latest windows 10 update, toggling the second option from the menu that pops up with the default values should do the job (I'm saying this as an "update the photo please" :P).