В Tue, 16 Apr 2013 13:04:28 +0400 Vladimir Testov <vladimir.tes...@rosalab.ru> пишет:
> >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. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel