Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
1d002048
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1d002048
编写于
8月 02, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Indic] Minor
上级
6f761137
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
37 deletion
+43
-37
src/hb-ot-shape-complex-indic-private.hh
src/hb-ot-shape-complex-indic-private.hh
+0
-16
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+43
-21
未找到文件。
src/hb-ot-shape-complex-indic-private.hh
浏览文件 @
1d002048
...
...
@@ -38,22 +38,6 @@
#define indic_position() complex_var_persistent_u8_1()
/* indic_matra_category_t */
#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7F) == (Base))
#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x900))
#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x980))
#define IS_GURM(u) (IN_HALF_BLOCK (u, 0xA00))
#define IS_GUJA(u) (IN_HALF_BLOCK (u, 0xA80))
#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0xB00))
#define IS_TAML(u) (IN_HALF_BLOCK (u, 0xB80))
#define IS_TELU(u) (IN_HALF_BLOCK (u, 0xC00))
#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0xC80))
#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0xD00))
#define IS_SINH(u) (IN_HALF_BLOCK (u, 0xD80))
#define INDIC_TABLE_ELEMENT_TYPE uint8_t
/* Cateories used in the OpenType spec:
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
1d002048
...
...
@@ -28,18 +28,36 @@
#include "hb-ot-shape-private.hh"
#include "hb-ot-layout-private.hh"
#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7F) == (Base))
#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x0900))
#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x0980))
#define IS_GURM(u) (IN_HALF_BLOCK (u, 0x0A00))
#define IS_GUJA(u) (IN_HALF_BLOCK (u, 0x0A80))
#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0x0B00))
#define IS_TAML(u) (IN_HALF_BLOCK (u, 0x0B80))
#define IS_TELU(u) (IN_HALF_BLOCK (u, 0x0C00))
#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0x0C80))
#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0x0D00))
#define IS_SINH(u) (IN_HALF_BLOCK (u, 0x0D80))
#define IS_KHMR(u) (IN_HALF_BLOCK (u, 0x1780))
#define OLD_INDIC_TAG(script) (((hb_tag_t) script) | 0x20000000)
#define IS_OLD_INDIC_TAG(tag) ( \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_BENGALI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_DEVANAGARI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_GUJARATI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_GURMUKHI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_KANNADA) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_MALAYALAM) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_ORIYA) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_TAMIL) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_TELUGU) \
)
(tag) == OLD_INDIC_TAG (HB_SCRIPT_BENGALI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_DEVANAGARI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_GUJARATI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_GURMUKHI) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_KANNADA) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_MALAYALAM) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_ORIYA) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_TAMIL) || \
(tag) == OLD_INDIC_TAG (HB_SCRIPT_TELUGU) || \
0)
struct
indic_options_t
{
int
initialized
:
1
;
...
...
@@ -123,10 +141,11 @@ consonant_position (hb_codepoint_t u,
hb_font_t
*
font
)
{
if
((
u
&
~
0x007F
)
==
0x1780
)
return
POS_BELOW_C
;
/* In Khmer coeng model,
all are subjoining
. */
return
POS_BELOW_C
;
/* In Khmer coeng model,
post and below forms should not be reordered
. */
hb_codepoint_t
virama
=
(
u
&
~
0x007F
)
|
0x004D
;
if
((
u
&
~
0x007F
)
==
0x0D80
)
virama
=
0x0DCA
;
/* Sinahla */
if
((
u
&
~
0x007F
)
==
0x1780
)
virama
=
0x17D2
;
/* Khmaer */
hb_codepoint_t
glyphs
[
2
];
unsigned
int
virama_pos
=
IS_OLD_INDIC_TAG
(
map
->
get_chosen_script
(
0
))
?
1
:
0
;
...
...
@@ -142,27 +161,29 @@ consonant_position (hb_codepoint_t u,
#define MATRA_POS_LEFT(u) POS_PRE_M
#define MATRA_POS_RIGHT(u) ( \
IS_DEVA(u) ? POS_AFTER_SUB
: \
IS_BENG(u) ? POS_AFTER_POST
: \
IS_GURM(u) ? POS_AFTER_POST
: \
IS_GUJA(u) ? POS_AFTER_POST
: \
IS_ORYA(u) ? POS_AFTER_POST
: \
IS_TAML(u) ? POS_AFTER_POST
: \
IS_DEVA(u) ? POS_AFTER_SUB : \
IS_BENG(u) ? POS_AFTER_POST : \
IS_GURM(u) ? POS_AFTER_POST : \
IS_GUJA(u) ? POS_AFTER_POST : \
IS_ORYA(u) ? POS_AFTER_POST : \
IS_TAML(u) ? POS_AFTER_POST : \
IS_TELU(u) ? (u <= 0x0C42 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
IS_KNDA(u) ? (u < 0x0CC3 || u > 0xCD6 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \
IS_MLYM(u) ? POS_AFTER_POST : \
IS_SINH(u) ? POS_AFTER_SUB : \
/*default*/
POS_AFTER_SUB \
IS_MLYM(u) ? POS_AFTER_POST : \
IS_SINH(u) ? POS_AFTER_SUB : \
IS_KHMR(u) ? POS_AFTER_POST : \
/*default*/
POS_AFTER_SUB \
)
#define MATRA_POS_TOP(u) (
/* BENG and MLYM don't have top matras. */
\
IS_DEVA(u) ? POS_AFTER_SUB : \
IS_GURM(u) ? POS_AFTER_POST
:
/* Deviate from spec */
\
IS_GURM(u) ? POS_AFTER_POST :
/* Deviate from spec */
\
IS_GUJA(u) ? POS_AFTER_SUB : \
IS_ORYA(u) ? POS_AFTER_MAIN : \
IS_TAML(u) ? POS_AFTER_SUB : \
IS_TELU(u) ? POS_BEFORE_SUB : \
IS_KNDA(u) ? POS_BEFORE_SUB : \
IS_SINH(u) ? POS_AFTER_SUB : \
IS_KHMR(u) ? POS_AFTER_POST : \
/*default*/
POS_AFTER_SUB \
)
#define MATRA_POS_BOTTOM(u) ( \
...
...
@@ -176,6 +197,7 @@ consonant_position (hb_codepoint_t u,
IS_KNDA(u) ? POS_BEFORE_SUB : \
IS_MLYM(u) ? POS_AFTER_POST : \
IS_SINH(u) ? POS_AFTER_SUB : \
IS_KHMR(u) ? POS_AFTER_POST : \
/*default*/
POS_AFTER_SUB \
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录