It is currently March 29th, 2024, 7:03 am

Improved font rendering with Direct2D

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

Re: Improved font rendering

Post by jsmorley »

Hmm... Now I am at a loss for why this is misbehaving. According to FontCreator, it should be fine with FontFace=Source Sans Pro Semibold.
4-1-2013 7-09-01 PM.png
If you look at SourceSansPro-Bold.ttf in that set, you will see what I mean.
4-1-2013 7-13-04 PM.png
That one requires:

FontFace=Source Sans Pro
StringStyle=Bold
You do not have the required permissions to view the files attached to this post.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

Post by moshi »

yeah, but font name and font family might mean something different for GDI and Direct2D, probably due to the limitations of the TTF format back in the days when Windows and Mac TTF fonts had the same file extension but were incompatible.

like GDI:

Verdana
font family: Verdana
font weight: regular

Verdana Bold
font family: Verdana
font weight: bold

Verdana Semibold
font family: Verdana Semibold
font weight: regular



and Direct2D (this is just a guess)

Verdana
font family: Verdana
font weight: regular

Verdana Bold
font family: Verdana
font weight: bold

Verdana Semibold
font family: Verdana
font weight: demi


Untitled-1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

Post by jsmorley »

Yes, I suspect it is some difference in how GDI+ and D2D treat the "full font name", "family name" and "subfamily name" that we need to explore. I don't think "font weight" as such is a factor. The special attributes of a font seem to be driven by the "subfamily name", at least in GDI+. Something is different, and I have no doubt we will track it down.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

Post by moshi »

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

Post by jsmorley »

Also, while there are issues with positioning and even (as you say) some "kerning" differences we need to look at, in my opinion the difference in quality is striking... I think the difference in quality is more pronounced on Windows 8 than it is on Windows 7.

GDI:
GDI.jpg
D2D:
D2D.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

Post by jsmorley »

BTW, here is a better version of the skin to test fonts... Just for the heck of it.
TestFonts_1.0.rmskin
4-2-2013 8-45-41 AM.png
You do not have the required permissions to view the files attached to this post.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

Post by moshi »

jsmorley wrote:Also, while there are issues with positioning and even (as you say) some "kerning" differences we need to look at, in my opinion the difference in quality is striking... I think the difference in quality is more pronounced on Windows 8 than it is on Windows 7.
kerning is the space between individual letters. i don't think that you would need to look at it or that it is something that should be altered by Rainmeter. it's just different, might just as well be the same, but look "wrong" due to the higher contrast Direct2D seems to use. maybe it can be influenced with cttune.exe.

it's really personal taste. personally i do not really like the more "edgy" look of Direct2D. i can only imagine how ugly it would look on a retina display compared with OSX or FreeType font rendering.

my biggest concern is the different heights they have. nightmare if you work with section variables.
Untitled-1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

Post by jsmorley »

moshi wrote: kerning is the space between individual letters. i don't think that you would need to look at it or that it is something that should be altered by Rainmeter. it's just different, might just as well be the same, but look "wrong" due to the higher contrast Direct2D seems to use. maybe it can be influenced with cttune.exe.

it's really personal taste. personally i do not really like the more "edgy" look of Direct2D. i can only imagine how ugly it would look on a retina display compared with OSX or FreeType font rendering.

my biggest concern is the different heights they have. nightmare if you work with section variables.
Untitled-1.jpg
The issue with "padding", both width and height, that differs from GDI to D2D is a known issue that we are working on. I expect all that to be resolved soon.
User avatar
iNjUST
Posts: 117
Joined: June 20th, 2012, 12:44 am

Re: Improved font rendering

Post by iNjUST »

So I just tested out the D2D feature on the many skins I have running on my desktop, and I found an interesting quirk: one of my skins that involves zero String meters does not render properly under D2D, but works fine otherwise on the 3.0 r1871 beta.

The skin is my Continue Time clock that you can find here on dA: http://fav.me/d5flqmh
continuetime_RM30_D2D.png
You do not have the required permissions to view the files attached to this post.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Improved font rendering

Post by poiru »

iNjUST wrote:So I just tested out the D2D feature on the many skins I have running on my desktop, and I found an interesting quirk: one of my skins that involves zero String meters does not render properly under D2D, but works fine otherwise on the 3.0 r1871 beta.
This seems to be due to TransformationMatrix, which does not work with D2D yet. It should work fine in the next beta.