Re: [cairo] Pango+Cario : proper font rendering under Win32

On Thu, 2006-01-05 at 13:09 +0100, Timoth�Lecomte wrote:

> Under Linux, the result is good, the fonts are properly antialiased.
> However, under MS-Windows (with binary snapshots of 
> cairo1.0.2/pango1.10.1 distributed at 
>, the same code gives uglier 
> results, with black text "over-antialiased" with a subpixel method.
> Here are screenshots :
> (linux, various fonts, result satisfying)
> (windows, using font "Sans", size 15)

I don't see huge problems with your results, actually.

But there's a general problem that text rendering antialiasing only
works fully correctly in Windows if you draw directly to a no-alpha
target surface with a mode of OVER and a solid color. Anything else,
Pango needs to extract a mask from the windows text and draw with that,
and then the Gamma correction that Windows text gets in the way
rather than helping.

(You'll see far worse results for white-on-black generally than 
for black-on-white.)

I'd try writing the simplest possible Cairo program that draws text
and see how the text there looks ... if it looks OK, you are probably
running into the above problem. If not, I don't know what is going

Most of the font options aren't honored in the Windows backend, but
even if they were, the defaults should give you text that matches
the system when possible.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]