Support BIDI for UNICODE charsets and cleanup the implementation

This commit is contained in:
Vincent Wei
2018-08-27 18:55:12 +08:00
parent e7924ebd51
commit 808718bdb4
10 changed files with 942 additions and 623 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ SRC_FILES = charset.c charset-arabic.c charset-bidi.c \
bitmapfont.c scripteasy.c
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype1.h freetype2.h qpf.h \
upf.h bitmapfont.h gunicode.h gunichartables.h se_minigui.h
upf.h bitmapfont.h gunicode.h gunichartables.h se_minigui.h unicode-bidi-tables.h
EXTRA_DIST = convgbmap.c jisunimap.c $(SRC_FILES) $(HDR_FILES) \
makefile.ng makefile.msvc
+141 -15
View File
@@ -468,13 +468,127 @@ static unsigned int iso8859_6_glyph_type (Glyph32 glyph_value)
return ch_type;
}
static BidiCharType __mg_iso8859_68x_type[] = {
/*0x00~0x0f*/
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_SS, BIDI_TYPE_BS, BIDI_TYPE_SS,
BIDI_TYPE_WS, BIDI_TYPE_BS, BIDI_TYPE_BN, BIDI_TYPE_BN,
/*0x10~0x1f*/
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BS, BIDI_TYPE_BS, BIDI_TYPE_BS, BIDI_TYPE_SS,
/*0x20~0x2f*/
BIDI_TYPE_WS, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ET,
BIDI_TYPE_ET, BIDI_TYPE_ET, BIDI_TYPE_ON, BIDI_TYPE_ON,
BIDI_TYPE_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IDI_TYPE_ON,
/*0x100~0x10f*/
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
/*0x110~0x11f*/
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
/*0x120~0x12f*/
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
/*0x130~0x133*/
BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
};
static unsigned int iso8859_6_bidi_glyph_type (Glyph32 glyph_value)
{
unsigned int ch_type = BIDI_TYPE_AL;
ch_type = bidi_glyph_type(FONT_CHARSET_ISO8859_6, glyph_value);
return ch_type;
return __mg_iso8859_68x_type [REAL_GLYPH(glyph_value)];
}
static int get_table_index(Uint8 c)
@@ -652,13 +766,6 @@ static const unsigned char* iso8859_6_get_next_word (const unsigned char* mstr,
//return sb_get_next_word(mstr, mstrlen, word_info);
}
static Glyph32* iso8859_6_bidi_str_reorder (Glyph32* glyphs, int len)
{
return bidi_str_reorder (FONT_CHARSET_ISO8859_6, glyphs, len);
}
/*if cur_len>1, search ligature shape,
* else search letter or phonetic symbol shape*/
static Glyph32 iso8859_6_glyph_shape (const unsigned char* cur_mchar,
@@ -714,6 +821,26 @@ static Glyph32 iso8859_6_glyph_shape (const unsigned char* cur_mchar,
return glyph_value;
}
static const BIDICHAR_MIRROR_MAP __mg_iso8859_68x_mirror_table [] =
{
{0x0028, 0x0029},
{0x0029, 0x0028},
{0x003C, 0x003E},
{0x003E, 0x003C},
{0x005B, 0x005D},
{0x005D, 0x005B},
{0x007B, 0x007D},
{0x007D, 0x007B},
// {0x00AB, 0x00BB},
// {0x00BB, 0x00AB}
};
static BOOL iso8859_6_bidi_mirror_glyph (Glyph32 glyph, Glyph32* mirrored)
{
return get_mirror_glyph (__mg_iso8859_68x_mirror_table,
TABLESIZE (__mg_iso8859_68x_mirror_table), glyph, mirrored);
}
static CHARSETOPS CharsetOps_iso8859_6 = {
256,
3,
@@ -722,14 +849,14 @@ static CHARSETOPS CharsetOps_iso8859_6 = {
iso8859_6_len_first_char,
iso8859_6_char_glyph_value,
iso8859_6_glyph_shape,
iso8859_6_bidi_glyph_type,
iso8859_6_glyph_type,
sb_nr_chars_in_str,
iso8859_6_is_this_charset,
sb_len_first_substr,
iso8859_6_get_next_word,
sb_pos_first_char,
iso8859_6_bidi_str_reorder,
iso8859_6_bidi_mirror_glyph,
iso8859_6_bidi_glyph_type,
#ifdef _MGCHARSET_UNICODE
iso8859_6_conv_to_uc32,
iso8859_6_conv_from_uc32
@@ -752,5 +879,4 @@ int test_glyph_value (int char_index, Glyph32 glyph_value)
}
#endif
#endif /* _ARABIC */
+103 -500
View File
File diff suppressed because it is too large Load Diff
+230 -42
View File
File diff suppressed because it is too large Load Diff
+404
View File
@@ -0,0 +1,404 @@
/*
* This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
* This program 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
* Or,
*
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
*
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
*
* For more information about the commercial license, please refer to
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
/*
** unicode-bidi-tables.h: the Unicode BIDI tables.
**
** Created by VincentWei at 2018/08/27
*/
#ifndef _UNICODE_BIDI_TABLES_H
#define _UNICODE_BIDI_TABLES_H
typedef struct _bidichar_type_map
{
BidiCharType type; // Type of Unicode characters
Glyph32 glyph; // Starting index of Unicode character
Uint8 count; // Total number of Unicode characters of same type starting from glyphn
} BIDICHAR_TYPE_MAP;
static const BIDICHAR_TYPE_MAP __mg_unicode_bidi_char_type_map []=
{
{ BIDI_TYPE_ON, 0x0000, 0x06},
{ BIDI_TYPE_NSM, 0x0006, 0x04},
{ BIDI_TYPE_BS, 0x000a, 0x01},
{ BIDI_TYPE_ON, 0x000b, 0x02},
{ BIDI_TYPE_BS, 0x000d, 0x01},
{ BIDI_TYPE_ON, 0x000e, 0x05},
{ BIDI_TYPE_WS, 0x0013, 0x01},
{ BIDI_TYPE_ON, 0x0014, 0x08},
{ BIDI_TYPE_ON, 0x001c, 0x04},
{ BIDI_TYPE_WS, 0x0020, 0x01},
{ BIDI_TYPE_ON, 0x0021, 0x02},
{ BIDI_TYPE_ET, 0x0023, 0x03},
{ BIDI_TYPE_ON, 0x0026, 0x05},
{ BIDI_TYPE_ET, 0x002b, 0x01},
{ BIDI_TYPE_CS, 0x002c, 0x01},
{ BIDI_TYPE_ES, 0x002d, 0x01},
{ BIDI_TYPE_CS, 0x002e, 0x02},
{ BIDI_TYPE_EN, 0x0030, 0x0a},
{ BIDI_TYPE_CS, 0x003a, 0x01},
{ BIDI_TYPE_ON, 0x003b, 0x06},
{ BIDI_TYPE_LTR, 0x0041, 0x1a},
{ BIDI_TYPE_ON, 0x005b, 0x02},
{ BIDI_TYPE_ON, 0x005d, 0x03},
{ BIDI_TYPE_NSM, 0x0060, 0x01},
{ BIDI_TYPE_LTR, 0x0061, 0x1a},
{ BIDI_TYPE_ON, 0x007b, 0x01},
{ BIDI_TYPE_SS, 0x007c, 0x01},
{ BIDI_TYPE_ON, 0x007d, 0x03},
{ BIDI_TYPE_BN, 0x0080, 0x05},
{ BIDI_TYPE_BS, 0x0085, 0x01},
{ BIDI_TYPE_BN, 0x0086, 0x1a},
{ BIDI_TYPE_CS, 0x00a0, 0x01},
{ BIDI_TYPE_ON, 0x00a1, 0x01},
{ BIDI_TYPE_ET, 0x00a2, 0x04},
{ BIDI_TYPE_ON, 0x00a6, 0x04},
{ BIDI_TYPE_LTR, 0x00aa, 0x01},
{ BIDI_TYPE_ON, 0x00ab, 0x05},
{ BIDI_TYPE_ET, 0x00b0, 0x02},
{ BIDI_TYPE_EN, 0x00b2, 0x02},
{ BIDI_TYPE_ON, 0x00b4, 0x01},
{ BIDI_TYPE_LTR, 0x00b5, 0x01},
{ BIDI_TYPE_ON, 0x00b6, 0x03},
{ BIDI_TYPE_EN, 0x00b9, 0x01},
{ BIDI_TYPE_LTR, 0x00ba, 0x01},
{ BIDI_TYPE_ON, 0x00bb, 0x05},
{ BIDI_TYPE_LTR, 0x00c0, 0x17},
{ BIDI_TYPE_ON, 0x00d7, 0x01},
{ BIDI_TYPE_LTR, 0x00d8, 0x1f},
{ BIDI_TYPE_ON, 0x00f7, 0x01},
{ BIDI_TYPE_LTR, 0x00f8, 0x29},
{ BIDI_TYPE_LTR, 0x0222, 0x12},
{ BIDI_TYPE_LTR, 0x0250, 0x5e},
{ BIDI_TYPE_LTR, 0x02b0, 0x09},
{ BIDI_TYPE_ON, 0x02b9, 0x02},
{ BIDI_TYPE_LTR, 0x02bb, 0x07},
{ BIDI_TYPE_ON, 0x02c2, 0x0e},
{ BIDI_TYPE_LTR, 0x02d0, 0x02},
{ BIDI_TYPE_ON, 0x02d2, 0x0e},
{ BIDI_TYPE_LTR, 0x02e0, 0x05},
{ BIDI_TYPE_ON, 0x02e5, 0x09},
{ BIDI_TYPE_LTR, 0x02ee, 0x01},
{ BIDI_TYPE_NSM, 0x0300, 0x50},
{ BIDI_TYPE_NSM, 0x0360, 0x10},
{ BIDI_TYPE_LTR, 0x0400, 0x83},
{ BIDI_TYPE_NSM, 0x0483, 0x04},
{ BIDI_TYPE_NSM, 0x0488, 0x02},
{ BIDI_TYPE_LTR, 0x048a, 0x45},
{ BIDI_TYPE_LTR, 0x04d0, 0x26},
{ BIDI_TYPE_LTR, 0x04f8, 0x02},
{ BIDI_TYPE_LTR, 0x0500, 0x10},
{ BIDI_TYPE_AL, 0x0591, 0x11},
{ BIDI_TYPE_AL, 0x05a3, 0x17},
{ BIDI_TYPE_AL, 0x05bb, 0x0A},
{ BIDI_TYPE_AL, 0x05d0, 0x1B},
{ BIDI_TYPE_AL, 0x05f0, 0x05},
{ BIDI_TYPE_CS, 0x060c, 0x01},
{ BIDI_TYPE_AL, 0x061b, 0x01},
{ BIDI_TYPE_AL, 0x061f, 0x01},
{ BIDI_TYPE_AL, 0x0621, 0x1a},
{ BIDI_TYPE_AL, 0x0640, 0x0b},
{ BIDI_TYPE_NSM, 0x064b, 0x0b},
{ BIDI_TYPE_AN, 0x0660, 0x0a},
{ BIDI_TYPE_ET, 0x066a, 0x01},
{ BIDI_TYPE_AN, 0x066b, 0x02},
{ BIDI_TYPE_AL, 0x066d, 0x03},
{ BIDI_TYPE_NSM, 0x0670, 0x01},
{ BIDI_TYPE_AL, 0x0671, 0x65},
{ BIDI_TYPE_NSM, 0x06d6, 0x07},
{ BIDI_TYPE_AL, 0x06dd, 0x01},
{ BIDI_TYPE_NSM, 0x06de, 0x07},
{ BIDI_TYPE_AL, 0x06e5, 0x02},
{ BIDI_TYPE_NSM, 0x06e7, 0x02},
{ BIDI_TYPE_ON, 0x06e9, 0x01},
{ BIDI_TYPE_NSM, 0x06ea, 0x04},
{ BIDI_TYPE_EN, 0x06f0, 0x0a},
{ BIDI_TYPE_AL, 0x06fa, 0x05},
{ BIDI_TYPE_LTR, 0x0e01, 0x30},
{ BIDI_TYPE_NSM, 0x0e31, 0x01},
{ BIDI_TYPE_LTR, 0x0e32, 0x02},
{ BIDI_TYPE_LTR, 0x0e34, 0x07},
{ BIDI_TYPE_ET, 0x0e3f, 0x01},
{ BIDI_TYPE_LTR, 0x0e40, 0x07},
{ BIDI_TYPE_LTR, 0x0e47, 0x08},
{ BIDI_TYPE_LTR, 0x0e4f, 0x0d},
{ BIDI_TYPE_LTR, 0x1e00, 0x9c},
{ BIDI_TYPE_LTR, 0x1ea0, 0x5a},
{ BIDI_TYPE_WS, 0x2000, 0x0b},
{ BIDI_TYPE_BN, 0x200b, 0x03},
{ BIDI_TYPE_LTR, 0x200e, 0x01},
{ BIDI_TYPE_RTL, 0x200f, 0x01},
{ BIDI_TYPE_ON, 0x2010, 0x18},
{ BIDI_TYPE_WS, 0x2028, 0x01},
{ BIDI_TYPE_BS, 0x2029, 0x01},
{ BIDI_TYPE_LRE, 0x202a, 0x01},
{ BIDI_TYPE_RLE, 0x202b, 0x01},
{ BIDI_TYPE_PDF, 0x202c, 0x01},
{ BIDI_TYPE_LRO, 0x202d, 0x01},
{ BIDI_TYPE_RLO, 0x202e, 0x01},
{ BIDI_TYPE_WS, 0x202f, 0x01},
{ BIDI_TYPE_ET, 0x2030, 0x05},
{ BIDI_TYPE_ON, 0x2035, 0x1e},
{ BIDI_TYPE_ON, 0x2057, 0x01},
{ BIDI_TYPE_WS, 0x205f, 0x01},
{ BIDI_TYPE_BN, 0x2060, 0x04},
{ BIDI_TYPE_BN, 0x206a, 0x06},
{ BIDI_TYPE_EN, 0x2070, 0x01},
{ BIDI_TYPE_LTR, 0x2071, 0x01},
{ BIDI_TYPE_EN, 0x2074, 0x06},
{ BIDI_TYPE_ET, 0x207a, 0x02},
{ BIDI_TYPE_ON, 0x207c, 0x03},
{ BIDI_TYPE_LTR, 0x207f, 0x01},
{ BIDI_TYPE_EN, 0x2080, 0x0a},
{ BIDI_TYPE_ET, 0x208a, 0x02},
{ BIDI_TYPE_ON, 0x208c, 0x03},
{ BIDI_TYPE_ET, 0x20a0, 0x12},
{ BIDI_TYPE_NSM, 0x20d0, 0x1b},
{ BIDI_TYPE_ON, 0x2100, 0x02},
{ BIDI_TYPE_LTR, 0x2102, 0x01},
{ BIDI_TYPE_ON, 0x2103, 0x04},
{ BIDI_TYPE_LTR, 0x2107, 0x01},
{ BIDI_TYPE_ON, 0x2108, 0x02},
{ BIDI_TYPE_LTR, 0x210a, 0x0a},
{ BIDI_TYPE_ON, 0x2114, 0x01},
{ BIDI_TYPE_LTR, 0x2115, 0x01},
{ BIDI_TYPE_ON, 0x2116, 0x03},
{ BIDI_TYPE_LTR, 0x2119, 0x05},
{ BIDI_TYPE_ON, 0x211e, 0x06},
{ BIDI_TYPE_LTR, 0x2124, 0x01},
{ BIDI_TYPE_ON, 0x2125, 0x01},
{ BIDI_TYPE_LTR, 0x2126, 0x01},
{ BIDI_TYPE_ON, 0x2127, 0x01},
{ BIDI_TYPE_LTR, 0x2128, 0x01},
{ BIDI_TYPE_ON, 0x2129, 0x01},
{ BIDI_TYPE_LTR, 0x212a, 0x04},
{ BIDI_TYPE_ET, 0x212e, 0x01},
{ BIDI_TYPE_LTR, 0x212f, 0x03},
{ BIDI_TYPE_ON, 0x2132, 0x01},
{ BIDI_TYPE_LTR, 0x2133, 0x07},
{ BIDI_TYPE_ON, 0x213a, 0x01},
{ BIDI_TYPE_LTR, 0x213d, 0x03},
{ BIDI_TYPE_ON, 0x2140, 0x05},
{ BIDI_TYPE_LTR, 0x2145, 0x05},
{ BIDI_TYPE_ON, 0x214a, 0x02},
{ BIDI_TYPE_ON, 0x2153, 0x0d},
{ BIDI_TYPE_LTR, 0x2160, 0x24},
{ BIDI_TYPE_ON, 0x2190, 0x82},
{ BIDI_TYPE_ET, 0x2212, 0x02},
{ BIDI_TYPE_ON, 0x2214, 0x22},
{ BIDI_TYPE_LTR, 0x2336, 0x45},
{ BIDI_TYPE_ON, 0x237b, 0x1a},
{ BIDI_TYPE_LTR, 0x2395, 0x01},
{ BIDI_TYPE_ON, 0x2396, 0x39},
{ BIDI_TYPE_ON, 0x2400, 0x27},
{ BIDI_TYPE_ON, 0x2440, 0x0b},
{ BIDI_TYPE_EN, 0x2460, 0x3c},
{ BIDI_TYPE_LTR, 0x249c, 0x4e},
{ BIDI_TYPE_EN, 0x24ea, 0x01},
{ BIDI_TYPE_ON, 0x24eb, 0x14},
{ BIDI_TYPE_ON, 0x2500, 0x14},
{ BIDI_TYPE_ON, 0x2616, 0x02},
{ BIDI_TYPE_ON, 0x2619, 0x65},
{ BIDI_TYPE_ON, 0x2680, 0x0a},
{ BIDI_TYPE_ON, 0x2701, 0x04},
{ BIDI_TYPE_ON, 0x2706, 0x04},
{ BIDI_TYPE_ON, 0x270c, 0x1c},
{ BIDI_TYPE_ON, 0x2729, 0x23},
{ BIDI_TYPE_ON, 0x274d, 0x01},
{ BIDI_TYPE_ON, 0x274f, 0x04},
{ BIDI_TYPE_ON, 0x2756, 0x01},
{ BIDI_TYPE_ON, 0x2758, 0x07},
{ BIDI_TYPE_ON, 0x2761, 0x34},
{ BIDI_TYPE_ON, 0x2798, 0x18},
{ BIDI_TYPE_ON, 0x27b1, 0x0e},
{ BIDI_TYPE_ON, 0x27d0, 0x1c},
{ BIDI_TYPE_ON, 0x27f0, 0x10},
{ BIDI_TYPE_ON, 0x2e80, 0x1a},
{ BIDI_TYPE_ON, 0x2e9b, 0x59},
{ BIDI_TYPE_ON, 0x2f00, 0xd6},
{ BIDI_TYPE_ON, 0x2ff0, 0x0c},
{ BIDI_TYPE_WS, 0x3000, 0x01},
{ BIDI_TYPE_ON, 0x3001, 0x04},
{ BIDI_TYPE_LTR, 0x3005, 0x03},
{ BIDI_TYPE_ON, 0x3008, 0x19},
{ BIDI_TYPE_LTR, 0x3021, 0x09},
{ BIDI_TYPE_NSM, 0x302a, 0x06},
{ BIDI_TYPE_ON, 0x3030, 0x01},
{ BIDI_TYPE_LTR, 0x3031, 0x05},
{ BIDI_TYPE_ON, 0x3036, 0x02},
{ BIDI_TYPE_LTR, 0x3038, 0x05},
{ BIDI_TYPE_ON, 0x303d, 0x03},
{ BIDI_TYPE_LTR, 0x3041, 0x56},
{ BIDI_TYPE_NSM, 0x3099, 0x02},
{ BIDI_TYPE_ON, 0x309b, 0x02},
{ BIDI_TYPE_LTR, 0x309d, 0x03},
{ BIDI_TYPE_ON, 0x30a0, 0x01},
{ BIDI_TYPE_LTR, 0x30a1, 0x5a},
{ BIDI_TYPE_ON, 0x30fb, 0x01},
{ BIDI_TYPE_LTR, 0x30fc, 0x04},
{ BIDI_TYPE_LTR, 0x3105, 0x28},
{ BIDI_TYPE_LTR, 0x3131, 0x5e},
{ BIDI_TYPE_LTR, 0x3190, 0x28},
{ BIDI_TYPE_LTR, 0x31f0, 0x2d},
{ BIDI_TYPE_LTR, 0x3220, 0x24},
{ BIDI_TYPE_ON, 0x3251, 0x0f},
{ BIDI_TYPE_LTR, 0x3260, 0x1c},
{ BIDI_TYPE_LTR, 0x327f, 0x32},
{ BIDI_TYPE_ON, 0x32b1, 0x0f},
{ BIDI_TYPE_LTR, 0x32c0, 0x0c},
{ BIDI_TYPE_LTR, 0x32d0, 0x2f},
{ BIDI_TYPE_LTR, 0x3300, 0x77},
{ BIDI_TYPE_LTR, 0x337b, 0x63},
{ BIDI_TYPE_LTR, 0x33e0, 0x1f},
{ BIDI_TYPE_LTR, 0x3400, 0x01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fe60, 0x02},
{ BIDI_TYPE_ET, 0xfe62, 0x02},
{ BIDI_TYPE_ON, 0xfe64, 0x03},
{ BIDI_TYPE_ON, 0xfe68, 0x01},
{ BIDI_TYPE_ET, 0xfe69, 0x02},
{ BIDI_TYPE_ON, 0xfe6b, 0x01},
{ BIDI_TYPE_AL, 0xfe70, 0x05},
{ BIDI_TYPE_AL, 0xfe76, 0x87},
{ BIDI_TYPE_BN, 0xfeff, 0x01},
{ BIDI_TYPE_ON, 0xff01, 0x02},
{ BIDI_TYPE_ET, 0xff03, 0x03},
{ BIDI_TYPE_ON, 0xff06, 0x05},
{ BIDI_TYPE_ET, 0xff0b, 0x01},
{ BIDI_TYPE_CS, 0xff0c, 0x01},
{ BIDI_TYPE_ET, 0xff0d, 0x01},
{ BIDI_TYPE_CS, 0xff0e, 0x01},
{ BIDI_TYPE_ES, 0xff0f, 0x01},
{ BIDI_TYPE_EN, 0xff10, 0x0a},
{ BIDI_TYPE_CS, 0xff1a, 0x01},
{ BIDI_TYPE_ON, 0xff1b, 0x06},
{ BIDI_TYPE_LTR, 0xff21, 0x1a},
{ BIDI_TYPE_ON, 0xff3b, 0x06},
{ BIDI_TYPE_LTR, 0xff41, 0x1a},
{ BIDI_TYPE_ON, 0xff5b, 0x0b},
{ BIDI_TYPE_LTR, 0xff66, 0x59},
{ BIDI_TYPE_LTR, 0xffc2, 0x06},
{ BIDI_TYPE_LTR, 0xffca, 0x06},
{ BIDI_TYPE_LTR, 0xffd2, 0x06},
{ BIDI_TYPE_LTR, 0xffda, 0x03},
{ BIDI_TYPE_ET, 0xffe0, 0x02},
{ BIDI_TYPE_ON, 0xffe2, 0x03},
{ BIDI_TYPE_ET, 0xffe5, 0x02},
{ BIDI_TYPE_ON, 0xffe8, 0x07},
{ BIDI_TYPE_BN, 0xfff9, 0x03},
{ BIDI_TYPE_ON, 0xfffc, 0x02},
};
static const BIDICHAR_MIRROR_MAP __mg_unicode_mirror_table []=
{
{0x0028, 0x0029},
{0x003c, 0x003e},
{0x005b, 0x005d},
{0x007b, 0x007d},
{0x00ab, 0x00bb},
{0x2039, 0x203a},
{0x2045, 0x2046},
{0x207d, 0x207e},
{0x208d, 0x208e},
{0x2208, 0x220b},
{0x2209, 0x220c},
{0x220a, 0x220d},
{0x2215, 0x29f5},
{0x2768, 0x2769},
{0x276a, 0x276b},
{0x276c, 0x276d},
{0x276e, 0x276f},
{0x2770, 0x2771},
{0x2772, 0x2773},
{0x2774, 0x2775},
{0x27d5, 0x27d6},
{0x27dd, 0x27de},
{0x27e2, 0x27e3},
{0x27e4, 0x27e5},
{0x27e6, 0x27e7},
{0x27e8, 0x27e9},
{0x27ea, 0x27eb},
{0x3008, 0x3009},
{0x300a, 0x300b},
{0x300c, 0x300d},
{0x300e, 0x300f},
{0x3010, 0x3011},
{0x3014, 0x3015},
{0x3016, 0x3017},
{0x3018, 0x3019},
{0x301a, 0x301b},
{0xff08, 0xff09},
{0xff1c, 0xff1e},
{0xff3b, 0xff3d},
{0xff5b, 0xff5d},
{0xff5f, 0xff60},
{0xff62, 0xff63}
};
#endif /* !_UNICODE_BIDI_TABLES_H */
+15 -18
View File
@@ -197,7 +197,7 @@ extern "C" {
/* Return the minimum level of the direction, 0 for BIDI_TYPE_LTR and
1 for BIDI_TYPE_RTL and BIDI_TYPE_AL. */
#define BIDI_DIR_TO_LEVEL(dir) ((BidiLevel)(dir & 1))
#define BIDI_DIR_TO_LEVEL(dir) ((BYTE)(dir & 1))
/* Is right to left? */
#define BIDI_IS_RTL(p) ((p) & BIDI_MASK_RTL)
@@ -251,31 +251,28 @@ extern "C" {
#define BIDI_NUMBER_TO_RTL(p) \
(BIDI_IS_NUMBER(p) ? BIDI_TYPE_RTL : (p))
#ifdef MAIN_CAP_TEST
typedef char BidiChar;
#else
typedef int BidiChar;
#endif
typedef int BidiCharType;
typedef char BidiLevel;
typedef int BidiStrIndex;
typedef struct _TYPERUN TYPERUN;
typedef Uint32 BidiCharType;
typedef struct _TYPERUN TYPERUN;
typedef struct _BIDICHAR_MIRROR_MAP {
Glyph32 glyph;
Glyph32 mirrored;
} BIDICHAR_MIRROR_MAP;
typedef void (*CB_DO_REORDER) (void* context, int len, int pos);
int bidi_glyph_type(const char* charset_name, Glyph32 glyph_value);
Glyph32* __mg_charset_bidi_glyphs_reorder (const CHARSETOPS* charset_ops, Glyph32* glyphs, int len);
Glyph32* bidi_str_reorder (const char* charset_name, Glyph32* glyphs,
int len);
Glyph32* __mg_charset_bidi_map_reorder (const CHARSETOPS* charset_ops, Glyph32* glyphs,
int len, GLYPHMAPINFO* map);
void bidi_get_embeddlevels(const char* charset_name, Glyph32* glyphs,
BidiStrIndex len, Uint8* embedding_level_list, Uint8 type);
void __mg_charset_bidi_get_embeddlevels (const CHARSETOPS* charset_ops, Glyph32* glyphs,
int len, Uint8* embedding_level_list, Uint8 type);
Glyph32* bidi_index_reorder (const char* charset_name, Glyph32* glyphs,
Glyph32* __mg_charset_bidi_index_reorder (const CHARSETOPS* charset_ops, Glyph32* glyphs,
int len, int* index_map);
Glyph32* bidi_map_reorder (const char* charset_name, Glyph32* glyphs,
int len, GLYPHMAPINFO* map);
BidiCharType __mg_charset_bidi_str_base_dir (const CHARSETOPS* charset_ops, Glyph32* glyphs, int len);
#ifdef __cplusplus
}
+24 -24
View File
@@ -117,63 +117,63 @@ static inline long get_opened_file_size (FILE* fp)
/** The character set operation structure. */
struct _CHARSETOPS
{
/** The character number of the character set. */
/** The character number of the character set. */
int nr_chars;
/** The byte number of the max length character. */
/** The byte number of the max length character. */
int bytes_maxlen_char;
/** The name of the character set. */
/** The name of the character set. */
const char* name;
/** Default character. */
/** Default character. */
Glyph32 def_glyph_value;
/** The method to get the length of the first character function. */
/** The method to get the length of the first character function. */
int (*len_first_char) (const unsigned char* mstr, int mstrlen);
/** The method to get character offset function. */
/** The method to get character offset function. */
Glyph32 (*char_glyph_value) (const unsigned char* pre_mchar, int pre_len,
const unsigned char* cur_mchar, int cur_len);
/** The method to get the require shape type glyph value. */
Glyph32 (*glyph_shape) (const unsigned char* cur_mchar, int cur_len, int shape_type);
/** The method to get the type of one glyph. */
unsigned int (*bidi_glyph_type) (Glyph32 glyph_value);
/** The method to get the type of one glyph. */
/** The method to get the type of one glyph. */
unsigned int (*glyph_type) (Glyph32 glyph_value);
/** The method to get character number in the string function. */
/** The method to get character number in the string function. */
int (*nr_chars_in_str) (const unsigned char* mstr, int mstrlen);
/** The method to judge the \a charset is belong to the character set
* function.
*/
/** The method to judge the \a charset is belong to the character set
* function.
*/
int (*is_this_charset) (const unsigned char* charset);
/** The method to get the length of the first substring. */
/** The method to get the length of the first substring. */
int (*len_first_substr) (const unsigned char* mstr, int mstrlen);
/** The method to get next word in the specitied length string function. */
/** The method to get next word in the specitied length string function. */
const unsigned char* (*get_next_word) (const unsigned char* mstr,
int strlen, WORDINFO* word_info);
/** The method to get the position of the first character in the
* specified length string function.
*/
/** The method to get the position of the first character in the
* specified length string function.
*/
int (*pos_first_char) (const unsigned char* mstr, int mstrlen);
/** reorder bidi string specified length function.
*/
Glyph32* (*bidi_reorder) (Glyph32* glyphs, int len);
/** The method to get the type of one glyph. */
unsigned int (*bidi_glyph_type) (Glyph32 glyph_value);
/** Get mirrored glyph
*/
BOOL (*bidi_mirror_glyph) (Glyph32 glyph, Glyph32* mirrored);
#ifdef _MGCHARSET_UNICODE
/** The method to convert \a mchar to 32 bit UNICODE function. */
/** The method to convert \a mchar to 32 bit UNICODE function. */
UChar32 (*conv_to_uc32) (Glyph32 glyph_value);
/** The method to convert \a wc to multily byte character function. */
/** The method to convert \a wc to multily byte character function. */
int (*conv_from_uc32) (UChar32 wc, unsigned char* mchar);
#endif /* _UNICODE_SUPPORT */
};
+20 -21
View File
@@ -471,11 +471,10 @@ Glyph32* _gdi_bidi_reorder (PDC pdc, const unsigned char* text, int text_len,
DEVFONT* mbc_devfont = pdc->pLogFont->mbc_devfont;
Glyph32 *logical_glyphs = NULL;
if (mbc_devfont && mbc_devfont->charset_ops->bidi_reorder) {
logical_glyphs = _gdi_get_glyphs_string(pdc, text, text_len,
nr_glyphs);
if (mbc_devfont && mbc_devfont->charset_ops->bidi_glyph_type) {
logical_glyphs = _gdi_get_glyphs_string (pdc, text, text_len, nr_glyphs);
if (*nr_glyphs > 0)
mbc_devfont->charset_ops->bidi_reorder (logical_glyphs, *nr_glyphs);
__mg_charset_bidi_glyphs_reorder (mbc_devfont->charset_ops, logical_glyphs, *nr_glyphs);
}
return logical_glyphs;
@@ -494,13 +493,13 @@ int _gdi_reorder_text (PDC pdc, const unsigned char* text, int text_len,
int nr_glyphs = 0;
Glyph32 *logical_glyphs = NULL;
if(mbc_devfont->charset_ops->bidi_reorder){
if (mbc_devfont->charset_ops->bidi_glyph_type) {
logical_glyphs = _gdi_bidi_reorder(pdc, text, text_len, &nr_glyphs);
logical_glyphs = _gdi_bidi_reorder (pdc, text, text_len, &nr_glyphs);
if(!logical_glyphs || nr_glyphs <= 0)
return 0;
i = _gdi_output_visual_glyphs(pdc, logical_glyphs, nr_glyphs,
i = _gdi_output_visual_glyphs (pdc, logical_glyphs, nr_glyphs,
direction, cb_one_glyph, context);
}
else if(!direction){
@@ -872,11 +871,11 @@ int _gdi_reorder_text_break (PDC pdc, const unsigned char* text,
int nr_glyphs = text_len;
Glyph32 *logical_glyphs = NULL;
if(mbc_devfont->charset_ops->bidi_reorder){
if (mbc_devfont->charset_ops->bidi_glyph_type){
logical_glyphs = _gdi_get_glyphs_string_break(pdc, text, text_len,
&nr_glyphs, context);
mbc_devfont->charset_ops->bidi_reorder(logical_glyphs, nr_glyphs);
__mg_charset_bidi_glyphs_reorder (mbc_devfont->charset_ops, logical_glyphs, nr_glyphs);
if(!logical_glyphs)
return 0;
@@ -1012,11 +1011,11 @@ int GUIAPI BIDIGetTextVisualGlyphs(
nr_glyphs = BIDIGetTextLogicalGlyphs(log_font, text, text_len,
glyphs, glyphs_map);
if(mbc_devfont && mbc_devfont->charset_ops->bidi_reorder){
bidi_map_reorder(mbc_devfont->charset_ops->name, *glyphs,
if(mbc_devfont && mbc_devfont->charset_ops->bidi_glyph_type){
__mg_charset_bidi_map_reorder (mbc_devfont->charset_ops, *glyphs,
nr_glyphs, *glyphs_map);
mbc_devfont->charset_ops->bidi_reorder(*glyphs, nr_glyphs);
__mg_charset_bidi_glyphs_reorder (mbc_devfont->charset_ops, *glyphs, nr_glyphs);
}
return nr_glyphs;
}
@@ -1040,13 +1039,13 @@ Glyph32* GUIAPI BIDILogGlyphs2VisGlyphs(
{
DEVFONT* mbc_devfont = log_font->mbc_devfont;
if(mbc_devfont && mbc_devfont->charset_ops->bidi_reorder){
if (mbc_devfont && mbc_devfont->charset_ops->bidi_glyph_type) {
/* get the visual glyphs map from the logical glyphs map. */
if(glyphs_map){
bidi_map_reorder((const char*)mbc_devfont->charset_ops->name,
__mg_charset_bidi_map_reorder (mbc_devfont->charset_ops,
glyphs, nr_glyphs, glyphs_map);
}
mbc_devfont->charset_ops->bidi_reorder(glyphs, nr_glyphs);
__mg_charset_bidi_glyphs_reorder (mbc_devfont->charset_ops, glyphs, nr_glyphs);
}
return glyphs;
@@ -1441,8 +1440,8 @@ void GUIAPI GetTextRangesLog2Vis(
*nr_ranges = 0;
/* it is not bidi string. */
if(!log_font->mbc_devfont || (log_font->mbc_devfont &&
!log_font->mbc_devfont->charset_ops->bidi_reorder)){
if (!log_font->mbc_devfont || (log_font->mbc_devfont &&
!log_font->mbc_devfont->charset_ops->bidi_glyph_type)) {
*ranges = NULL;
return;
}
@@ -1535,8 +1534,8 @@ void GUIAPI BIDIGetLogicalEmbeddLevels(
if(*embedding_level_list == NULL)
*embedding_level_list = malloc(nr_glyphs * sizeof (Uint8));
if (mbc_devfont && mbc_devfont->charset_ops->bidi_reorder) {
bidi_get_embeddlevels(mbc_devfont->charset_ops->name, glyphs, nr_glyphs,
if (mbc_devfont && mbc_devfont->charset_ops->bidi_glyph_type) {
__mg_charset_bidi_get_embeddlevels (mbc_devfont->charset_ops, glyphs, nr_glyphs,
*embedding_level_list, 0);
}
else{
@@ -1567,8 +1566,8 @@ void GUIAPI BIDIGetVisualEmbeddLevels(
if(*embedding_level_list == NULL)
*embedding_level_list = malloc(nr_glyphs * sizeof (Uint8));
if (mbc_devfont && mbc_devfont->charset_ops->bidi_reorder) {
bidi_get_embeddlevels(mbc_devfont->charset_ops->name, glyphs, nr_glyphs,
if (mbc_devfont && mbc_devfont->charset_ops->bidi_glyph_type) {
__mg_charset_bidi_get_embeddlevels (mbc_devfont->charset_ops, glyphs, nr_glyphs,
*embedding_level_list, 1);
}
else{
+2 -1
View File
@@ -529,9 +529,10 @@ int GUIAPI GetTabbedTextExtentPoint (HDC hdc, const char* text,
/* set size to zero first */
size->cx = size->cy = 0;
/* bidi is not supported */
/* FIXME: use HDC property for BIDI enable or not
if (mbc_devfont && mbc_devfont->charset_ops->bidi_reorder)
return -1;
*/
_gdi_start_new_line (pdc);
+2 -1
View File
@@ -462,9 +462,10 @@ int GUIAPI GetTextExtentPoint (HDC hdc, const char* text, int len,
/* set size to zero first */
size->cx = size->cy = 0;
/* bidi is not supported */
/* FIXME: use HDC property for BIDI enable or not
if (mbc_devfont && mbc_devfont->charset_ops->bidi_reorder)
return -1;
*/
_gdi_start_new_line(pdc);