Bug 10557 - freetype backend with win32 backend display "black boxes"
Summary: freetype backend with win32 backend display "black boxes"
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.4.2
Hardware: Other Windows (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-07 00:44 UTC by mehmet yasar
Modified: 2007-11-08 05:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test program (2.46 KB, text/x-csrc)
2007-04-10 01:17 UTC, mehmet yasar
Details
output when drawing on a win32 surface (8.73 KB, image/png)
2007-04-10 01:21 UTC, mehmet yasar
Details
output when drawing on an image surface (2.42 KB, image/png)
2007-04-10 01:24 UTC, mehmet yasar
Details

Description mehmet yasar 2007-04-07 00:44:24 UTC
I'm trying to display some text using freetype backend on a Win32 surface.
I get "black boxes" instead of characters
The same operation on an image surface gives correct result.

Is using freetype font with a win32 surface supported ?
Comment 1 Adrian Johnson 2007-04-07 02:56:46 UTC
Yes it is supported and it works for me using cairo-1.4.2 and freetype-2.3.3 compiled with cygwin.

Could you provide more details about the version of freetype, the font you are using, and a test case that reproduces the problem.
Comment 2 mehmet yasar 2007-04-10 01:15:25 UTC
see test program test.c cross-compiled with mingw.

Usage:
1. copy cour.ttf (from windows/font) to current directory.
2. define METAFILE_SURFACE to draw to a win32 surface
   undef METAFILE_SURFACE to draw to an image surface.

TESTED WITH:

cairo 1.4.2 (with freetype support)
	get cairo-1.4.2-mingw.7z from 	http://inkscape.modevia.com/win32libs/?C=D;O=A

freetype :
tested with both version of freetype:
	freetype-2.2.1.zip from http://www.gimp.org/~tml/gimp/win32/downloads.html
	freetype-2.3.3 (compiled on my own)

Tested on Windows XP SP1
Comment 3 mehmet yasar 2007-04-10 01:17:32 UTC
Created attachment 9546 [details]
test program
Comment 4 mehmet yasar 2007-04-10 01:21:17 UTC
Created attachment 9547 [details]
output when drawing on a win32 surface
Comment 5 mehmet yasar 2007-04-10 01:24:11 UTC
Created attachment 9548 [details]
output when drawing on an image surface
Comment 6 Adrian Johnson 2007-04-14 23:48:46 UTC
I've confirmed that the bug occurs with your test case. This appears to be a cairo bug.
Comment 7 Adrian Johnson 2007-11-04 04:27:49 UTC
This problem is the result of using the win32 surface with a windows metafile device. The win32-surface only works for devices where the destination bitmap can be read such as display devices.

The cairo 1.5.2 snapshot has a new win32-print surface designed for vector based devices such as printers and windows metafiles.
Comment 8 mehmet yasar 2007-11-08 04:58:20 UTC
The bug is fixed with cairo 1.5.2 with the new printing surface (cairo_win32_printing_surface_create instead of cairo_win32_surface_create)


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.