grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] multistring support in gui_label


From: Andrey Borzenkov
Subject: Re: [PATCH] multistring support in gui_label
Date: Tue, 16 Apr 2013 21:10:23 +0400

В Tue, 16 Apr 2013 13:04:28 +0400
Vladimir Testov <address@hidden> пишет:

> >Please don't use // comments.
> O.k. I won't.
> >This code completely forgets the cases
> >when even the first word doesn't fit in the available space.
> 
> Mmm. It can handle this case actually.
> 
> >The code as whole breaks some unicode concepts like e.g. bidi stack.
> 
> Didn't get what you mean.
> 
> >Could you reuse the already available line-vreaking algorithm in
> >normal/term.c and normal/charset.c ? Since the line-breaking is
> >artificially disabled for labels it should require only minor
> >adjustments to be reenabled.
> 
> Yep! Here it is (patch included)!
> 

> +/* Differs from grub_font_draw_line only in multiline output */

You mean grub_font_draw_string? Is it possible to extend this function
instead of duplicating it?

> +grub_err_t
> +grub_font_draw_multiline (const char *str, grub_font_t font,
> +                          grub_video_color_t color,
> +                          int baseline_y, int font_height,
> +                          int max_width, int max_height,
> +                          int align)

> +
> +  grub_err_t print_line ()
> +  {
> +    while (pos != ptr)

> +  auto grub_ssize_t getcharwidth (const struct grub_unicode_glyph *c);
> +  grub_ssize_t getcharwidth (const struct grub_unicode_glyph *c)
> +  {
> +    return grub_font_get_constructed_device_width (font, c);
> +  }

All nested functions were removed from trunk. Please do not reintroduce
them. This should not even compile.



reply via email to

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