I am making a skin that mimics Windows 11 design down to the pixel.
And I found out that the font used is 'Segoe UI Variable'.
The letter height should be 10 pixels precisely to match.
But no matter the size I set it to in the skin, it does not match.
Its either 9 or 11 pixels heigh.
You might think I'm nitpicking, and how much of a difference does one pixel really make.
But that one pixel have a even bigger impact on the other dimension.
And when you look at it, side by side, it's truly obvious.
I just wonder where the disconnect is.
Like, how come, when in Photoshop I can set it to 12 and have it be 10 pixels high, but not in RM?
This post by @lilshizzy goes over the EXCACT same issue:
https://forum.rainmeter.net/viewtopic.php?t=8988
He even needed his font to be 10 pixels high like I do.
But different font, and that was 11 years ago.
So I am bumping that post here to see if we gathered some experience from then to now to remedy this somehow.
It is currently September 1st, 2024, 2:31 am
Segoe UI Variable font - can't get the correct size.
-
- Posts: 426
- Joined: February 8th, 2015, 10:07 pm
- Location: EU, Denmark.
Segoe UI Variable font - can't get the correct size.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 2731
- Joined: March 23rd, 2015, 5:26 pm
Re: Segoe UI Variable font - can't get the correct size.
Under your Windows Display Settings, do you have your scale set to 100%, or something else?StArL0rd84 wrote: ↑November 20th, 2022, 8:42 am I am making a skin that mimics Windows 11 design down to the pixel.
And I found out that the font used is 'Segoe UI Variable'.
The letter height should be 10 pixels precisely to match.
But no matter the size I set it to in the skin, it does not match.
Its either 9 or 11 pixels heigh.
You might think I'm nitpicking, and how much of a difference does one pixel really make.
But that one pixel have a even bigger impact on the other dimension.
And when you look at it, side by side, it's truly obvious.
I just wonder where the disconnect is.
Like, how come, when in Photoshop I can set it to 12 and have it be 10 pixels high, but not in RM?
The reason I ask is that at 8 points, the Sego UI Variable font on my machine -- which is at 100% scaling -- is exactly 10 pixels for the letter/symbol height. (I am assuming you don't care about the "white space" above and below the letters; in the below code/screenshot, I tinted the background red so you could see the actual font height including the white space.)
Code: Select all
[Rainmeter]
AccurateText=1
BackgroundMode=2
DynamicWindowSize=1
SolidColor=0,0,0,255
Update=1000
[StyleText]
AntiAlias=1
FontFace="Segoe UI Variable"
FontColor=255,255,255
MeasureName=MeasureString
SolidColor=255,0,0,64
X=0
Y=20r
[MeasureString]
Measure=String
String="The quick brown fox jumps over the lazy dog."
[Meter1]
Meter=String
MeterStyle=StyleText
FontSize=6
Text="%1 = 6pt 8px"
X=0
Y=0
[Meter2]
Meter=String
MeterStyle=StyleText
FontSize=7
Text="%1 = 7pt 9px"
[Meter3]
Meter=String
MeterStyle=StyleText
FontSize=8
Text="%1 = 8pt 10px"
[Meter4]
Meter=String
MeterStyle=StyleText
FontSize=9
Text="%1 = 9pt 12px"
[Meter5]
Meter=String
MeterStyle=StyleText
FontSize=10
Text="%1 = 10pt 13px"
You do not have the required permissions to view the files attached to this post.
-
- Posts: 426
- Joined: February 8th, 2015, 10:07 pm
- Location: EU, Denmark.
Re: Segoe UI Variable font - can't get the correct size.
Hmm, must be something else than scale. Maybe something's different on my Windows build.SilverAzide wrote: ↑November 20th, 2022, 4:14 pm Under your Windows Display Settings, do you have your scale set to 100%, or something else?
The reason I ask is that at 8 points, the Sego UI Variable font on my machine -- which is at 100% scaling -- is exactly 10 pixels for the letter/symbol height. (I am assuming you don't care about the "white space" above and below the letters; in the below code/screenshot, I tinted the background red so you could see the actual font height including the white space.)
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 2731
- Joined: March 23rd, 2015, 5:26 pm
Re: Segoe UI Variable font - can't get the correct size.
Oh wait... you are not including the descenders, based on how you drew your selection boxes. So you are looking for 10 pixels between the baseline and the ascent. So that would be the 10 point font in my screenshot.StArL0rd84 wrote: ↑November 21st, 2022, 5:32 pm Hmm, must be something else than scale.
Maybe something's different on my Windows build.
You drew your last selection box "incorrectly"; you chopped off one pixel in height (the top of the "l" and "d" in "lazy dog" is one pixel taller than your box). I don't know why the numbers are not tall as letters at 10 points. At 11 points, the numbers (and letters) are both 11 pixels in height, which is more than you wanted.
The only way I know of to get the exact 10px height for numbers that you wanted is to cheat. And by cheat, I mean use TransformationMatrix. Adding a very tiny amount to the scaling of the meter will keep the font height the same, but the numbers will be 10 pixels in height just like the letters. For example, scale the height to 102% (leave the width at 100%):
TransformationMatrix=1.00;0;0;1.02;0;0
-
- Posts: 1583
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Segoe UI Variable font - can't get the correct size.
Not something I've tried, but I remember seeing in word processors about setting font size as say *.5, does Rainmeter accept decimals wrt font sizing? Maybe that could help.
![Welcome :welcome:](./images/smilies/bs.gif)
-
- Developer
- Posts: 2723
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Segoe UI Variable font - can't get the correct size.
Rainmeter does not accept decimal values for the FontSize or InlineSetting "Size" options......at least not yet....
Obviously there will be slight differences with different fonts, DPI settings, screen resolution settings, etc. Also, the AccurateText option might affect the output a little as well.
You do not have the required permissions to view the files attached to this post.