Bug 138075 - evolution calendar & addressbook uses old gnome-print api - cannot print indic
evolution calendar & addressbook uses old gnome-print api - cannot print indic
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: evolution (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Malcolm
: i18n
Depends On: 140309 140817
Blocks: Indic 137160
  Show dependency treegraph
 
Reported: 2004-11-04 09:16 EST by Jatin Nansi
Modified: 2007-11-30 17:10 EST (History)
5 users (show)

See Also:
Fixed In Version: evolution-2.0.2-10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-04 02:12:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test vcf as requested (749 bytes, text/plain)
2005-02-14 05:55 EST, Jatin Nansi
no flags Details
Initial version of patch for calendar printing (53.41 KB, patch)
2005-02-14 22:50 EST, Dave Malcolm
no flags Details | Diff
ps file illustrating the english alpabet replaced by empty square (91.92 KB, text/plain)
2005-03-02 00:44 EST, Lawrence Lim
no flags Details

  None (edit)
Description Jatin Nansi 2004-11-04 09:16:48 EST
Description of problem:
The Evolution calendar and addressbook uses the older libgnomeprint22
api (without pango support). hence it does not print indic correctly.

Version-Release number of selected component (if applicable):
evolution-2.0.2-3

How reproducible:
Every time

Steps to Reproduce:
1. Input calendar details in indic language
2. print calendar
3.
  
Actual results:
Indic printing is incorrect (composite glyphs broken)

Expected results:
Correct printing of indic

Additional info:
need to update evolution calendar and addressbook components to use
newer pango enabled libgnomeprint22 api.
Comment 2 Dave Malcolm 2004-11-16 15:57:00 EST
Looking at addressbook: evolution/addressbook/printing/e-contact-print.c
- e_contact_output calls e_contact_divide_text which tries to do
word-breaking; I suspect Pango will do a better job.  It then calls
gnome_print_show on each line of text; looks like it should be using a
PangoLayout for all of this.
- EContactPrintContext has gchar fields for first_char_on_page and
last_char_on_page, and the code tries to present the letters A to Z
running down the contact list, so that each page of the printout
highlights what range of the alphabet is covered.  I'm afraid I've no
idea how this should be presented to the user for non-Roman scripts
(what if the list of names for your contact list contains a mixture of
roman and non roman-scripts?) 


Looking at the calendar: evolution/calendar/gui/print.c
- print_text() is intended to print a single line of text; it calls
gnome_print_show() and is called in various places; should be trivial
to replace with a call to gnome_print_pango_layout
- bound_text() tries to do line wrapping, using naive comparisons
against the ' ' character, calling gnome_print_show on the lines it
generates.  Should be replaceable by creating a PangoLayout on the fly
and printing it.
- various calls to gnome_font_get_size accompanying such calls, for
laying out lines and boxes relative to the textual components.


I'm sorry that this bug has only recently been discovered; it looks
like fixing all of the above problems is going to be quite invasive,
so I'd prefer to move this to RHEL4 U1.
Comment 3 Leon Ho 2004-11-18 12:33:44 EST
Dave, thanks for the info and ATM I do agree the risk maybe high
regardless languages.

Jatin, what do you think? Do you have some counter measures or
suggestion for Indic? Otherwise I will take this off from RHEL4RCi18n
and aim for RHEL4-U1 if you are okay with that.
Comment 4 Jatin Nansi 2004-11-22 09:29:48 EST
This bug needs to be fixed in multiple places. In addition to the
fixes suggested by dmalcolm above, I can think of atleast 1 more
issue, ie. the graphics (lines and rectangles) drawn on the page.
Those are drawn to make the page prettier, and their coordinates are
calculated based on the text. 
Since all these fixes will be extensive, I think it would be good to
move this bug to RHEL4 U1.
Comment 5 Leon Ho 2004-11-22 09:48:33 EST
Thanks Dave and Jatin. It is bad for Indic users, however risks are
high, so have to fix it asap after final. Moving it to RHEL U1
blocker. (it also helps CJK layouting problem with calendar after this
bug is fixed)

Dave, is it something we should talk to upstream? Possible to
initialize a discussion with upstream about this?
Comment 6 Dave Malcolm 2005-01-20 16:11:30 EST
Leon: please can you create a .ics calendar file and a .vcf contacts
file containing plenty of examples of appointments/contacts in
non-Roman scripts for testing.

Hopefully we can put this in upstream CVS for testing
Comment 8 Akira TAGOH 2005-01-21 02:07:23 EST
Here is the non-Roman iCalendar example.
http://ical.mac.com/ical/Japanese32Holidays.ics
Comment 9 Dave Malcolm 2005-02-11 16:59:02 EST
Re comment 8: Thank you!  I can reproduce the bug in the latest
Evolution (2.1.5); I plan to do the fix upstream then backport (as it
appears that this code has barely changed, if at all)

Please can someone supply me with a .vcf addressbook file (the other
part of my request in comment #6) if you have one you can email me -
this will make it much easier for me to test and implement this.  You
can email it to me directly and I promise I will keep it private. 
(It's much easier and better to work with real data)
Comment 10 Jatin Nansi 2005-02-14 05:55:10 EST
Created attachment 111046 [details]
test vcf as requested
Comment 11 Dave Malcolm 2005-02-14 16:42:52 EST
Thanks for the attachment.

I'm working on the calendar part of things, and have it partially working.

Printing the "List View" of the calendar uses printing code in
libgal2, which will need patching as well.  I currently believe that
these patches can be independent of each other.
Comment 12 Dave Malcolm 2005-02-14 22:50:01 EST
Created attachment 111075 [details]
Initial version of patch for calendar printing
Comment 13 Dave Malcolm 2005-02-16 18:03:45 EST
Addressbook printing has been reported upstream here:
http://bugzilla.ximian.com/show_bug.cgi?id=70210
Comment 14 Dave Malcolm 2005-02-16 18:12:35 EST
I reported calendar printing upstream here:
http://bugzilla.ximian.com/show_bug.cgi?id=72668
Comment 15 Dave Malcolm 2005-02-16 19:08:08 EST
I've attached an initial version of a fix for addressbook printing to
this upstream bug; please test:
http://bugzilla.ximian.com/show_bug.cgi?id=70210
(with some issues as discussed in that bug)

Even better, can I add eng-i18n-list@redhat.com to the relevant
upstream bugs in Ximian's bugzilla?
Comment 17 Dave Malcolm 2005-02-21 14:43:37 EST
I added the List View problems in libgal2 upstream here:
http://bugzilla.ximian.com/show_bug.cgi?id=72815

eng-i18n-list doesn't have an account at bugzilla.ximian.com, so I
added tagoh@redhat.com to these upstream bugs:
http://bugzilla.ximian.com/show_bug.cgi?id=69430 (addressbook printing)
http://bugzilla.ximian.com/show_bug.cgi?id=72668 (calendar printing)
http://bugzilla.ximian.com/show_bug.cgi?id=72815 (list view printing)
Comment 18 Dave Malcolm 2005-02-21 21:39:18 EST
I've uploaded cleaned-up versions of the patches to the upstream bugs;
please can you test them.
Comment 19 Akira TAGOH 2005-02-28 05:20:08 EST
I've tested that patch and works fine to me.
Comment 20 Dave Malcolm 2005-02-28 16:03:52 EST
Akira-san, please can you clarify which patch (or patches) you were
referring to in comment #19?   Thank you.
Comment 21 Akira TAGOH 2005-03-01 06:35:57 EST
Sorry, well, I've tried two patches for the adressbook and calendar printing.
http://bugzilla.ximian.com/showattachment.cgi?attach_id=14296
http://bugzilla.ximian.com/showattachment.cgi?attach_id=14295
Comment 22 Lawrence Lim 2005-03-02 00:43:01 EST
I have tried printing the address book, calendar. They are all printing properly
now. However, for task, english alphabet seems unable to print properly. They
are all replaced by an empty square. An attachment of the ps file will follow.


Thanks,
Lawrence
Comment 23 Lawrence Lim 2005-03-02 00:44:45 EST
Created attachment 111562 [details]
ps file illustrating the english alpabet replaced by empty square
Comment 24 Dave Malcolm 2005-03-02 01:25:10 EST
I had to massage the calendar patch to apply cleanly against RHEL4
rather than CVS HEAD.

The package for RHEL4 U1 is building now, but beehive seems to be
broken (or heavily congested).

I've opened errata RHBA-2005:267 for this.
Comment 25 Dave Malcolm 2005-03-02 01:27:13 EST
I believe the "tasks" view is handled by libgal2 (like the List View
for addressbook and calendars), which I haven't had time to fix yet
(and won't get fixed for RHEL4 U1 at this stage)
Comment 26 Dave Malcolm 2005-03-02 03:47:13 EST
evolution-2.0.2-10 packages built for RHEL4 U1 - please test!
Comment 27 Lawrence Lim 2005-03-02 04:14:29 EST
Tested Cal with all 5 indic locales and they are all good. :-)
Comment 28 Havoc Pennington 2005-03-03 15:12:48 EST
Please close the bug if it's cooked...
Comment 29 Lawrence Lim 2005-03-04 02:12:23 EST
Confirmed fixed. Tested with evolution-2.0.2-10 in dist-U1.


Thanks.
Comment 30 Dave Malcolm 2005-03-04 11:14:36 EST
However, printing the "List View" of the calendar/addressbook probably
won't work, as this uses code in libgal2 which hasn't been ported to
the new API yet.  Please open a fresh bug for this if you want me to
fix it, and add it to appropriate tracker bugs (RHELL4 U2?)
This is in the upstream bug tracker here:
http://bugzilla.ximian.com/show_bug.cgi?id=72815
Comment 31 Lawrence Lim 2005-03-07 02:25:12 EST
bug 150485 has been created to track the porting of libgal2 to the new API.
Comment 32 Leon Ho 2005-04-11 02:34:01 EDT
bug #150458 is the correct bug number

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