Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7192807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:01:28+00:00 2026-05-28T20:01:28+00:00

My new application will feature a rich interface which should be resizable on-the-fly uses

  • 0

My new application will feature a rich interface which should be resizable on-the-fly uses transparent icons/images etc. For this application I’m trying to decide on using the new Direct2D API against the good old GDI. One of the downsides is of course it does not run on XP, although I’ve found a bit nastier issues to decide upon:

  1. I noticed that outputting text in a Direct2D environment seems a bit blurry (although marketed as a feature). Just look at the text in Firefox 4 with hardware acceleration enabled (or IE9). It seems to be due to the fact that in Direct2D text does not adhere to the (pixel) grid like GDI does. Is there a way to force Direct2D to make it adhere to the pixel grid and thus fixing this issue?

  2. Is there really such an improvement in speed? I tried to understand this article and what I make from it is that in Windows 7 and XP (not Vista?) the GDI is already hardware accelerated where it can. E.g. in my application I use a lot of memory DC’s which are just BitBlted into place and drawing transparent images/anti-aliased lines etc are being drawn using AlphaBlend. And that last one is definitely hardware accelerated since I measured speed while testing my routines.

So where would you put your money? Is Direct2D worth the hassle or would you just stick to the good old GDI? Or would you suggest something else?

Note: I’m programming in C++ btw, no use of MFC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:01:32+00:00Added an answer on May 28, 2026 at 8:01 pm

    The fix to your problem is very simple. Direct2D is highly configurable, and that includes text rendering and hinting. If you want to make it render text to match GDI’s rendering (that is, very tight pixel alignment) just:

    • Call the SetTextRenderingParams function on the render target http://msdn.microsoft.com/en-us/library/windows/desktop/dd316898%28v=vs.85%29.aspx
    • Pass in an IDWriteRenderingParams on which you can call SetRenderingMode with the value of GDI_CLASSIC or GDI_NATURAL (natural is recommended). This object can also be configured in a variety of other ways, including variable ClearType, gamma, and contrast.

    Since the other answer went out of its way to be most unhelpful and bash the rendering in Direct2D, let me provide another overview of Direct2D’s text rendering. It is very, very good. Unlike on the Mac, where they basically do not hint fonts and the text actually comes out as blurry, Direct2D by default strongly hints in the Y direction only. This makes sense since your monitor probably has about 96 dpi vertically, but with sub-pixel anti-aliasing the horizontal resolution is beyond the range of reasonable human perception. It is also a lot more subtle in its ClearType usage and hinting than GDI was. The edges of GDI text tend to be very colorful compared to Direct2D. I find GDI text very harsh-looking nowadays and much prefer the Direct2D text in Firefox and IE for long reading sessions.

    Therefore, there are several reasons that the default mode probably appears “blurry” to you.

    1. First of all, take the time to run the ClearType tuner program in the control panel. You will be amazed at the difference in Direct2D programs.
    2. No matter how good it is, it will always appear strange when you place it next to GDI-spaced text in your application. Try making everything in the UI one or the other, or clearly distinguish the content area from the other areas. If you decide to make everything GDI-spaced, just use the method I described above to set Direct2D to GDI-spaced text mode.
    3. You haven’t installed all available updates from Windows Update. There have been several for DirectWrite and IE. Make sure you install them all and restart to see the improvements.
    4. You just haven’t gotten used to it yet.
    5. It’s in your head. Really. Once you start thinking about text rendering a lot, you’ll probably find yourself noticing “problems” that aren’t there. The other answer to this question is the perfect example. He states that he thinks the text in Visual Studio 2010 is blurrier than 2008, but they are actually pixel perfect copies. Don’t believe me? The VS developers actually provided some comparisons yourself. I bet you can’t tell the difference. http://blogs.msdn.com/b/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a new application which will be using SQL Merge Replication over
My application has a photobooth feature which will allow the user to take a
I want to write a new application that will use a DBMS. In the
I am starting to build a new web application that will require user accounts.
This will be simple for you guys: var uri = new Uri(pack://application:,,,/LiftExperiment;component/pics/outside/elevator.jpg); imageBitmap =
Background In Visual Studio 2008 Create a new Windows Forms Application, this will create
If my application is out of memory when i call new() i will get
I wonder how long will an ASP.NET (MVC) application run, when no new requests
I deployed my ASP.NET application under an existing virtual directory. The new deployment will
We have an internal Flex application which has been designed more through feature creep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.