It is currently September 21st, 2019, 1:37 am

Improved font rendering with Direct2D

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

Re: Improved font rendering

jsmorley » April 1st, 2013, 11:10 pm

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: 1851
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

moshi » April 1st, 2013, 11:14 pm

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: 19467
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

jsmorley » April 1st, 2013, 11:25 pm

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: 1851
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

moshi » April 1st, 2013, 11:44 pm

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

Re: Improved font rendering

jsmorley » April 2nd, 2013, 11:09 am

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: 19467
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

jsmorley » April 2nd, 2013, 12:47 pm

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: 1851
Joined: November 13th, 2012, 9:53 pm

Re: Improved font rendering

moshi » April 2nd, 2013, 1:42 pm

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: 19467
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Improved font rendering

jsmorley » April 2nd, 2013, 1:48 pm

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: 118
Joined: June 20th, 2012, 12:44 am

Re: Improved font rendering

iNjUST » April 6th, 2013, 6:22 pm

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: 2877
Joined: April 17th, 2009, 12:18 pm

Re: Improved font rendering

poiru » April 7th, 2013, 10:37 am

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.