After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 140199 - win32 GDI Printer support
win32 GDI Printer support
Status: RESOLVED WONTFIX
Product: pango
Classification: Platform
Component: win32
unspecified
Other Windows
: Normal enhancement
: Small API
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2004-04-15 20:01 UTC by John Ehresman
Modified: 2006-01-16 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Printing support (14.63 KB, patch)
2004-04-15 20:03 UTC, John Ehresman
none Details | Review

Description John Ehresman 2004-04-15 20:01:30 UTC
Attached is a patch that adds support on win32 for rendering to a GDI printer
rather than the display.  This is done by creating a font map for a specific
device context handle (HDC) and then the fonts created from the map will measure
and render using that hdc.  There's also a function to create a context for the hdc.

I will be submitting a patch to enable gdk to render to a printer hdc so that an
application can print using the gdk / pango api.  The gdk patch is a bit of a
hack and is incomplete, but I will clean it up if there's a chance of it being
accepted.

Also included in the patch is a cache for font metrics that I think was in pango
1.2.5.  Is there a reason why this was taken out?
Comment 1 John Ehresman 2004-04-15 20:03:49 UTC
Created attachment 26699 [details] [review]
Printing support
Comment 2 Tor Lillqvist 2004-04-15 20:17:05 UTC
Can't say whether the GDI printer support is something that should be there or 
not. But as the new API is clearly identified as being Win32 only, and if it 
useful for you, why not?

It seems that the font metrics cache was added "tentatively" to the pango-1-2 
branch only (see bug #76328), and never got added to HEAD. I assume it works, 
and if it really has an noticeable effect (have you measured?), sure, it should 
be added to HEAD, too.
Comment 3 John Ehresman 2004-04-15 20:41:31 UTC
The question is probably whether to try to support printing via the gdk & pango
api's in general.  It would be nice if printing also would work on Linux, but
that will require a bit more effort.

Regarding the font metric cache, I have not timed it or even tried running
without it; I just noticed it when going through the diff between our sources
and CVS and couldn't just omit it since we modified the code that gets the
metrics.  There is a comment in the CVS code saying that other backends cache
the results.
Comment 4 Owen Taylor 2004-06-23 20:38:51 UTC
Printing will be supported in GTK+ only when we switch to using Cairo
for rendering (2.8 timescale). The Unix solution for printing for
now is gnome-print; the next version of gnome-print will have pretty
good Pango integration.
Comment 5 Owen Taylor 2004-07-16 14:39:38 UTC
Please file a separate bug and patch for the metrics cache issue, thanks.
Comment 6 Owen Taylor 2004-12-15 18:56:32 UTC
Not sure if this will be still interesting for 1.10 where we'll have
Cairo support, but too late for API additions for 1.8 at this point.
Comment 7 Behdad Esfahbod 2006-01-16 09:38:51 UTC
So what is the status of this bug now that we are almost with 1.12?
Comment 8 John Ehresman 2006-01-16 15:20:00 UTC
Closing it because adding printing support to gdk Drawable's was rejected in favor of cairo.