CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Ways of producing Anti-Aliased text

    I'm curious if there's any API in GDI or maybe GDI+ to produce an Anti-Aliased text?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+)
    Join Date
    Aug 2004
    Posts
    10,339

    Re: Ways of producing Anti-Aliased text

    I just binged for "Anti-Aliased text gdi".

    Gosh, google seemed to have some pretty good hits too.

    Have you seen them?

  3. #3
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: Ways of producing Anti-Aliased text

    Quote Originally Posted by Arjay View Post
    I just binged for "Anti-Aliased text gdi".

    Gosh, google seemed to have some pretty good hits too.

    Have you seen them?
    OK. Just Googled your search word... and got my own thread

    So, the whole idea is simply using

    lfQuality := ANTIALIASED_QUALITY;
    lfOutPrecision := OUT_TT_ONLY_PRECIS;

    when creating a text?

  4. #4
    Join Date
    Apr 2009
    Posts
    598

    Re: Ways of producing Anti-Aliased text

    If you specify lfQuality := ANTIALIASED_QUALITY; then Windows will look for a font having that quality. It will not change the pixels of characters.

    Nowadays, most of the fonts are antialiased fonts, because each glyph is defined with a path instead of being defined with a bitmap. That path tells to draw a straight line from a first point to another point, then to draw an arch to the next point, etc. True Type Fonts were created to hold paths (and maybe also bitmaps, I am not sure).

    If you have a font defined as a grid of pixels (I call it a bitmap font), then I don't know if it can be antialiased by Windows.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width