[PATCH v2 1/3] Handle CJK wide glyph rendering

Thomas Daede daede003 at umn.edu
Sun Jul 21 21:22:22 PDT 2013


This is for a VT-100 style terminal emulator, right? It's designed to
implement a grid of characters. Therefore, drawing it like a grid
based on single or double character widths makes a lot more sense than
detecting the length of a string. On any other UI element, detecting
the string length would be more appropriate.

Ideally I would imagine you would always pick a fixed width font (aka
only single or double widths) but the terminal should work "okay" with
a proportional font, forcing it into fixed positions.

I think Peng's implementation is in line with other virtual terminals.

On Sun, Jul 21, 2013 at 9:46 PM, Peng Wu <peng.e.wu at gmail.com> wrote:
> Frankly speaking, I suspect that your new fix will break some program
> which uses newt with proportional font.
> PS: newt is a library for text mode user interfaces.
>
>
> On Thu, 2013-07-18 at 11:23 -0700, Bill Spitzak wrote:
>> I propose the drawing code be changed to something like this:
>>
>>    char* string = the_line_to_draw;
>>    cairo_draw_text_at(x, y, string);
>>
>> And this:
>>
>> int where_is_position_n(int n, char* string) {
>>    return cairo_text_width(string, n);
>> }
>
>
> _______________________________________________
> 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