Bug 239205 - gtkhtml38: Printing from gnucash uses different fonts than print preview
gtkhtml38: Printing from gnucash uses different fonts than print preview
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gtkhtml38 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-05 21:44 EDT by Bernard Johnson
Modified: 2014-03-16 23:06 EDT (History)
3 users (show)

See Also:
Fixed In Version: 2.1.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-27 01:25:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
print preview of how fonts should look from gnucash (56.82 KB, image/png)
2007-05-05 21:44 EDT, Bernard Johnson
no flags Details
example pdf before the patch is applied (wrong fonts) (630.57 KB, application/octet-stream)
2007-05-05 21:45 EDT, Bernard Johnson
no flags Details
example pdf after the patch is applied (matches print preview) (633.96 KB, application/octet-stream)
2007-05-05 21:46 EDT, Bernard Johnson
no flags Details
capture of the actual report in gnucash (91.46 KB, image/png)
2007-05-05 21:55 EDT, Bernard Johnson
no flags Details

  None (edit)
Description Bernard Johnson 2007-05-05 21:44:29 EDT
Description of problem:
Bug upstream regarding this:
http://bugzilla.gnome.org/show_bug.cgi?id=350408#c15

Explanation of the problem from the developer of the patch:
http://members.iinet.com.au/~paulone/gnucash/

The patch:
http://members.iinet.net.au/~paulone/gnucash/print-font-gtkhtml3.8-fix.patch

This is a little more serious than just "ugly" printouts.  If the font is wrong,
and there are enough columns, the print area leaks over the right margin and
information is lost.

Version-Release number of selected component (if applicable):
gtkhtml3-3.12.3-1.fc6
Comment 1 Bernard Johnson 2007-05-05 21:44:29 EDT
Created attachment 154216 [details]
print preview of how fonts should look from gnucash
Comment 2 Bernard Johnson 2007-05-05 21:45:20 EDT
Created attachment 154217 [details]
example pdf before the patch is applied (wrong fonts)
Comment 3 Bernard Johnson 2007-05-05 21:46:27 EDT
Created attachment 154218 [details]
example pdf after the patch is applied (matches print preview)
Comment 4 Bernard Johnson 2007-05-05 21:55:44 EDT
Created attachment 154219 [details]
capture of the actual report in gnucash

I mean to say that the print preview doesn't match the fonts either.  That was
a typo.

This is the capture of how the fonts should look.
Comment 5 Matthew Barnes 2007-05-08 11:45:00 EDT
Thanks for the detailed bug report!

I'm changing the version from 'fc6' to 'devel' since it's too late to really do
anything about this in Fedora Core 6 and the problem still exists in even the
latest revision of the upstream source code repository.

The patch looks reasonable but as Paul mentioned, as of version 3.14 GtkHtml is
using GtkPrint rather than GnomePrint.  So I'll have to re-evaluate it.

It just so happens that I'm planning on ripping into GtkHtml's printing API
(again) to better integrate with GtkPrint's approach to pagination.  As it
stands now, the API makes it very difficult to honor user selected page ranges
when printing.

I'll make sure to expose the default font in the API, as Paul suggests.
Comment 6 Bernard Johnson 2007-06-08 17:49:11 EDT
Also happens in F7 as gnucash relies on gtkhtml38.
Comment 7 Bernard Johnson 2007-06-20 02:24:40 EDT
Given the small number of applications that are even using gtkhtml38, don't you
think it would be safe to apply this patch and push to F-7 updates & rawhide?

(this is on F-7)
repoquery --all --whatrequires libgtkhtml-3.8.so.15
gnotime-0:2.2.2-7.fc6.i386
gtkhtml38-devel-0:3.12.3-4.fc7.i386
gnucash-0:2.0.5-3.fc7.i386
gtkhtml38-0:3.12.3-4.fc7.i386
gnomesword-0:2.2.3-1.fc7.i386
Comment 8 Bill Nottingham 2007-06-20 11:43:42 EDT
As it's changing the code in a non-upstream way... not really. Matt, as
upstream, what's your opinions on changing the dead-end code in this way?
Comment 9 Matthew Barnes 2007-06-20 17:00:03 EDT
I haven't tested the patch at all, but it looks reasonable and doesn't break any
interfaces.  Might be worth trying it out in Rawhide.  If it works that could
increase its chances of a version of the patch that works with GtkPrint getting
accepted upstream.  I'd be leery of putting it in Fedora 7.
Comment 10 Bill Nottingham 2007-06-20 17:10:25 EDT
Heh. Of course, in the near future gnucash will probably get upgraded in rawhide
to a version that uses the current gtkhtml. 

Added in -5.
Comment 11 Bernard Johnson 2007-06-21 00:33:45 EDT
(In reply to comment #9)
> I'd be leery of putting it in Fedora 7.

Looking at the two other programs that actually depend on gtkhtml38... Neither
of them has printing capabilities.  If the patch only affects printing, I don't
see how this is even risky. (Maybe the patch affects things other than printing?)

Comment 12 Matthew Barnes 2007-06-21 01:22:35 EDT
The patch modifies htmltext.c, which may affect general rendering of HTML and
not just printing.  But probably in a good way.

You might also be interested in the GtkHtml printing work I'm currently
targeting for the next GNOME release.  It extends GtkHtml's printing API to
allow for printing individual pages or custom page ranges, among other things. 
See [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=446894
Comment 13 Bernard Johnson 2007-06-26 19:36:20 EDT
(In reply to comment #10)
> Heh. Of course, in the near future gnucash will probably get upgraded in rawhide
> to a version that uses the current gtkhtml. 

Doesn't seem to affect the gnucash/gtkhtml combo in rawhide.
Comment 14 Bill Nottingham 2007-06-26 23:21:28 EDT
Oops, if you've upgraded to 2.1.4, you're using gtkhtml-3.14.
Comment 15 Bernard Johnson 2007-06-27 00:17:54 EDT
(In reply to comment #14)
> Oops, if you've upgraded to 2.1.4, you're using gtkhtml-3.14.

Yeah, which was my point.  gnucash-2.1.4/gtkhtml-current doesn't seem to carry
this particular bug.
Comment 16 Bill Nottingham 2007-06-27 01:25:37 EDT
Oh, I thought you meant the *change* didn't fix it. If it's working now, I'll
close this.
Comment 17 Bernard Johnson 2007-06-27 02:04:01 EDT
Let me be more clear:

This bug does not exist with gnucash-2.1.4/gtkhtml-current in rawhide.

:)

Sorry for the terseness I sometimes exhibit!

Note You need to log in before you can comment on or make changes to this bug.