[cairo] Win32 fonts rendered without antialisasing on Win2K, with under Wine
Gerdus van Zyl
gerdusvanzyl at gmail.com
Mon Nov 3 04:48:32 PST 2008
It is my experience that cairo/pango only give you ant-aliased text when
cleartype is enabled in windows. Which is nice and expected since the font
rendering is consistent with other apps on the system. Please see the
attached image for combinations and how they look on my system. Note also
that windows font anti-aliasing is less aggresive than apple or linux so if
you compare it side by side it just might look not anti-aliased.
Try disabling anti-aliasing to see if there's a difference:
fo = cairo.FontOptions()
fo.set_antialias(cairo.ANTIALIAS_NONE)
pangocairo.context_set_font_options(layout.get_context(),fo)
~Gerdus van Zyl
On Mon, Nov 3, 2008 at 12:30 PM, Peter Clifton <pcjc2 at cam.ac.uk> wrote:
> On Sat, 2008-11-01 at 15:24 +0000, Peter Clifton wrote:
> > Hi,
> >
> > I'm struggling to identify where I need to be looking next to debug
> this
> > further. I've got a GTK CAD application which I cross-compiled for
> > Windows, and have been testing it under wine. We're using pango +
> cairo
> > for text rendering.
> >
> > Under Wine, it shows anti-aliased fonts on our drawing canvas, as on
> > Linux. When I copy the built tree to my Win2K partition and boot
> > windows, I find that the font outlines show no anti-aliasing. I don't
> > have any explicit options setting such options in the program, and I'm
> a
> > bit confused about why there is a difference in behaviours.
> >
> > I half expected that I'd compiled freetype / pango / cairo with the
> > wrong options, but that doesn't explain why it renders differently
> under
> > wine.
> >
> > I tried rebuilding pango + cairo without the freetype backend. (Trying
> > to ensure I knew which back end was ending up being used). I still get
> > no antialiasing, although I "think" the rendering might have changed
> > slightly in my GDK menus. (I don't have a development environment on
> the
> > Win2K partition, so doing side-by-side tests is rather awkward).
>
> Sorry, its WinXP I have, not Win2K..
>
> Here is are some screenshots of the rendering:
>
> http://www2.eng.cam.ac.uk/~pcjc2/geda/screenshots/geda_on_windows1.png<http://www2.eng.cam.ac.uk/%7Epcjc2/geda/screenshots/geda_on_windows1.png>
> http://www2.eng.cam.ac.uk/~pcjc2/geda/screenshots/geda_on_windows2.png<http://www2.eng.cam.ac.uk/%7Epcjc2/geda/screenshots/geda_on_windows2.png>
> http://www2.eng.cam.ac.uk/~pcjc2/geda/screenshots/geda_on_windows3.png<http://www2.eng.cam.ac.uk/%7Epcjc2/geda/screenshots/geda_on_windows3.png>
>
> Probably best to look at 1 and then 2 or 3.
>
> 1 is Black background, coloured text,
> 2/3 is whitish-grey background, black text.
>
> Both show no anti-aliasing I can detect. Are there any known issues
> which prevent anti-aliasing on Windows?
>
> I am using the native Win32 font backends for pango / cairo, without
> fontconfig or freetype, I'm rendering from a GDK provided cairo context
> during an expose handler.
>
> Best regards,
>
> --
> Peter Clifton
>
> Electrical Engineering Division,
> Engineering Department,
> University of Cambridge,
> 9, JJ Thomson Avenue,
> Cambridge
> CB3 0FA
>
> Tel: +44 (0)7729 980173 - (No signal in the lab!)
>
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20081103/d1082dad/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CairoRenderingWin32.png
Type: image/png
Size: 14311 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20081103/d1082dad/attachment-0001.png
More information about the cairo
mailing list