bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41645: 27.0.91; Combining Grapheme Joiner (#x34f) gui artifacts


From: Eli Zaretskii
Subject: bug#41645: 27.0.91; Combining Grapheme Joiner (#x34f) gui artifacts
Date: Thu, 04 Jun 2020 05:36:36 +0300

> From: Pip Cet <pipcet@gmail.com>
> Cc: dfussner@googlemail.com,  41645@debbugs.gnu.org
> Date: Wed, 03 Jun 2020 20:23:47 +0000
> 
> diff --git a/src/xdisp.c b/src/xdisp.c
> index 0f06a38d40..414dc8809b 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -30592,6 +30592,12 @@ gui_produce_glyphs (struct it *it)
>       it->glyph_row->contains_overlapping_glyphs_p = true;
>  
>        it->pixel_width = cmp->pixel_width;
> +      if (it->pixel_width == 0)
> +     {
> +       /* We assure that all visible glyphs have at least 1-pixel
> +          width.  */
> +       it->pixel_width = 1;
> +     }
>        it->ascent = it->phys_ascent = cmp->ascent;
>        it->descent = it->phys_descent = cmp->descent;
>        IT_APPLY_FACE_BOX(it, face);
> @@ -30623,6 +30629,12 @@ gui_produce_glyphs (struct it *it)
>        it->pixel_width
>       = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to,
>                                    &metrics);
> +      if (it->pixel_width == 0)
> +     {
> +       /* We assure that all visible glyphs have at least 1-pixel
> +          width.  */
> +       it->pixel_width = 1;
> +     }
>        if (it->glyph_row
>         && (metrics.lbearing < 0 || metrics.rbearing > metrics.width))
>       it->glyph_row->contains_overlapping_glyphs_p = true;

I like this less than your original proposal.  Artificially "fixing"
the pixel width of a glyph without changing anything else might get us
in trouble, since the font glyph is still zero-width and its other
metrics are incompatible with this "fixed" value.

Why did you prefer this to the original proposal, which was to set the
font_not_found_p flag?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]