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 355605 - hexbox with 0000 in it
hexbox with 0000 in it
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: hangul
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Changwoo Ryu
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-09-12 16:38 UTC by Behdad Esfahbod
Modified: 2006-09-12 17:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
better fix (1.69 KB, patch)
2006-09-12 17:08 UTC, Behdad Esfahbod
none Details | Review

Description Behdad Esfahbod 2006-09-12 16:38:40 UTC
The Hangul module produces hexboxes with all zeros in it in a couple of places:

One:

  /* Find a base character to render the mark on
   */
  int index = find_char (font, 0x25cc); /* DOTTED CIRCLE */
(pango_font_describe (font)));
  if (!index)
    index = find_char (font, 0x25cb);   /* WHITE CIRCLE, in KSC-5601 */
  if (!index)
    index = find_char (font, ' ');      /* Space */
  if (!index)                           /* Unknown glyph box with 0000 in it */
    index = find_char (font, get_unknown_glyph (font, 0));

This doesn't look that bad.

The other:

          index = (wc >= 0x3131) ? find_char (font, wc) : 0;
          pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
          if (!index)
            set_glyph (font, glyphs, *n_glyphs, cluster_offset,
                       get_unknown_glyph (font, index));
          else
            set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);

The first set_glyph is definitely wrong.  I'm changing it to:

          index = (wc >= 0x3131) ? find_char (font, wc) : 0;
          pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
          if (!index)
            set_glyph (font, glyphs, *n_glyphs, cluster_offset,
                       get_unknown_glyph (font, text[i]));
          else
            set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
Comment 1 Behdad Esfahbod 2006-09-12 16:40:26 UTC
Downstream bug:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=206044
Comment 2 Behdad Esfahbod 2006-09-12 17:08:00 UTC
Created attachment 72626 [details] [review]
better fix

fixed it the right way.

2006-09-12  Behdad Esfahbod  <behdad@gnome.org>

        Bug 355605 – hexbox with 0000 in it

        * modules/hangul/hangul-fc.c (render_syllable): If decomposition
        fails, backup and add a single hexbox glyph for the original
        character.
Comment 3 Behdad Esfahbod 2006-09-12 17:27:23 UTC
Fixed in HEAD and pango-1-14