[PATCH] terminal: Don't try to render RLE used as a placeholder
Kristian Høgsberg
hoegsberg at gmail.com
Tue Apr 8 10:03:41 PDT 2014
On Tue, Apr 08, 2014 at 06:46:18PM +0900, Daiki Ueno wrote:
> weston-terminal uses RLE (U+202B) as a placeholder of the right half
> of a double width character. However, not all fonts include this
> glyph and cairo renders it as .notdef (glyph index 0) in that case.
> ---
> A screenshot showing the problem:
> http://du-a.org/~ueno/junk/terminal-rle.png
> where a small rectangle is accompanied by every Japanese character.
>
> I increased the font size for visibility, but it can also happen with
> the default font on Fedora 20.
That makes sense, patch applied. Thanks.
Kristian
> clients/terminal.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/clients/terminal.c b/clients/terminal.c
> index beec877..5931ce2 100644
> --- a/clients/terminal.c
> +++ b/clients/terminal.c
> @@ -1094,6 +1094,12 @@ redraw_handler(struct widget *widget, void *data)
> cairo_stroke(cr);
> }
>
> + /* skip space glyph (RLE) we use as a placeholder of
> + the right half of a double-width character,
> + because RLE is not available in every font. */
> + if (p_row[col].ch == 0x200B)
> + continue;
> +
> glyph_run_add(&run, text_x, text_y, &p_row[col]);
> }
> }
> --
> 1.9.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list