It is currently October 14th, 2019, 6:59 am

Improved font rendering with Direct2D

Changes made during the Rainmeter 3.0 beta cycle.
User avatar
jsmorley
Developer
Posts: 19543
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering with Direct2D

jsmorley » October 13th, 2013, 9:29 pm

Frostschaden wrote: So for example if I distribute my layout with D2D=0 under each skin, if they decide not to apply the layout, rather manually enable a skin themselves, will D2D=0 still be applied?
No, it will not. The use of D2D is something we want to be totally under the control of the end-user, not the author. In any case, nothing that is saved in the [ConfigName] section of Rainmeter.ini exists when you distribute a skin unless you include, and they load, a Layout.
Frostschaden
Posts: 90
Joined: January 26th, 2013, 9:11 pm

Re: Improved font rendering with Direct2D

Frostschaden » October 13th, 2013, 9:52 pm

Got it, so how about the text, is this actually the way it was supposed to appear all along, with GDI being at fault?
User avatar
jsmorley
Developer
Posts: 19543
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering with Direct2D

jsmorley » October 13th, 2013, 10:00 pm

Frostschaden wrote:Got it, so how about the text, is this actually the way it was supposed to appear all along, with GDI being at fault?
In a sense, yes. GDI+ is kinda "washed out" in my view, and the difference with D2D is striking. The problem (at least in my skins) is that I had compensated for this before by using StringStyle=Bold a lot, and using bright colors like 255,255,255. With D2D, I find I don't need the Bold, and I can better control the brightness of the font by using colors (like maybe 245,245,245 in my example above).

On balance though, the quality of the string, particularly at smaller sizes is something I really love with D2D, and I for one would never go back to the old washed out, indistinct fonts I had before.

GDI+:
gdi.jpg
D2D:
d2d.jpg
You do not have the required permissions to view the files attached to this post.
Frostschaden
Posts: 90
Joined: January 26th, 2013, 9:11 pm

Re: Improved font rendering with Direct2D

Frostschaden » October 13th, 2013, 10:27 pm

I definitely like the quality on the smaller text as well and the contrast issue can fixed with fontcolor like you mentioned. It just seems like some fonts take better to the new rendering than others.
User avatar
jsmorley
Developer
Posts: 19543
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering with Direct2D

jsmorley » October 13th, 2013, 10:31 pm

Frostschaden wrote:I definitely like the quality on the smaller text as well and the contrast issue can fixed with fontcolor like you mentioned. It just seems like some fonts take better to the new rendering than others.
That may be, and there may be differences depending on the quality and resolution of your monitor that can play a role. In addition, beauty is in the eye of the beholder, and it isn't our intention to tell folks what they should and shouldn't like. I personally would never, ever use GDI+ with any font in Rainmeter, and won't ever again. But my particular skins, and my particular hardware, and my lousy old eyes, and all those drugs I did in the 70's, may factor into that.
Frostschaden
Posts: 90
Joined: January 26th, 2013, 9:11 pm

Re: Improved font rendering with Direct2D

Frostschaden » October 13th, 2013, 10:56 pm

Well regardless of my personal preference, I'd have to agree it's still an improvement.
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Improved font rendering with Direct2D

rm_lion » May 11th, 2014, 3:06 am

Hi!

I have a string meter with solid Color and I wanted to use a leading and a trailing space to make the field of the solid Color a bit wider. It didn't work. I did search the Forum and i found many articles about this Topic. And I also found this post of jsmorley:http://rainmeter.net/forum/viewtopic.php?f=111&t=15237&p=90817&hilit=trailing+spaces#p90817.

I also tried the simple meter of jsmorley " Mad Dogs and Englishmen ", but the trailing space isn't displayed.

Code: Select all

[Rainmeter]
Update=1000

[Variables]
SomeVar=Mad Dogs and Englishmen

[MeterOne]
Meter=String
FontSize=14
FontColor=0,0,0,255
SolidColor=150,150,150,255
AntiAlias=1
Text=" #SomeVar# "
In the attached Picture you can see that i'm running the newest Version and D2D Rendering is activated.

Help please.
You do not have the required permissions to view the files attached to this post.
User avatar
VasTex
Posts: 408
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: Improved font rendering with Direct2D

VasTex » May 11th, 2014, 3:35 am

You'd be better off not using spaces at all as trailing spaces tend to be removed as many applications (Rainmeter included) have a habbit of assuming Trailing spaces are accidental.

I would suggest using the Padding option instead. This will essentially extend the 'solid color' region without actually extending the area for the text, thus spacing. So simply add a line similar to this into your string meters where the parameters are equal to:

Padding=Left Buffer, Top Buffer, Right Buffer, Bottom Buffer

Padding=5,5,5,5 *This will add a 'space' of 5 pixels on every side of the text.
Padding=5,0,5,0 *This will add a 'space' of 5 pixels on the Left and Right sides of the text.
Padding=0,5,0,5 *This will add a 'space' of 5 pixels on the Top and Bottom sides of the text.

Keep in mind that if you have a set Height and Width for a meter this setting will effect those numbers as a whole.

For example:

[MeterStuff]
Meter=String
X=0
Y=0
W=100
H=60
Padding=5,5,5,5

Although the actual values of Height and Width remain the same the 'true' Height and Width of the meter is Height+Top Padding+Bottom Padding (70) and Width+Left Padding+Right Padding (110).

Hope this helps! :thumbup:
Last edited by VasTex on May 11th, 2014, 4:06 am, edited 1 time in total.
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Improved font rendering with Direct2D

rm_lion » May 11th, 2014, 4:01 am

Thank you VasTex.

I like it with (8,1,8,1). :D
It's better than using spaces because I can make it exactly the way i want it.
In my case I don't use Width and Height. And the meter size is dynamic. Nevertheless thanks for the hint.
I just had to slightly change the formula which I use for the dynamic positioning of this StringMeter.

Thx a lot again for the fast and good Response. :thumbup:
User avatar
VasTex
Posts: 408
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: Improved font rendering with Direct2D

VasTex » May 11th, 2014, 4:08 am

Glad to help!
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011