Initial bidi support for gfxmenu
This commit is contained in:
parent
cd622720c8
commit
f0cfb703b8
7 changed files with 20279 additions and 6 deletions
|
@ -13,6 +13,8 @@ echo timestamp > stamp-h.in
|
|||
|
||||
python util/import_gcry.py lib/libgcrypt/ .
|
||||
|
||||
python util/import_bidi.py util/UnicodeData.txt unidata.c
|
||||
|
||||
for rmk in conf/*.rmk ${GRUB_CONTRIB}/*/conf/*.rmk; do
|
||||
if test -e $rmk ; then
|
||||
ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'`
|
||||
|
|
|
@ -642,7 +642,7 @@ png_mod_CFLAGS = $(COMMON_CFLAGS)
|
|||
png_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For font.mod.
|
||||
font_mod_SOURCES = font/font_cmd.c font/font.c
|
||||
font_mod_SOURCES = font/font_cmd.c font/font.c unidata.c
|
||||
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
font_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
|
|
375
font/font.c
375
font/font.c
|
@ -26,6 +26,8 @@
|
|||
#include <grub/types.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/bitmap.h>
|
||||
#include <grub/charset.h>
|
||||
#include <grub/bidi.h>
|
||||
|
||||
#ifndef FONT_DEBUG
|
||||
#define FONT_DEBUG 0
|
||||
|
@ -1045,6 +1047,359 @@ grub_font_draw_glyph (struct grub_font_glyph *glyph,
|
|||
glyph->width, glyph->height);
|
||||
}
|
||||
|
||||
static inline enum grub_bidi_type
|
||||
get_bidi_type (grub_uint32_t c)
|
||||
{
|
||||
static grub_uint8_t *bidi_types = NULL;
|
||||
struct grub_bidi_compact_range *cur;
|
||||
|
||||
if (!bidi_types)
|
||||
{
|
||||
unsigned i;
|
||||
bidi_types = grub_zalloc (GRUB_BIDI_MAX_CACHED_UNICODE_CHAR);
|
||||
if (bidi_types)
|
||||
for (cur = grub_bidi_compact; cur->end; cur++)
|
||||
for (i = cur->start; i <= cur->end
|
||||
&& i < GRUB_BIDI_MAX_CACHED_UNICODE_CHAR; i++)
|
||||
bidi_types[i] = cur->type;
|
||||
else
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
if (bidi_types && c < GRUB_BIDI_MAX_CACHED_UNICODE_CHAR)
|
||||
return bidi_types[c];
|
||||
|
||||
for (cur = grub_bidi_compact; cur->end; cur++)
|
||||
if (cur->start <= c && c <= cur->end)
|
||||
return cur->type;
|
||||
|
||||
return GRUB_BIDI_TYPE_L;
|
||||
}
|
||||
|
||||
static grub_ssize_t
|
||||
grub_err_bidi_logical_to_visual (grub_uint32_t *logical,
|
||||
grub_size_t logical_len,
|
||||
grub_uint32_t **visual)
|
||||
{
|
||||
enum grub_bidi_type type = GRUB_BIDI_TYPE_L;
|
||||
enum override_status {OVERRIDE_NEUTRAL = 0, OVERRIDE_R, OVERRIDE_L};
|
||||
unsigned *levels;
|
||||
enum grub_bidi_type *resolved_types;
|
||||
unsigned base_level;
|
||||
enum override_status cur_override;
|
||||
unsigned i;
|
||||
unsigned stack_level[GRUB_BIDI_MAX_EXPLICIT_LEVEL + 3];
|
||||
enum override_status stack_override[GRUB_BIDI_MAX_EXPLICIT_LEVEL + 3];
|
||||
unsigned stack_depth = 0;
|
||||
unsigned invalid_pushes = 0;
|
||||
unsigned no_markers_len = 0;
|
||||
unsigned run_start, run_end;
|
||||
grub_uint32_t *no_markers;
|
||||
unsigned cur_level;
|
||||
|
||||
auto void push_stack (unsigned new_override, unsigned new_level);
|
||||
void push_stack (unsigned new_override, unsigned new_level)
|
||||
{
|
||||
if (new_level > GRUB_BIDI_MAX_EXPLICIT_LEVEL)
|
||||
{
|
||||
invalid_pushes++;
|
||||
return;
|
||||
}
|
||||
stack_level[stack_depth] = cur_level;
|
||||
stack_override[stack_depth] = cur_override;
|
||||
stack_depth++;
|
||||
cur_level = new_level;
|
||||
cur_override = new_override;
|
||||
}
|
||||
|
||||
auto void pop_stack (void);
|
||||
void pop_stack (void)
|
||||
{
|
||||
if (invalid_pushes)
|
||||
{
|
||||
invalid_pushes--;
|
||||
return;
|
||||
}
|
||||
if (!stack_depth)
|
||||
return;
|
||||
stack_depth--;
|
||||
cur_level = stack_level[stack_depth];
|
||||
cur_override = stack_override[stack_depth];
|
||||
}
|
||||
|
||||
auto void revert (unsigned start, unsigned end);
|
||||
void revert (unsigned start, unsigned end)
|
||||
{
|
||||
grub_uint32_t t;
|
||||
unsigned k;
|
||||
for (k = 0; k <= (end - start) / 2; k++)
|
||||
{
|
||||
t = no_markers[start+k];
|
||||
no_markers[start+k] = no_markers[end-k];
|
||||
no_markers[end-k] = t;
|
||||
}
|
||||
}
|
||||
|
||||
levels = grub_malloc (sizeof (levels[0]) * logical_len);
|
||||
if (!levels)
|
||||
return -1;
|
||||
|
||||
resolved_types = grub_malloc (sizeof (resolved_types[0]) * logical_len);
|
||||
if (!resolved_types)
|
||||
{
|
||||
grub_free (levels);
|
||||
return -1;
|
||||
}
|
||||
|
||||
no_markers = grub_malloc (sizeof (resolved_types[0]) * logical_len);
|
||||
if (!no_markers)
|
||||
{
|
||||
grub_free (resolved_types);
|
||||
grub_free (levels);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < logical_len; i++)
|
||||
{
|
||||
type = get_bidi_type (logical[i]);
|
||||
if (type == GRUB_BIDI_TYPE_L || type == GRUB_BIDI_TYPE_AL
|
||||
|| type == GRUB_BIDI_TYPE_R)
|
||||
break;
|
||||
}
|
||||
if (type == GRUB_BIDI_TYPE_R || type == GRUB_BIDI_TYPE_AL)
|
||||
base_level = 1;
|
||||
else
|
||||
base_level = 0;
|
||||
|
||||
cur_level = base_level;
|
||||
cur_override = OVERRIDE_NEUTRAL;
|
||||
for (i = 0; i < logical_len; i++)
|
||||
{
|
||||
type = get_bidi_type (logical[i]);
|
||||
switch (type)
|
||||
{
|
||||
case GRUB_BIDI_TYPE_RLE:
|
||||
push_stack (cur_override, (cur_level | 1) + 1);
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_RLO:
|
||||
push_stack (OVERRIDE_R, (cur_level | 1) + 1);
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_LRE:
|
||||
push_stack (cur_override, (cur_level & ~1) + 2);
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_LRO:
|
||||
push_stack (OVERRIDE_L, (cur_level & ~1) + 2);
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_PDF:
|
||||
pop_stack ();
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_BN:
|
||||
break;
|
||||
default:
|
||||
levels[no_markers_len] = cur_level;
|
||||
if (cur_override != OVERRIDE_NEUTRAL)
|
||||
resolved_types[no_markers_len] =
|
||||
(cur_override == OVERRIDE_L) ? GRUB_BIDI_TYPE_L : GRUB_BIDI_TYPE_R;
|
||||
else
|
||||
resolved_types[no_markers_len] = type;
|
||||
no_markers[no_markers_len] = logical[i];
|
||||
no_markers_len++;
|
||||
}
|
||||
}
|
||||
|
||||
for (run_start = 0; run_start < no_markers_len; run_start = run_end)
|
||||
{
|
||||
unsigned prev_level, next_level, cur_run_level;
|
||||
unsigned last_type, last_strong_type;
|
||||
for (run_end = run_start; run_end < no_markers_len &&
|
||||
levels[run_end] == levels[run_start]; run_end++);
|
||||
if (run_start == 0)
|
||||
prev_level = base_level;
|
||||
else
|
||||
prev_level = levels[run_start - 1];
|
||||
if (run_end == no_markers_len)
|
||||
next_level = base_level;
|
||||
else
|
||||
next_level = levels[run_end];
|
||||
cur_run_level = levels[run_start];
|
||||
if (prev_level & 1)
|
||||
last_type = GRUB_BIDI_TYPE_R;
|
||||
else
|
||||
last_type = GRUB_BIDI_TYPE_L;
|
||||
last_strong_type = last_type;
|
||||
for (i = run_start; i < run_end; i++)
|
||||
{
|
||||
switch (resolved_types[i])
|
||||
{
|
||||
case GRUB_BIDI_TYPE_NSM:
|
||||
resolved_types[i] = last_type;
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_EN:
|
||||
if (last_strong_type == GRUB_BIDI_TYPE_AL)
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_AN;
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_L:
|
||||
case GRUB_BIDI_TYPE_R:
|
||||
last_strong_type = resolved_types[i];
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_ES:
|
||||
if (last_type == GRUB_BIDI_TYPE_EN
|
||||
&& i + 1 < run_end
|
||||
&& resolved_types[i + 1] == GRUB_BIDI_TYPE_EN)
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_EN;
|
||||
else
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_ON;
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_ET:
|
||||
{
|
||||
unsigned j;
|
||||
if (last_type == GRUB_BIDI_TYPE_EN)
|
||||
{
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_EN;
|
||||
break;
|
||||
}
|
||||
for (j = i; j < run_end
|
||||
&& resolved_types[j] == GRUB_BIDI_TYPE_ET; j++);
|
||||
if (j != run_end && resolved_types[j] == GRUB_BIDI_TYPE_EN)
|
||||
{
|
||||
for (; i < run_end
|
||||
&& resolved_types[i] == GRUB_BIDI_TYPE_ET; i++)
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_EN;
|
||||
i--;
|
||||
break;
|
||||
}
|
||||
for (; i < run_end
|
||||
&& resolved_types[i] == GRUB_BIDI_TYPE_ET; i++)
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_ON;
|
||||
i--;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_CS:
|
||||
if (last_type == GRUB_BIDI_TYPE_EN
|
||||
&& i + 1 < run_end
|
||||
&& resolved_types[i + 1] == GRUB_BIDI_TYPE_EN)
|
||||
{
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_EN;
|
||||
break;
|
||||
}
|
||||
if (last_type == GRUB_BIDI_TYPE_AN
|
||||
&& i + 1 < run_end
|
||||
&& (resolved_types[i + 1] == GRUB_BIDI_TYPE_AN
|
||||
|| (resolved_types[i + 1] == GRUB_BIDI_TYPE_EN
|
||||
&& last_strong_type == GRUB_BIDI_TYPE_AL)))
|
||||
{
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_EN;
|
||||
break;
|
||||
}
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_ON;
|
||||
break;
|
||||
case GRUB_BIDI_TYPE_AL:
|
||||
last_strong_type = resolved_types[i];
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_R;
|
||||
break;
|
||||
default: /* Make GCC happy. */
|
||||
break;
|
||||
}
|
||||
last_type = resolved_types[i];
|
||||
if (resolved_types[i] == GRUB_BIDI_TYPE_EN
|
||||
&& last_strong_type == GRUB_BIDI_TYPE_L)
|
||||
resolved_types[i] = GRUB_BIDI_TYPE_L;
|
||||
}
|
||||
if (prev_level & 1)
|
||||
last_type = GRUB_BIDI_TYPE_R;
|
||||
else
|
||||
last_type = GRUB_BIDI_TYPE_L;
|
||||
for (i = run_start; i < run_end; )
|
||||
{
|
||||
unsigned j;
|
||||
unsigned next_type;
|
||||
for (j = i; j < run_end &&
|
||||
(resolved_types[j] == GRUB_BIDI_TYPE_B
|
||||
|| resolved_types[j] == GRUB_BIDI_TYPE_S
|
||||
|| resolved_types[j] == GRUB_BIDI_TYPE_WS
|
||||
|| resolved_types[j] == GRUB_BIDI_TYPE_ON); j++);
|
||||
if (j == i)
|
||||
{
|
||||
if (resolved_types[i] == GRUB_BIDI_TYPE_L)
|
||||
last_type = GRUB_BIDI_TYPE_L;
|
||||
else
|
||||
last_type = GRUB_BIDI_TYPE_R;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if (j == run_end)
|
||||
next_type = (next_level & 1) ? GRUB_BIDI_TYPE_R : GRUB_BIDI_TYPE_L;
|
||||
else
|
||||
{
|
||||
if (resolved_types[j] == GRUB_BIDI_TYPE_L)
|
||||
next_type = GRUB_BIDI_TYPE_L;
|
||||
else
|
||||
next_type = GRUB_BIDI_TYPE_R;
|
||||
}
|
||||
if (next_type == last_type)
|
||||
for (; i < j; i++)
|
||||
resolved_types[i] = last_type;
|
||||
else
|
||||
for (; i < j; i++)
|
||||
resolved_types[i] = (cur_run_level & 1) ? GRUB_BIDI_TYPE_R
|
||||
: GRUB_BIDI_TYPE_L;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < no_markers_len; i++)
|
||||
{
|
||||
if (!(levels[i] & 1) && resolved_types[i] == GRUB_BIDI_TYPE_R)
|
||||
{
|
||||
levels[i]++;
|
||||
continue;
|
||||
}
|
||||
if (!(levels[i] & 1) && (resolved_types[i] == GRUB_BIDI_TYPE_AN
|
||||
|| resolved_types[i] == GRUB_BIDI_TYPE_EN))
|
||||
{
|
||||
levels[i] += 2;
|
||||
continue;
|
||||
}
|
||||
if ((levels[i] & 1) && (resolved_types[i] == GRUB_BIDI_TYPE_L
|
||||
|| resolved_types[i] == GRUB_BIDI_TYPE_AN
|
||||
|| resolved_types[i] == GRUB_BIDI_TYPE_EN))
|
||||
{
|
||||
levels[i]++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
grub_free (resolved_types);
|
||||
/* TODO: put line-wrapping here. */
|
||||
{
|
||||
unsigned min_odd_level = 0xffffffff;
|
||||
unsigned max_level = 0;
|
||||
unsigned j;
|
||||
for (i = 0; i < no_markers_len; i++)
|
||||
{
|
||||
if (levels[i] > max_level)
|
||||
max_level = levels[i];
|
||||
if (levels[i] < min_odd_level && (levels[i] & 1))
|
||||
min_odd_level = levels[i];
|
||||
}
|
||||
for (j = max_level; j >= min_odd_level; j--)
|
||||
{
|
||||
unsigned in = 0;
|
||||
for (i = 0; i < no_markers_len; i++)
|
||||
{
|
||||
if (i != 0 && levels[i] >= j && levels[i-1] < j)
|
||||
in = i;
|
||||
if (levels[i] >= j && (i + 1 == no_markers_len || levels[i+1] < j))
|
||||
revert (in, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grub_free (levels);
|
||||
|
||||
*visual = no_markers;
|
||||
return no_markers_len;
|
||||
}
|
||||
|
||||
/* Draw a UTF-8 string of text on the current video render target.
|
||||
The x coordinate specifies the starting x position for the first character,
|
||||
while the y coordinate specifies the baseline position.
|
||||
|
@ -1057,19 +1412,29 @@ grub_font_draw_string (const char *str, grub_font_t font,
|
|||
{
|
||||
int x;
|
||||
struct grub_font_glyph *glyph;
|
||||
grub_uint32_t code;
|
||||
const grub_uint8_t *ptr;
|
||||
grub_uint32_t *logical, *visual, *ptr;
|
||||
grub_ssize_t logical_len, visual_len;
|
||||
|
||||
for (ptr = (const grub_uint8_t *) str, x = left_x;
|
||||
grub_utf8_to_ucs4 (&code, 1, ptr, -1, &ptr) > 0; )
|
||||
logical_len = grub_utf8_to_ucs4_alloc (str, &logical, 0);
|
||||
if (logical_len < 0)
|
||||
return grub_errno;
|
||||
|
||||
visual_len = grub_err_bidi_logical_to_visual (logical, logical_len, &visual);
|
||||
grub_free (logical);
|
||||
if (visual_len < 0)
|
||||
return grub_errno;
|
||||
|
||||
for (ptr = visual, x = left_x; ptr < visual + visual_len; ptr++)
|
||||
{
|
||||
glyph = grub_font_get_glyph_with_fallback (font, code);
|
||||
glyph = grub_font_get_glyph_with_fallback (font, *ptr);
|
||||
if (grub_font_draw_glyph (glyph, color, x, baseline_y)
|
||||
!= GRUB_ERR_NONE)
|
||||
return grub_errno;
|
||||
x += glyph->device_width;
|
||||
}
|
||||
|
||||
grub_free (visual);
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
|
60
include/grub/bidi.h
Normal file
60
include/grub/bidi.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_BIDI_HEADER
|
||||
#define GRUB_BIDI_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
|
||||
struct grub_bidi_compact_range
|
||||
{
|
||||
grub_uint32_t start:24;
|
||||
grub_uint32_t end:24;
|
||||
grub_uint8_t type;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
enum grub_bidi_type
|
||||
{
|
||||
GRUB_BIDI_TYPE_L = 0,
|
||||
GRUB_BIDI_TYPE_LRE,
|
||||
GRUB_BIDI_TYPE_LRO,
|
||||
GRUB_BIDI_TYPE_R,
|
||||
GRUB_BIDI_TYPE_AL,
|
||||
GRUB_BIDI_TYPE_RLE,
|
||||
GRUB_BIDI_TYPE_RLO,
|
||||
GRUB_BIDI_TYPE_PDF,
|
||||
GRUB_BIDI_TYPE_EN,
|
||||
GRUB_BIDI_TYPE_ES,
|
||||
GRUB_BIDI_TYPE_ET,
|
||||
GRUB_BIDI_TYPE_AN,
|
||||
GRUB_BIDI_TYPE_CS,
|
||||
GRUB_BIDI_TYPE_NSM,
|
||||
GRUB_BIDI_TYPE_BN,
|
||||
GRUB_BIDI_TYPE_B,
|
||||
GRUB_BIDI_TYPE_S,
|
||||
GRUB_BIDI_TYPE_WS,
|
||||
GRUB_BIDI_TYPE_ON
|
||||
};
|
||||
|
||||
extern struct grub_bidi_compact_range grub_bidi_compact[];
|
||||
|
||||
#define GRUB_BIDI_MAX_CACHED_UNICODE_CHAR 0x20000
|
||||
/* Unicode mandates an arbitrary limit. */
|
||||
#define GRUB_BIDI_MAX_EXPLICIT_LEVEL 61
|
||||
|
||||
#endif
|
458
unidata.c
Normal file
458
unidata.c
Normal file
|
@ -0,0 +1,458 @@
|
|||
#include <grub/bidi.h>
|
||||
|
||||
struct grub_bidi_compact_range grub_bidi_compact[] = {
|
||||
{0x0, 0x8, GRUB_BIDI_TYPE_BN},
|
||||
{0x9, 0x9, GRUB_BIDI_TYPE_S},
|
||||
{0xa, 0xa, GRUB_BIDI_TYPE_B},
|
||||
{0xb, 0xb, GRUB_BIDI_TYPE_S},
|
||||
{0xc, 0xc, GRUB_BIDI_TYPE_WS},
|
||||
{0xd, 0xd, GRUB_BIDI_TYPE_B},
|
||||
{0xe, 0x1b, GRUB_BIDI_TYPE_BN},
|
||||
{0x1c, 0x1e, GRUB_BIDI_TYPE_B},
|
||||
{0x1f, 0x1f, GRUB_BIDI_TYPE_S},
|
||||
{0x20, 0x20, GRUB_BIDI_TYPE_WS},
|
||||
{0x21, 0x22, GRUB_BIDI_TYPE_ON},
|
||||
{0x23, 0x25, GRUB_BIDI_TYPE_ET},
|
||||
{0x26, 0x2a, GRUB_BIDI_TYPE_ON},
|
||||
{0x2b, 0x2b, GRUB_BIDI_TYPE_ES},
|
||||
{0x2c, 0x2c, GRUB_BIDI_TYPE_CS},
|
||||
{0x2d, 0x2d, GRUB_BIDI_TYPE_ES},
|
||||
{0x2e, 0x2f, GRUB_BIDI_TYPE_CS},
|
||||
{0x30, 0x39, GRUB_BIDI_TYPE_EN},
|
||||
{0x3a, 0x3a, GRUB_BIDI_TYPE_CS},
|
||||
{0x3b, 0x40, GRUB_BIDI_TYPE_ON},
|
||||
{0x5b, 0x60, GRUB_BIDI_TYPE_ON},
|
||||
{0x7b, 0x7e, GRUB_BIDI_TYPE_ON},
|
||||
{0x7f, 0x84, GRUB_BIDI_TYPE_BN},
|
||||
{0x85, 0x85, GRUB_BIDI_TYPE_B},
|
||||
{0x86, 0x9f, GRUB_BIDI_TYPE_BN},
|
||||
{0xa0, 0xa0, GRUB_BIDI_TYPE_CS},
|
||||
{0xa1, 0xa1, GRUB_BIDI_TYPE_ON},
|
||||
{0xa2, 0xa5, GRUB_BIDI_TYPE_ET},
|
||||
{0xa6, 0xa9, GRUB_BIDI_TYPE_ON},
|
||||
{0xab, 0xac, GRUB_BIDI_TYPE_ON},
|
||||
{0xad, 0xad, GRUB_BIDI_TYPE_BN},
|
||||
{0xae, 0xaf, GRUB_BIDI_TYPE_ON},
|
||||
{0xb0, 0xb1, GRUB_BIDI_TYPE_ET},
|
||||
{0xb2, 0xb3, GRUB_BIDI_TYPE_EN},
|
||||
{0xb4, 0xb4, GRUB_BIDI_TYPE_ON},
|
||||
{0xb6, 0xb8, GRUB_BIDI_TYPE_ON},
|
||||
{0xb9, 0xb9, GRUB_BIDI_TYPE_EN},
|
||||
{0xbb, 0xbf, GRUB_BIDI_TYPE_ON},
|
||||
{0xd7, 0xd7, GRUB_BIDI_TYPE_ON},
|
||||
{0xf7, 0xf7, GRUB_BIDI_TYPE_ON},
|
||||
{0x2b9, 0x2ba, GRUB_BIDI_TYPE_ON},
|
||||
{0x2c2, 0x2cf, GRUB_BIDI_TYPE_ON},
|
||||
{0x2d2, 0x2df, GRUB_BIDI_TYPE_ON},
|
||||
{0x2e5, 0x2ed, GRUB_BIDI_TYPE_ON},
|
||||
{0x2ef, 0x2ff, GRUB_BIDI_TYPE_ON},
|
||||
{0x300, 0x36f, GRUB_BIDI_TYPE_NSM},
|
||||
{0x374, 0x375, GRUB_BIDI_TYPE_ON},
|
||||
{0x37e, 0x37e, GRUB_BIDI_TYPE_ON},
|
||||
{0x384, 0x385, GRUB_BIDI_TYPE_ON},
|
||||
{0x387, 0x387, GRUB_BIDI_TYPE_ON},
|
||||
{0x3f6, 0x3f6, GRUB_BIDI_TYPE_ON},
|
||||
{0x483, 0x489, GRUB_BIDI_TYPE_NSM},
|
||||
{0x58a, 0x58a, GRUB_BIDI_TYPE_ON},
|
||||
{0x591, 0x5bd, GRUB_BIDI_TYPE_NSM},
|
||||
{0x5be, 0x5be, GRUB_BIDI_TYPE_R},
|
||||
{0x5bf, 0x5bf, GRUB_BIDI_TYPE_NSM},
|
||||
{0x5c0, 0x5c0, GRUB_BIDI_TYPE_R},
|
||||
{0x5c1, 0x5c2, GRUB_BIDI_TYPE_NSM},
|
||||
{0x5c3, 0x5c3, GRUB_BIDI_TYPE_R},
|
||||
{0x5c4, 0x5c5, GRUB_BIDI_TYPE_NSM},
|
||||
{0x5c6, 0x5c6, GRUB_BIDI_TYPE_R},
|
||||
{0x5c7, 0x5c7, GRUB_BIDI_TYPE_NSM},
|
||||
{0x5d0, 0x5ea, GRUB_BIDI_TYPE_R},
|
||||
{0x5f0, 0x5f4, GRUB_BIDI_TYPE_R},
|
||||
{0x600, 0x603, GRUB_BIDI_TYPE_AN},
|
||||
{0x606, 0x607, GRUB_BIDI_TYPE_ON},
|
||||
{0x608, 0x608, GRUB_BIDI_TYPE_AL},
|
||||
{0x609, 0x60a, GRUB_BIDI_TYPE_ET},
|
||||
{0x60b, 0x60b, GRUB_BIDI_TYPE_AL},
|
||||
{0x60c, 0x60c, GRUB_BIDI_TYPE_CS},
|
||||
{0x60d, 0x60d, GRUB_BIDI_TYPE_AL},
|
||||
{0x60e, 0x60f, GRUB_BIDI_TYPE_ON},
|
||||
{0x610, 0x61a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x61b, 0x61b, GRUB_BIDI_TYPE_AL},
|
||||
{0x61e, 0x61f, GRUB_BIDI_TYPE_AL},
|
||||
{0x621, 0x64a, GRUB_BIDI_TYPE_AL},
|
||||
{0x64b, 0x65e, GRUB_BIDI_TYPE_NSM},
|
||||
{0x660, 0x669, GRUB_BIDI_TYPE_AN},
|
||||
{0x66a, 0x66a, GRUB_BIDI_TYPE_ET},
|
||||
{0x66b, 0x66c, GRUB_BIDI_TYPE_AN},
|
||||
{0x66d, 0x66f, GRUB_BIDI_TYPE_AL},
|
||||
{0x670, 0x670, GRUB_BIDI_TYPE_NSM},
|
||||
{0x671, 0x6d5, GRUB_BIDI_TYPE_AL},
|
||||
{0x6d6, 0x6dc, GRUB_BIDI_TYPE_NSM},
|
||||
{0x6dd, 0x6dd, GRUB_BIDI_TYPE_AN},
|
||||
{0x6de, 0x6e4, GRUB_BIDI_TYPE_NSM},
|
||||
{0x6e5, 0x6e6, GRUB_BIDI_TYPE_AL},
|
||||
{0x6e7, 0x6e8, GRUB_BIDI_TYPE_NSM},
|
||||
{0x6e9, 0x6e9, GRUB_BIDI_TYPE_ON},
|
||||
{0x6ea, 0x6ed, GRUB_BIDI_TYPE_NSM},
|
||||
{0x6ee, 0x6ef, GRUB_BIDI_TYPE_AL},
|
||||
{0x6f0, 0x6f9, GRUB_BIDI_TYPE_EN},
|
||||
{0x6fa, 0x70d, GRUB_BIDI_TYPE_AL},
|
||||
{0x70f, 0x70f, GRUB_BIDI_TYPE_BN},
|
||||
{0x710, 0x710, GRUB_BIDI_TYPE_AL},
|
||||
{0x711, 0x711, GRUB_BIDI_TYPE_NSM},
|
||||
{0x712, 0x72f, GRUB_BIDI_TYPE_AL},
|
||||
{0x730, 0x74a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x74d, 0x7a5, GRUB_BIDI_TYPE_AL},
|
||||
{0x7a6, 0x7b0, GRUB_BIDI_TYPE_NSM},
|
||||
{0x7b1, 0x7b1, GRUB_BIDI_TYPE_AL},
|
||||
{0x7c0, 0x7ea, GRUB_BIDI_TYPE_R},
|
||||
{0x7eb, 0x7f3, GRUB_BIDI_TYPE_NSM},
|
||||
{0x7f4, 0x7f5, GRUB_BIDI_TYPE_R},
|
||||
{0x7f6, 0x7f9, GRUB_BIDI_TYPE_ON},
|
||||
{0x7fa, 0x7fa, GRUB_BIDI_TYPE_R},
|
||||
{0x901, 0x902, GRUB_BIDI_TYPE_NSM},
|
||||
{0x93c, 0x93c, GRUB_BIDI_TYPE_NSM},
|
||||
{0x941, 0x948, GRUB_BIDI_TYPE_NSM},
|
||||
{0x94d, 0x94d, GRUB_BIDI_TYPE_NSM},
|
||||
{0x951, 0x954, GRUB_BIDI_TYPE_NSM},
|
||||
{0x962, 0x963, GRUB_BIDI_TYPE_NSM},
|
||||
{0x981, 0x981, GRUB_BIDI_TYPE_NSM},
|
||||
{0x9bc, 0x9bc, GRUB_BIDI_TYPE_NSM},
|
||||
{0x9c1, 0x9c4, GRUB_BIDI_TYPE_NSM},
|
||||
{0x9cd, 0x9cd, GRUB_BIDI_TYPE_NSM},
|
||||
{0x9e2, 0x9e3, GRUB_BIDI_TYPE_NSM},
|
||||
{0x9f2, 0x9f3, GRUB_BIDI_TYPE_ET},
|
||||
{0xa01, 0xa02, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa3c, 0xa3c, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa41, 0xa42, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa47, 0xa48, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa4b, 0xa4d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa51, 0xa51, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa70, 0xa71, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa75, 0xa75, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa81, 0xa82, GRUB_BIDI_TYPE_NSM},
|
||||
{0xabc, 0xabc, GRUB_BIDI_TYPE_NSM},
|
||||
{0xac1, 0xac5, GRUB_BIDI_TYPE_NSM},
|
||||
{0xac7, 0xac8, GRUB_BIDI_TYPE_NSM},
|
||||
{0xacd, 0xacd, GRUB_BIDI_TYPE_NSM},
|
||||
{0xae2, 0xae3, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaf1, 0xaf1, GRUB_BIDI_TYPE_ET},
|
||||
{0xb01, 0xb01, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb3c, 0xb3c, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb3f, 0xb3f, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb41, 0xb44, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb4d, 0xb4d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb56, 0xb56, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb62, 0xb63, GRUB_BIDI_TYPE_NSM},
|
||||
{0xb82, 0xb82, GRUB_BIDI_TYPE_NSM},
|
||||
{0xbc0, 0xbc0, GRUB_BIDI_TYPE_NSM},
|
||||
{0xbcd, 0xbcd, GRUB_BIDI_TYPE_NSM},
|
||||
{0xbf3, 0xbf8, GRUB_BIDI_TYPE_ON},
|
||||
{0xbf9, 0xbf9, GRUB_BIDI_TYPE_ET},
|
||||
{0xbfa, 0xbfa, GRUB_BIDI_TYPE_ON},
|
||||
{0xc3e, 0xc40, GRUB_BIDI_TYPE_NSM},
|
||||
{0xc46, 0xc48, GRUB_BIDI_TYPE_NSM},
|
||||
{0xc4a, 0xc4d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xc55, 0xc56, GRUB_BIDI_TYPE_NSM},
|
||||
{0xc62, 0xc63, GRUB_BIDI_TYPE_NSM},
|
||||
{0xc78, 0xc7e, GRUB_BIDI_TYPE_ON},
|
||||
{0xcbc, 0xcbc, GRUB_BIDI_TYPE_NSM},
|
||||
{0xccc, 0xccd, GRUB_BIDI_TYPE_NSM},
|
||||
{0xce2, 0xce3, GRUB_BIDI_TYPE_NSM},
|
||||
{0xcf1, 0xcf2, GRUB_BIDI_TYPE_ON},
|
||||
{0xd41, 0xd44, GRUB_BIDI_TYPE_NSM},
|
||||
{0xd4d, 0xd4d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xd62, 0xd63, GRUB_BIDI_TYPE_NSM},
|
||||
{0xdca, 0xdca, GRUB_BIDI_TYPE_NSM},
|
||||
{0xdd2, 0xdd4, GRUB_BIDI_TYPE_NSM},
|
||||
{0xdd6, 0xdd6, GRUB_BIDI_TYPE_NSM},
|
||||
{0xe31, 0xe31, GRUB_BIDI_TYPE_NSM},
|
||||
{0xe34, 0xe3a, GRUB_BIDI_TYPE_NSM},
|
||||
{0xe3f, 0xe3f, GRUB_BIDI_TYPE_ET},
|
||||
{0xe47, 0xe4e, GRUB_BIDI_TYPE_NSM},
|
||||
{0xeb1, 0xeb1, GRUB_BIDI_TYPE_NSM},
|
||||
{0xeb4, 0xeb9, GRUB_BIDI_TYPE_NSM},
|
||||
{0xebb, 0xebc, GRUB_BIDI_TYPE_NSM},
|
||||
{0xec8, 0xecd, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf18, 0xf19, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf35, 0xf35, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf37, 0xf37, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf39, 0xf39, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf3a, 0xf3d, GRUB_BIDI_TYPE_ON},
|
||||
{0xf71, 0xf7e, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf80, 0xf84, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf86, 0xf87, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf90, 0xf97, GRUB_BIDI_TYPE_NSM},
|
||||
{0xf99, 0xfbc, GRUB_BIDI_TYPE_NSM},
|
||||
{0xfc6, 0xfc6, GRUB_BIDI_TYPE_NSM},
|
||||
{0x102d, 0x1030, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1032, 0x1037, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1039, 0x103a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x103d, 0x103e, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1058, 0x1059, GRUB_BIDI_TYPE_NSM},
|
||||
{0x105e, 0x1060, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1071, 0x1074, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1082, 0x1082, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1085, 0x1086, GRUB_BIDI_TYPE_NSM},
|
||||
{0x108d, 0x108d, GRUB_BIDI_TYPE_NSM},
|
||||
{0x135f, 0x135f, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1390, 0x1399, GRUB_BIDI_TYPE_ON},
|
||||
{0x1680, 0x1680, GRUB_BIDI_TYPE_WS},
|
||||
{0x169b, 0x169c, GRUB_BIDI_TYPE_ON},
|
||||
{0x1712, 0x1714, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1732, 0x1734, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1752, 0x1753, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1772, 0x1773, GRUB_BIDI_TYPE_NSM},
|
||||
{0x17b7, 0x17bd, GRUB_BIDI_TYPE_NSM},
|
||||
{0x17c6, 0x17c6, GRUB_BIDI_TYPE_NSM},
|
||||
{0x17c9, 0x17d3, GRUB_BIDI_TYPE_NSM},
|
||||
{0x17db, 0x17db, GRUB_BIDI_TYPE_ET},
|
||||
{0x17dd, 0x17dd, GRUB_BIDI_TYPE_NSM},
|
||||
{0x17f0, 0x17f9, GRUB_BIDI_TYPE_ON},
|
||||
{0x1800, 0x180a, GRUB_BIDI_TYPE_ON},
|
||||
{0x180b, 0x180d, GRUB_BIDI_TYPE_NSM},
|
||||
{0x180e, 0x180e, GRUB_BIDI_TYPE_WS},
|
||||
{0x18a9, 0x18a9, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1920, 0x1922, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1927, 0x1928, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1932, 0x1932, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1939, 0x193b, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1940, 0x1940, GRUB_BIDI_TYPE_ON},
|
||||
{0x1944, 0x1945, GRUB_BIDI_TYPE_ON},
|
||||
{0x19de, 0x19ff, GRUB_BIDI_TYPE_ON},
|
||||
{0x1a17, 0x1a18, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b00, 0x1b03, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b34, 0x1b34, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b36, 0x1b3a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b3c, 0x1b3c, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b42, 0x1b42, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b6b, 0x1b73, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1b80, 0x1b81, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1ba2, 0x1ba5, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1ba8, 0x1ba9, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1c2c, 0x1c33, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1c36, 0x1c37, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1dc0, 0x1de6, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1dfe, 0x1dff, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1fbd, 0x1fbd, GRUB_BIDI_TYPE_ON},
|
||||
{0x1fbf, 0x1fc1, GRUB_BIDI_TYPE_ON},
|
||||
{0x1fcd, 0x1fcf, GRUB_BIDI_TYPE_ON},
|
||||
{0x1fdd, 0x1fdf, GRUB_BIDI_TYPE_ON},
|
||||
{0x1fed, 0x1fef, GRUB_BIDI_TYPE_ON},
|
||||
{0x1ffd, 0x1ffe, GRUB_BIDI_TYPE_ON},
|
||||
{0x2000, 0x200a, GRUB_BIDI_TYPE_WS},
|
||||
{0x200b, 0x200d, GRUB_BIDI_TYPE_BN},
|
||||
{0x200f, 0x200f, GRUB_BIDI_TYPE_R},
|
||||
{0x2010, 0x2027, GRUB_BIDI_TYPE_ON},
|
||||
{0x2028, 0x2028, GRUB_BIDI_TYPE_WS},
|
||||
{0x2029, 0x2029, GRUB_BIDI_TYPE_B},
|
||||
{0x202a, 0x202a, GRUB_BIDI_TYPE_LRE},
|
||||
{0x202b, 0x202b, GRUB_BIDI_TYPE_RLE},
|
||||
{0x202c, 0x202c, GRUB_BIDI_TYPE_PDF},
|
||||
{0x202d, 0x202d, GRUB_BIDI_TYPE_LRO},
|
||||
{0x202e, 0x202e, GRUB_BIDI_TYPE_RLO},
|
||||
{0x202f, 0x202f, GRUB_BIDI_TYPE_CS},
|
||||
{0x2030, 0x2034, GRUB_BIDI_TYPE_ET},
|
||||
{0x2035, 0x2043, GRUB_BIDI_TYPE_ON},
|
||||
{0x2044, 0x2044, GRUB_BIDI_TYPE_CS},
|
||||
{0x2045, 0x205e, GRUB_BIDI_TYPE_ON},
|
||||
{0x205f, 0x205f, GRUB_BIDI_TYPE_WS},
|
||||
{0x2060, 0x2064, GRUB_BIDI_TYPE_BN},
|
||||
{0x206a, 0x206f, GRUB_BIDI_TYPE_BN},
|
||||
{0x2070, 0x2070, GRUB_BIDI_TYPE_EN},
|
||||
{0x2074, 0x2079, GRUB_BIDI_TYPE_EN},
|
||||
{0x207a, 0x207b, GRUB_BIDI_TYPE_ES},
|
||||
{0x207c, 0x207e, GRUB_BIDI_TYPE_ON},
|
||||
{0x2080, 0x2089, GRUB_BIDI_TYPE_EN},
|
||||
{0x208a, 0x208b, GRUB_BIDI_TYPE_ES},
|
||||
{0x208c, 0x208e, GRUB_BIDI_TYPE_ON},
|
||||
{0x20a0, 0x20b5, GRUB_BIDI_TYPE_ET},
|
||||
{0x20d0, 0x20f0, GRUB_BIDI_TYPE_NSM},
|
||||
{0x2100, 0x2101, GRUB_BIDI_TYPE_ON},
|
||||
{0x2103, 0x2106, GRUB_BIDI_TYPE_ON},
|
||||
{0x2108, 0x2109, GRUB_BIDI_TYPE_ON},
|
||||
{0x2114, 0x2114, GRUB_BIDI_TYPE_ON},
|
||||
{0x2116, 0x2118, GRUB_BIDI_TYPE_ON},
|
||||
{0x211e, 0x2123, GRUB_BIDI_TYPE_ON},
|
||||
{0x2125, 0x2125, GRUB_BIDI_TYPE_ON},
|
||||
{0x2127, 0x2127, GRUB_BIDI_TYPE_ON},
|
||||
{0x2129, 0x2129, GRUB_BIDI_TYPE_ON},
|
||||
{0x212e, 0x212e, GRUB_BIDI_TYPE_ET},
|
||||
{0x213a, 0x213b, GRUB_BIDI_TYPE_ON},
|
||||
{0x2140, 0x2144, GRUB_BIDI_TYPE_ON},
|
||||
{0x214a, 0x214d, GRUB_BIDI_TYPE_ON},
|
||||
{0x2153, 0x215f, GRUB_BIDI_TYPE_ON},
|
||||
{0x2190, 0x2211, GRUB_BIDI_TYPE_ON},
|
||||
{0x2212, 0x2212, GRUB_BIDI_TYPE_ES},
|
||||
{0x2213, 0x2213, GRUB_BIDI_TYPE_ET},
|
||||
{0x2214, 0x2335, GRUB_BIDI_TYPE_ON},
|
||||
{0x237b, 0x2394, GRUB_BIDI_TYPE_ON},
|
||||
{0x2396, 0x23e7, GRUB_BIDI_TYPE_ON},
|
||||
{0x2400, 0x2426, GRUB_BIDI_TYPE_ON},
|
||||
{0x2440, 0x244a, GRUB_BIDI_TYPE_ON},
|
||||
{0x2460, 0x2487, GRUB_BIDI_TYPE_ON},
|
||||
{0x2488, 0x249b, GRUB_BIDI_TYPE_EN},
|
||||
{0x24ea, 0x269d, GRUB_BIDI_TYPE_ON},
|
||||
{0x26a0, 0x26ab, GRUB_BIDI_TYPE_ON},
|
||||
{0x26ad, 0x26bc, GRUB_BIDI_TYPE_ON},
|
||||
{0x26c0, 0x26c3, GRUB_BIDI_TYPE_ON},
|
||||
{0x2701, 0x2704, GRUB_BIDI_TYPE_ON},
|
||||
{0x2706, 0x2709, GRUB_BIDI_TYPE_ON},
|
||||
{0x270c, 0x2727, GRUB_BIDI_TYPE_ON},
|
||||
{0x2729, 0x274b, GRUB_BIDI_TYPE_ON},
|
||||
{0x274d, 0x274d, GRUB_BIDI_TYPE_ON},
|
||||
{0x274f, 0x2752, GRUB_BIDI_TYPE_ON},
|
||||
{0x2756, 0x2756, GRUB_BIDI_TYPE_ON},
|
||||
{0x2758, 0x275e, GRUB_BIDI_TYPE_ON},
|
||||
{0x2761, 0x2794, GRUB_BIDI_TYPE_ON},
|
||||
{0x2798, 0x27af, GRUB_BIDI_TYPE_ON},
|
||||
{0x27b1, 0x27be, GRUB_BIDI_TYPE_ON},
|
||||
{0x27c0, 0x27ca, GRUB_BIDI_TYPE_ON},
|
||||
{0x27cc, 0x27cc, GRUB_BIDI_TYPE_ON},
|
||||
{0x27d0, 0x27ff, GRUB_BIDI_TYPE_ON},
|
||||
{0x2900, 0x2b4c, GRUB_BIDI_TYPE_ON},
|
||||
{0x2b50, 0x2b54, GRUB_BIDI_TYPE_ON},
|
||||
{0x2ce5, 0x2cea, GRUB_BIDI_TYPE_ON},
|
||||
{0x2cf9, 0x2cff, GRUB_BIDI_TYPE_ON},
|
||||
{0x2de0, 0x2dff, GRUB_BIDI_TYPE_NSM},
|
||||
{0x2e00, 0x2e30, GRUB_BIDI_TYPE_ON},
|
||||
{0x2e80, 0x2e99, GRUB_BIDI_TYPE_ON},
|
||||
{0x2e9b, 0x2ef3, GRUB_BIDI_TYPE_ON},
|
||||
{0x2f00, 0x2fd5, GRUB_BIDI_TYPE_ON},
|
||||
{0x2ff0, 0x2ffb, GRUB_BIDI_TYPE_ON},
|
||||
{0x3000, 0x3000, GRUB_BIDI_TYPE_WS},
|
||||
{0x3001, 0x3004, GRUB_BIDI_TYPE_ON},
|
||||
{0x3008, 0x3020, GRUB_BIDI_TYPE_ON},
|
||||
{0x302a, 0x302f, GRUB_BIDI_TYPE_NSM},
|
||||
{0x3030, 0x3030, GRUB_BIDI_TYPE_ON},
|
||||
{0x3036, 0x3037, GRUB_BIDI_TYPE_ON},
|
||||
{0x303d, 0x303f, GRUB_BIDI_TYPE_ON},
|
||||
{0x3099, 0x309a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x309b, 0x309c, GRUB_BIDI_TYPE_ON},
|
||||
{0x30a0, 0x30a0, GRUB_BIDI_TYPE_ON},
|
||||
{0x30fb, 0x30fb, GRUB_BIDI_TYPE_ON},
|
||||
{0x31c0, 0x31e3, GRUB_BIDI_TYPE_ON},
|
||||
{0x321d, 0x321e, GRUB_BIDI_TYPE_ON},
|
||||
{0x3250, 0x325f, GRUB_BIDI_TYPE_ON},
|
||||
{0x327c, 0x327e, GRUB_BIDI_TYPE_ON},
|
||||
{0x32b1, 0x32bf, GRUB_BIDI_TYPE_ON},
|
||||
{0x32cc, 0x32cf, GRUB_BIDI_TYPE_ON},
|
||||
{0x3377, 0x337a, GRUB_BIDI_TYPE_ON},
|
||||
{0x33de, 0x33df, GRUB_BIDI_TYPE_ON},
|
||||
{0x33ff, 0x33ff, GRUB_BIDI_TYPE_ON},
|
||||
{0x4dc0, 0x4dff, GRUB_BIDI_TYPE_ON},
|
||||
{0xa490, 0xa4c6, GRUB_BIDI_TYPE_ON},
|
||||
{0xa60d, 0xa60f, GRUB_BIDI_TYPE_ON},
|
||||
{0xa66f, 0xa672, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa673, 0xa673, GRUB_BIDI_TYPE_ON},
|
||||
{0xa67c, 0xa67d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa67e, 0xa67f, GRUB_BIDI_TYPE_ON},
|
||||
{0xa700, 0xa721, GRUB_BIDI_TYPE_ON},
|
||||
{0xa788, 0xa788, GRUB_BIDI_TYPE_ON},
|
||||
{0xa802, 0xa802, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa806, 0xa806, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa80b, 0xa80b, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa825, 0xa826, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa828, 0xa82b, GRUB_BIDI_TYPE_ON},
|
||||
{0xa874, 0xa877, GRUB_BIDI_TYPE_ON},
|
||||
{0xa8c4, 0xa8c4, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa926, 0xa92d, GRUB_BIDI_TYPE_NSM},
|
||||
{0xa947, 0xa951, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaa29, 0xaa2e, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaa31, 0xaa32, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaa35, 0xaa36, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaa43, 0xaa43, GRUB_BIDI_TYPE_NSM},
|
||||
{0xaa4c, 0xaa4c, GRUB_BIDI_TYPE_NSM},
|
||||
{0xfb1d, 0xfb1d, GRUB_BIDI_TYPE_R},
|
||||
{0xfb1e, 0xfb1e, GRUB_BIDI_TYPE_NSM},
|
||||
{0xfb1f, 0xfb28, GRUB_BIDI_TYPE_R},
|
||||
{0xfb29, 0xfb29, GRUB_BIDI_TYPE_ES},
|
||||
{0xfb2a, 0xfb36, GRUB_BIDI_TYPE_R},
|
||||
{0xfb38, 0xfb3c, GRUB_BIDI_TYPE_R},
|
||||
{0xfb3e, 0xfb3e, GRUB_BIDI_TYPE_R},
|
||||
{0xfb40, 0xfb41, GRUB_BIDI_TYPE_R},
|
||||
{0xfb43, 0xfb44, GRUB_BIDI_TYPE_R},
|
||||
{0xfb46, 0xfb4f, GRUB_BIDI_TYPE_R},
|
||||
{0xfb50, 0xfbb1, GRUB_BIDI_TYPE_AL},
|
||||
{0xfbd3, 0xfd3d, GRUB_BIDI_TYPE_AL},
|
||||
{0xfd3e, 0xfd3f, GRUB_BIDI_TYPE_ON},
|
||||
{0xfd50, 0xfd8f, GRUB_BIDI_TYPE_AL},
|
||||
{0xfd92, 0xfdc7, GRUB_BIDI_TYPE_AL},
|
||||
{0xfdf0, 0xfdfc, GRUB_BIDI_TYPE_AL},
|
||||
{0xfdfd, 0xfdfd, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe00, 0xfe0f, GRUB_BIDI_TYPE_NSM},
|
||||
{0xfe10, 0xfe19, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe20, 0xfe26, GRUB_BIDI_TYPE_NSM},
|
||||
{0xfe30, 0xfe4f, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe50, 0xfe50, GRUB_BIDI_TYPE_CS},
|
||||
{0xfe51, 0xfe51, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe52, 0xfe52, GRUB_BIDI_TYPE_CS},
|
||||
{0xfe54, 0xfe54, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe55, 0xfe55, GRUB_BIDI_TYPE_CS},
|
||||
{0xfe56, 0xfe5e, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe5f, 0xfe5f, GRUB_BIDI_TYPE_ET},
|
||||
{0xfe60, 0xfe61, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe62, 0xfe63, GRUB_BIDI_TYPE_ES},
|
||||
{0xfe64, 0xfe66, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe68, 0xfe68, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe69, 0xfe6a, GRUB_BIDI_TYPE_ET},
|
||||
{0xfe6b, 0xfe6b, GRUB_BIDI_TYPE_ON},
|
||||
{0xfe70, 0xfe74, GRUB_BIDI_TYPE_AL},
|
||||
{0xfe76, 0xfefc, GRUB_BIDI_TYPE_AL},
|
||||
{0xfeff, 0xfeff, GRUB_BIDI_TYPE_BN},
|
||||
{0xff01, 0xff02, GRUB_BIDI_TYPE_ON},
|
||||
{0xff03, 0xff05, GRUB_BIDI_TYPE_ET},
|
||||
{0xff06, 0xff0a, GRUB_BIDI_TYPE_ON},
|
||||
{0xff0b, 0xff0b, GRUB_BIDI_TYPE_ES},
|
||||
{0xff0c, 0xff0c, GRUB_BIDI_TYPE_CS},
|
||||
{0xff0d, 0xff0d, GRUB_BIDI_TYPE_ES},
|
||||
{0xff0e, 0xff0f, GRUB_BIDI_TYPE_CS},
|
||||
{0xff10, 0xff19, GRUB_BIDI_TYPE_EN},
|
||||
{0xff1a, 0xff1a, GRUB_BIDI_TYPE_CS},
|
||||
{0xff1b, 0xff20, GRUB_BIDI_TYPE_ON},
|
||||
{0xff3b, 0xff40, GRUB_BIDI_TYPE_ON},
|
||||
{0xff5b, 0xff65, GRUB_BIDI_TYPE_ON},
|
||||
{0xffe0, 0xffe1, GRUB_BIDI_TYPE_ET},
|
||||
{0xffe2, 0xffe4, GRUB_BIDI_TYPE_ON},
|
||||
{0xffe5, 0xffe6, GRUB_BIDI_TYPE_ET},
|
||||
{0xffe8, 0xffee, GRUB_BIDI_TYPE_ON},
|
||||
{0xfff9, 0xfffd, GRUB_BIDI_TYPE_ON},
|
||||
{0x10101, 0x10101, GRUB_BIDI_TYPE_ON},
|
||||
{0x10140, 0x1018a, GRUB_BIDI_TYPE_ON},
|
||||
{0x10190, 0x1019b, GRUB_BIDI_TYPE_ON},
|
||||
{0x101fd, 0x101fd, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10800, 0x10805, GRUB_BIDI_TYPE_R},
|
||||
{0x10808, 0x10808, GRUB_BIDI_TYPE_R},
|
||||
{0x1080a, 0x10835, GRUB_BIDI_TYPE_R},
|
||||
{0x10837, 0x10838, GRUB_BIDI_TYPE_R},
|
||||
{0x1083c, 0x1083c, GRUB_BIDI_TYPE_R},
|
||||
{0x1083f, 0x1083f, GRUB_BIDI_TYPE_R},
|
||||
{0x10900, 0x10919, GRUB_BIDI_TYPE_R},
|
||||
{0x1091f, 0x1091f, GRUB_BIDI_TYPE_ON},
|
||||
{0x10920, 0x10939, GRUB_BIDI_TYPE_R},
|
||||
{0x1093f, 0x1093f, GRUB_BIDI_TYPE_R},
|
||||
{0x10a00, 0x10a00, GRUB_BIDI_TYPE_R},
|
||||
{0x10a01, 0x10a03, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10a05, 0x10a06, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10a0c, 0x10a0f, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10a10, 0x10a13, GRUB_BIDI_TYPE_R},
|
||||
{0x10a15, 0x10a17, GRUB_BIDI_TYPE_R},
|
||||
{0x10a19, 0x10a33, GRUB_BIDI_TYPE_R},
|
||||
{0x10a38, 0x10a3a, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10a3f, 0x10a3f, GRUB_BIDI_TYPE_NSM},
|
||||
{0x10a40, 0x10a47, GRUB_BIDI_TYPE_R},
|
||||
{0x10a50, 0x10a58, GRUB_BIDI_TYPE_R},
|
||||
{0x1d167, 0x1d169, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1d173, 0x1d17a, GRUB_BIDI_TYPE_BN},
|
||||
{0x1d17b, 0x1d182, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1d185, 0x1d18b, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1d1aa, 0x1d1ad, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1d200, 0x1d241, GRUB_BIDI_TYPE_ON},
|
||||
{0x1d242, 0x1d244, GRUB_BIDI_TYPE_NSM},
|
||||
{0x1d245, 0x1d245, GRUB_BIDI_TYPE_ON},
|
||||
{0x1d300, 0x1d356, GRUB_BIDI_TYPE_ON},
|
||||
{0x1d7ce, 0x1d7ff, GRUB_BIDI_TYPE_EN},
|
||||
{0x1f000, 0x1f02b, GRUB_BIDI_TYPE_ON},
|
||||
{0x1f030, 0x1f093, GRUB_BIDI_TYPE_ON},
|
||||
{0xe0001, 0xe0001, GRUB_BIDI_TYPE_BN},
|
||||
{0xe0020, 0xe007f, GRUB_BIDI_TYPE_BN},
|
||||
{0xe0100, 0xe01ef, GRUB_BIDI_TYPE_NSM},
|
||||
{0, 0, 0},
|
||||
};
|
19336
util/UnicodeData.txt
Normal file
19336
util/UnicodeData.txt
Normal file
File diff suppressed because it is too large
Load diff
52
util/import_bidi.py
Normal file
52
util/import_bidi.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
#*
|
||||
#* GRUB -- GRand Unified Bootloader
|
||||
#* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#*
|
||||
#* GRUB is free software: you can redistribute it and/or modify
|
||||
#* it under the terms of the GNU General Public License as published by
|
||||
#* the Free Software Foundation, either version 3 of the License, or
|
||||
#* (at your option) any later version.
|
||||
#*
|
||||
#* GRUB is distributed in the hope that it will be useful,
|
||||
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#* GNU General Public License for more details.
|
||||
#*
|
||||
#* You should have received a copy of the GNU General Public License
|
||||
#* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
#*
|
||||
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
import datetime
|
||||
|
||||
if len (sys.argv) < 3:
|
||||
print ("Usage: %s SOURCE DESTINATION" % sys.argv[0])
|
||||
exit (0)
|
||||
infile = open (sys.argv[1], "r")
|
||||
outfile = open (sys.argv[2], "w")
|
||||
outfile.write ("#include <grub/bidi.h>\n")
|
||||
outfile.write ("\n")
|
||||
outfile.write ("struct grub_bidi_compact_range grub_bidi_compact[] = {\n")
|
||||
|
||||
begin = -2
|
||||
last = -2
|
||||
lasttype = "X"
|
||||
for line in infile:
|
||||
sp = line.split (";")
|
||||
cur = int (sp[0], 16)
|
||||
curtype = sp[4]
|
||||
if last + 1 != cur or curtype != lasttype:
|
||||
if begin != -2 and lasttype != "L":
|
||||
outfile.write (("{0x%x, 0x%x, GRUB_BIDI_TYPE_%s},\n" \
|
||||
% (begin, last, lasttype)))
|
||||
begin = cur
|
||||
last = cur
|
||||
lasttype = curtype
|
||||
if lasttype != "L":
|
||||
outfile.write (("{0x%x, 0x%x, GRUB_BIDI_TYPE_%s},\n" \
|
||||
% (begin, last, lasttype)))
|
||||
outfile.write ("{0, 0, 0},\n")
|
||||
|
||||
outfile.write ("};")
|
Loading…
Reference in a new issue