Basic thaana support

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-29 13:31:03 +02:00
parent e2588ccbfe
commit 0546172e3e
2 changed files with 36 additions and 5 deletions

View file

@ -1259,6 +1259,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id,
case GRUB_UNICODE_COMB_ARABIC_SHADDA:
case GRUB_UNICODE_COMB_HEBREW_RAFE:
case GRUB_UNICODE_STACK_ABOVE:
stacked_above:
space = combining_glyphs[i]->offset_y
- grub_font_get_xheight (combining_glyphs[i]->font) - 1;
if (space <= 0)
@ -1291,6 +1292,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id,
/* I don't know how ypogegrammeni differs from subscript. */
case GRUB_UNICODE_COMB_YPOGEGRAMMENI:
case GRUB_UNICODE_STACK_BELOW:
stacked_below:
space = -(combining_glyphs[i]->offset_y
+ combining_glyphs[i]->height);
if (space <= 0)
@ -1303,6 +1305,24 @@ blit_comb (const struct grub_unicode_glyph *glyph_id,
min_devwidth = combining_glyphs[i]->width;
break;
case GRUB_UNICODE_COMB_MN:
switch (glyph_id->combining[i].code)
{
case GRUB_UNICODE_THAANA_ABAFILI:
case GRUB_UNICODE_THAANA_AABAAFILI:
case GRUB_UNICODE_THAANA_UBUFILI:
case GRUB_UNICODE_THAANA_OOBOOFILI:
case GRUB_UNICODE_THAANA_EBEFILI:
case GRUB_UNICODE_THAANA_EYBEYFILI:
case GRUB_UNICODE_THAANA_OBOFILI:
case GRUB_UNICODE_THAANA_OABOAFILI:
case GRUB_UNICODE_THAANA_SUKUN:
goto stacked_above;
case GRUB_UNICODE_THAANA_IBIFILI:
case GRUB_UNICODE_THAANA_EEBEEFILI:
goto stacked_below;
}
/* Fall through. */
default:
{
/* Default handling. Just draw combining character on top

View file

@ -173,8 +173,19 @@ struct grub_unicode_glyph
#define GRUB_UNICODE_HEBREW_WAW 0x05d5
#define GRUB_UNICODE_ZWNJ 0x200c
#define GRUB_UNICODE_ZWJ 0x200d
#define GRUB_UNICODE_ARABIC_START 0x600
#define GRUB_UNICODE_ARABIC_END 0x700
#define GRUB_UNICODE_ARABIC_START 0x0600
#define GRUB_UNICODE_ARABIC_END 0x0700
#define GRUB_UNICODE_THAANA_ABAFILI 0x07a6
#define GRUB_UNICODE_THAANA_AABAAFILI 0x07a7
#define GRUB_UNICODE_THAANA_IBIFILI 0x07a8
#define GRUB_UNICODE_THAANA_EEBEEFILI 0x07a9
#define GRUB_UNICODE_THAANA_UBUFILI 0x07aa
#define GRUB_UNICODE_THAANA_OOBOOFILI 0x07ab
#define GRUB_UNICODE_THAANA_EBEFILI 0x07ac
#define GRUB_UNICODE_THAANA_EYBEYFILI 0x07ad
#define GRUB_UNICODE_THAANA_OBOFILI 0x07ae
#define GRUB_UNICODE_THAANA_OABOAFILI 0x07af
#define GRUB_UNICODE_THAANA_SUKUN 0x07b0
extern struct grub_unicode_compact_range grub_unicode_compact[];
extern struct grub_unicode_bidi_pair grub_unicode_bidi_pairs[];