Bug 138075
Summary: | evolution calendar & addressbook uses old gnome-print api - cannot print indic | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jatin Nansi <jnansi> | ||||||||
Component: | evolution | Assignee: | Dave Malcolm <dmalcolm> | ||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | rawhide | CC: | eng-i18n-bugs, llch, llim, otaylor, tagoh | ||||||||
Target Milestone: | --- | Keywords: | i18n | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | evolution-2.0.2-10 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2005-03-04 07:12:23 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | 140309, 140817 | ||||||||||
Bug Blocks: | 126002, 137160 | ||||||||||
Attachments: |
|
Description
Jatin Nansi
2004-11-04 14:16:48 UTC
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. 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. 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. 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? 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 Here is the non-Roman iCalendar example. http://ical.mac.com/ical/Japanese32Holidays.ics 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) Created attachment 111046 [details]
test vcf as requested
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. Created attachment 111075 [details]
Initial version of patch for calendar printing
Addressbook printing has been reported upstream here: http://bugzilla.ximian.com/show_bug.cgi?id=70210 I reported calendar printing upstream here: http://bugzilla.ximian.com/show_bug.cgi?id=72668 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 to the relevant upstream bugs in Ximian's bugzilla? 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 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) I've uploaded cleaned-up versions of the patches to the upstream bugs; please can you test them. I've tested that patch and works fine to me. Akira-san, please can you clarify which patch (or patches) you were referring to in comment #19? Thank you. 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 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 Created attachment 111562 [details]
ps file illustrating the english alpabet replaced by empty square
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. 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) evolution-2.0.2-10 packages built for RHEL4 U1 - please test! Tested Cal with all 5 indic locales and they are all good. :-) Please close the bug if it's cooked... Confirmed fixed. Tested with evolution-2.0.2-10 in dist-U1. Thanks. 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 bug 150485 has been created to track the porting of libgal2 to the new API. bug #150458 is the correct bug number |