Bug 13334

Summary: Low quality text output on the win32 printing surface with freetype backend
Product: cairo Reporter: mehmet yasar <myasar>
Component: win32 backendAssignee: cairo-bugs mailing list <cairo-bugs>
Status: RESOLVED NOTABUG QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.5.2   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test application
output obtained with test application

Description mehmet yasar 2007-11-21 06:45:03 UTC
I'm a using the new win32 printing surface.
The characters seem to be drawn without any antialiasing or hinting (cairo_set_font_options doesn't change anything).

Tested with:
- cairo 1.5.2
- freetype 2.3.5
Comment 1 mehmet yasar 2007-11-21 06:46:30 UTC
Created attachment 12667 [details]
test application
Comment 2 mehmet yasar 2007-11-21 06:50:09 UTC
Created attachment 12668 [details]
output obtained with test application
Comment 3 Adrian Johnson 2007-11-21 14:19:16 UTC
The lack of antialiasing is not a bug. The win32-printing surface is designed for printing where generally printers do there own antialiasing.

When using win32-printing to create a EMF file, the EMF file contains a sequence of GDI functions such as MoveToEx, LineTo, StrokePath etc. When you replay the EMF to a device, how these GDI functions are displayed is outside the control of cairo. Windows GDI does not do antialiasing so you not get antialising when displaying an EMF file to the screen.

If you use Windows fonts to create the EMF you will get antialiased output when you display the EMF to the screen because GDI does antialiase the display of fonts. 

The problem with using the FreeType font backend with win32-printing is that the glyphs are drawn with a sequence of GDI opererations (move, line, fill etc). This will not give you any antialising when Windows displays the EMF. 

If you use Windows fonts, the EMF records the ExtTextOut commands so when replaying the glyphs are displayed using the ExtTextOut function which does antialias fonts.

Comment 4 mehmet yasar 2007-11-22 01:00:17 UTC
You are right.
I have modified the application to work with my printer and the printed output is  better than on screen (the printer makes its own antialiasing).
Comment 5 Chris Wilson 2008-10-10 11:39:12 UTC
The default font options for the vector targets are all unhinted, non-antialiased because it is expected that they will be printed at high-resolution by rasterisation engines designed for that explicit task - hence everything appears to be functioning correctly.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.