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 644716 - Junk characters while displaying Unicode characters.
Junk characters while displaying Unicode characters.
Status: RESOLVED INVALID
Product: pango
Classification: Platform
Component: general
1.28.x
Other Linux
: Normal critical
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-14 12:00 UTC by M G Harish
Modified: 2011-09-22 10:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modified Pango example file (13.88 KB, application/octet-stream)
2011-03-14 12:00 UTC, M G Harish
Details
Images containing junk characters (129.46 KB, application/octet-stream)
2011-03-16 06:59 UTC, M G Harish
Details

Description M G Harish 2011-03-14 12:00:30 UTC
Created attachment 183331 [details]
Modified Pango example file

cairoshape.c example file was modified as below (to include Japanese text):
Junk characters are observed.
Similar behavior is observed with other languages which use Unicode characters, such as Korean, Kannada etc.
Comment 1 Behdad Esfahbod 2011-03-14 16:37:38 UTC
Bugzilla is not a user help forum.  Please contact gtk-app-devel-list for that.
Comment 2 M G Harish 2011-03-15 05:50:43 UTC
Behad, the application we are developing is different. cairoshape.c is not our application. It is example file provided by pango (pango-1.28.3/examples/cairoshape.c). I have modified that file to use Japanese characters instead of English characters provided in the example.

The bug is in pango because, the junk characters are not displayed while using pango_cairo_layout_path(). They are displayed only when we use pango_cairo_show_layout().
Comment 3 anjalijacob 2011-03-15 06:37:36 UTC
I am also facing the same problem.
Comment 4 Behdad Esfahbod 2011-03-15 15:49:19 UTC
At least attach a screenshot!
Comment 5 M G Harish 2011-03-16 06:59:37 UTC
Created attachment 183488 [details]
Images containing junk characters

The third file (file2.png) shows junk characters produced by pango_cairo_show_layout().
Comment 6 M G Harish 2011-03-16 07:17:01 UTC
The relevant code is this:

	cairo_set_source_rgb(cr, 0,0,1);
  	pango_cairo_show_layout (cr, layout);
  	pango_cairo_layout_path (cr, layout);
	cairo_set_source_rgb(cr, 1,1,0);
  	cairo_fill(cr);

pango_cairo_show_layout() writes text in blue colour (which has some junk), where as pango_cairo_layout_path() writes text in yellow colour (This is proper).
Comment 7 Behdad Esfahbod 2011-03-16 16:10:15 UTC
Please attach an unzipped PNG image.
Comment 8 Behdad Esfahbod 2011-03-16 16:12:16 UTC
The first two shots look fine.  Are you only talking about the third one?
Comment 9 M G Harish 2011-03-16 18:24:45 UTC
Yes. Only the third file, second line has the problem. If you increase the loop count and add more text, you will notice that more text will get garbled.
Comment 10 M G Harish 2011-03-16 18:29:04 UTC
Few observations: 
1. Once the garbage comes, it keeps on increasing in the subsequent images (if the loop count is increased)
2. When the text font size is more, issue is more.
3. It is observed for English characters also when the font size is around 140 (not in the example code, but in our application)
Comment 11 M G Harish 2011-04-26 11:42:17 UTC
Any updates on this issue?
Comment 12 Behdad Esfahbod 2011-04-26 20:44:52 UTC
No, I haven't got time to debug it.  Feel free to do so.
Comment 13 Takeshi.Nakayama2 2011-05-17 06:41:51 UTC
I am also facing the same problem.
Comment 14 Behdad Esfahbod 2011-06-14 15:21:49 UTC
Wildly guessing, I'd say it's a bug in FreeType's rasterizer.
Comment 15 M G Harish 2011-06-20 10:09:10 UTC
(In reply to comment #14)
> Wildly guessing, I'd say it's a bug in FreeType's rasterizer.

Behdad, since I don't have much idea on the internal architecture of Pango/Cairo/DirectFB, can you please tell some steps to corner down the issue? How can I confirm that it is a FreeType bug, and not of Pango?
Comment 16 André Klapper 2011-06-20 10:13:54 UTC
This bugtracker is not really meant as a support forum...
Tried mailing lists already?
Comment 17 M G Harish 2011-06-20 10:21:48 UTC
(In reply to comment #16)
> This bugtracker is not really meant as a support forum...
> Tried mailing lists already?

Thanks André Klapper, for jumping in :)

Are you talking about gtk-app-devel-list mentioned earlier by Behdad?
If so, no, since I still believe it's a Pango bug and not related to the application. The reason for telling this is that there is no application in picture here. I have just modified the example file provided with Pango standard distribution (pango-1.28.3/examples/cairoshape.c).

Can you please look at the Comments 2 and 10, wherein I have given more details?

Also, please take a look at the modified Pango example file attached in the bug description. 

Thanks
Comment 18 André Klapper 2011-06-20 10:38:37 UTC
(In reply to comment #17)
> Are you talking about gtk-app-devel-list mentioned earlier by Behdad?

First hit when searching for "pango mailing list" on the interwebs is
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list

> Can you please look at the Comments 2 and 10, wherein I have given more
> details?

No, as this is not a support forum.
Comment 19 M G Harish 2011-06-20 10:51:13 UTC
Thanks André, for pointing on to the right direction. I have sent the mail to the list.

Thanks
Comment 20 M G Harish 2011-09-22 10:45:24 UTC
Has anybody else been able to reproduce the problem? Any updates?
Comment 21 André Klapper 2011-09-22 10:47:24 UTC
No updates as THIS BUG REPORT IS INVALID. Again: Wrong place here.