bidi works in terminal in grub-emu
This commit is contained in:
parent
dfed5c6bb4
commit
0a239a8211
23 changed files with 1101 additions and 799 deletions
|
@ -53,23 +53,27 @@ grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc,
|
|||
|
||||
grub_utf8_to_ucs4_alloc (command_help, &unicode_command_help,
|
||||
&unicode_last_position);
|
||||
|
||||
FOR_ACTIVE_TERM_OUTPUTS(term)
|
||||
{
|
||||
unsigned stringwidth;
|
||||
grub_uint32_t *unicode_last_screen_position;
|
||||
|
||||
|
||||
unicode_last_screen_position = unicode_command_help;
|
||||
|
||||
|
||||
stringwidth = 0;
|
||||
|
||||
|
||||
while (unicode_last_screen_position < unicode_last_position &&
|
||||
stringwidth < ((grub_term_width (term) / 2) - 2))
|
||||
{
|
||||
struct grub_unicode_glyph glyph;
|
||||
unicode_last_screen_position
|
||||
+= grub_unicode_aglomerate_comb (unicode_last_screen_position,
|
||||
unicode_last_position
|
||||
- unicode_last_screen_position,
|
||||
&glyph);
|
||||
|
||||
stringwidth
|
||||
+= grub_term_getcharwidth (term,
|
||||
*unicode_last_screen_position);
|
||||
unicode_last_screen_position++;
|
||||
+= grub_term_getcharwidth (term, &glyph);
|
||||
}
|
||||
|
||||
grub_print_ucs4 (unicode_command_help,
|
||||
|
@ -78,6 +82,7 @@ grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc,
|
|||
grub_print_spaces (term, grub_term_width (term) / 2
|
||||
- stringwidth);
|
||||
}
|
||||
|
||||
if (cnt % 2)
|
||||
grub_printf ("\n");
|
||||
cnt++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue