Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5a08ecf9
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看板
提交
5a08ecf9
编写于
11月 16, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Implement hb_ot_layout_get_glyph_class()
上级
f9edd5d5
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
26 deletion
+38
-26
src/hb-ot-layout-gdef-table.hh
src/hb-ot-layout-gdef-table.hh
+5
-5
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+4
-4
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+1
-1
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+5
-5
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+9
-1
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+6
-0
src/hb-ot-layout.h
src/hb-ot-layout.h
+6
-8
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+2
-2
未找到文件。
src/hb-ot-layout-gdef-table.hh
浏览文件 @
5a08ecf9
...
...
@@ -383,13 +383,13 @@ struct GDEF
switch
(
klass
)
{
default:
case
UnclassifiedGlyph
:
return
HB_OT_LAYOUT_GLYPH_
CLAS
S_UNCLASSIFIED
;
case
BaseGlyph
:
return
HB_OT_LAYOUT_GLYPH_
CLAS
S_BASE_GLYPH
;
case
LigatureGlyph
:
return
HB_OT_LAYOUT_GLYPH_
CLAS
S_LIGATURE
;
case
ComponentGlyph
:
return
HB_OT_LAYOUT_GLYPH_
CLAS
S_COMPONENT
;
case
UnclassifiedGlyph
:
return
HB_OT_LAYOUT_GLYPH_
PROP
S_UNCLASSIFIED
;
case
BaseGlyph
:
return
HB_OT_LAYOUT_GLYPH_
PROP
S_BASE_GLYPH
;
case
LigatureGlyph
:
return
HB_OT_LAYOUT_GLYPH_
PROP
S_LIGATURE
;
case
ComponentGlyph
:
return
HB_OT_LAYOUT_GLYPH_
PROP
S_COMPONENT
;
case
MarkGlyph
:
klass
=
get_mark_attachment_type
(
glyph
);
return
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
|
(
klass
<<
8
);
return
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
|
(
klass
<<
8
);
}
}
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
5a08ecf9
...
...
@@ -863,7 +863,7 @@ struct CursivePosFormat1
TRACE_APPLY
();
/* We don't handle mark glyphs here. */
if
(
c
->
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
)
return
TRACE_RETURN
(
false
);
if
(
c
->
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
)
return
TRACE_RETURN
(
false
);
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
...
...
@@ -1030,7 +1030,7 @@ struct MarkBasePosFormat1
}
while
(
1
);
/* The following assertion is too strong, so we've disabled it. */
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_BASE_GLYPH
))
{
/*return TRACE_RETURN (false);*/
}
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_BASE_GLYPH
))
{
/*return TRACE_RETURN (false);*/
}
unsigned
int
base_index
=
(
this
+
baseCoverage
)
(
c
->
buffer
->
info
[
skippy_iter
.
idx
].
codepoint
);
if
(
base_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
...
...
@@ -1136,7 +1136,7 @@ struct MarkLigPosFormat1
if
(
!
skippy_iter
.
prev
(
&
property
,
LookupFlag
::
IgnoreMarks
))
return
TRACE_RETURN
(
false
);
/* The following assertion is too strong, so we've disabled it. */
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_LIGATURE
))
{
/*return TRACE_RETURN (false);*/
}
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_LIGATURE
))
{
/*return TRACE_RETURN (false);*/
}
unsigned
int
j
=
skippy_iter
.
idx
;
unsigned
int
lig_index
=
(
this
+
ligatureCoverage
)
(
c
->
buffer
->
info
[
j
].
codepoint
);
...
...
@@ -1258,7 +1258,7 @@ struct MarkMarkPosFormat1
hb_apply_context_t
::
mark_skipping_backward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
if
(
!
skippy_iter
.
prev
(
&
property
))
return
TRACE_RETURN
(
false
);
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
))
return
TRACE_RETURN
(
false
);
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
))
return
TRACE_RETURN
(
false
);
unsigned
int
j
=
skippy_iter
.
idx
;
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
5a08ecf9
...
...
@@ -266,7 +266,7 @@ struct Sequence
TRACE_APPLY
();
if
(
unlikely
(
!
substitute
.
len
))
return
TRACE_RETURN
(
false
);
unsigned
int
klass
=
c
->
property
&
HB_OT_LAYOUT_GLYPH_
CLASS_LIGATURE
?
HB_OT_LAYOUT_GLYPH_CLAS
S_BASE_GLYPH
:
0
;
unsigned
int
klass
=
c
->
property
&
HB_OT_LAYOUT_GLYPH_
PROPS_LIGATURE
?
HB_OT_LAYOUT_GLYPH_PROP
S_BASE_GLYPH
:
0
;
unsigned
int
count
=
substitute
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
set_lig_props_for_component
(
c
->
buffer
->
cur
(),
i
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
5a08ecf9
...
...
@@ -264,7 +264,7 @@ struct hb_apply_context_t
if
(
glyph_props
&
lookup_props
&
LookupFlag
::
IgnoreFlags
)
return
false
;
if
(
unlikely
(
glyph_props
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
))
if
(
unlikely
(
glyph_props
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
))
return
match_properties_mark
(
glyph
,
glyph_props
,
lookup_props
);
return
true
;
...
...
@@ -295,7 +295,7 @@ struct hb_apply_context_t
*
property_out
=
property
;
/* If it's a mark, skip it if we don't accept it. */
if
(
unlikely
(
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
))
if
(
unlikely
(
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
))
return
!
match_properties
(
info
->
codepoint
,
property
,
lookup_props
);
/* If not a mark, don't skip. */
...
...
@@ -445,7 +445,7 @@ static inline bool match_input (hb_apply_context_t *c,
* ligate with a conjunct...)
*/
bool
is_mark_ligature
=
!!
(
c
->
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
);
bool
is_mark_ligature
=
!!
(
c
->
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
);
unsigned
int
total_component_count
=
0
;
total_component_count
+=
get_lig_num_comps
(
c
->
buffer
->
cur
());
...
...
@@ -478,7 +478,7 @@ static inline bool match_input (hb_apply_context_t *c,
return
TRACE_RETURN
(
false
);
}
is_mark_ligature
=
is_mark_ligature
&&
(
property
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
);
is_mark_ligature
=
is_mark_ligature
&&
(
property
&
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
);
total_component_count
+=
get_lig_num_comps
(
c
->
buffer
->
info
[
skippy_iter
.
idx
]);
}
...
...
@@ -530,7 +530,7 @@ static inline void ligate_input (hb_apply_context_t *c,
* https://bugzilla.gnome.org/show_bug.cgi?id=437633
*/
unsigned
int
klass
=
is_mark_ligature
?
0
:
HB_OT_LAYOUT_GLYPH_
CLAS
S_LIGATURE
;
unsigned
int
klass
=
is_mark_ligature
?
0
:
HB_OT_LAYOUT_GLYPH_
PROP
S_LIGATURE
;
unsigned
int
lig_id
=
is_mark_ligature
?
0
:
allocate_lig_id
(
c
->
buffer
);
unsigned
int
last_lig_id
=
get_lig_id
(
c
->
buffer
->
cur
());
unsigned
int
last_num_components
=
get_lig_num_comps
(
c
->
buffer
->
cur
());
...
...
src/hb-ot-layout-private.hh
浏览文件 @
5a08ecf9
...
...
@@ -49,6 +49,14 @@
* GDEF
*/
typedef
enum
{
HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED
=
0x0001
,
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
=
0x0002
,
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
=
0x0004
,
HB_OT_LAYOUT_GLYPH_PROPS_MARK
=
0x0008
,
HB_OT_LAYOUT_GLYPH_PROPS_COMPONENT
=
0x0010
}
hb_ot_layout_glyph_class_mask_t
;
/*
...
...
@@ -115,7 +123,7 @@ get_lig_comp (const hb_glyph_info_t &info)
static
inline
unsigned
int
get_lig_num_comps
(
const
hb_glyph_info_t
&
info
)
{
if
((
info
.
glyph_props
()
&
HB_OT_LAYOUT_GLYPH_
CLAS
S_LIGATURE
)
&&
is_a_ligature
(
info
))
if
((
info
.
glyph_props
()
&
HB_OT_LAYOUT_GLYPH_
PROP
S_LIGATURE
)
&&
is_a_ligature
(
info
))
return
info
.
lig_props
()
&
0x0F
;
else
return
1
;
...
...
src/hb-ot-layout.cc
浏览文件 @
5a08ecf9
...
...
@@ -121,6 +121,12 @@ hb_ot_layout_has_glyph_classes (hb_face_t *face)
return
_get_gdef
(
face
).
has_glyph_classes
();
}
hb_ot_layout_glyph_class_t
hb_ot_layout_get_glyph_class
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
)
{
return
(
hb_ot_layout_glyph_class_t
)
_get_gdef
(
face
).
get_glyph_class
(
glyph
);
}
unsigned
int
hb_ot_layout_get_attach_points
(
hb_face_t
*
face
,
...
...
src/hb-ot-layout.h
浏览文件 @
5a08ecf9
...
...
@@ -51,18 +51,16 @@ hb_bool_t
hb_ot_layout_has_glyph_classes
(
hb_face_t
*
face
);
typedef
enum
{
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
=
0
x0001
,
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
=
0x0002
,
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
=
0x0004
,
HB_OT_LAYOUT_GLYPH_CLASS_MARK
=
0x0008
,
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
=
0x0010
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
=
0
,
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
=
1
,
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
=
2
,
HB_OT_LAYOUT_GLYPH_CLASS_MARK
=
3
,
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
=
4
}
hb_ot_layout_glyph_class_t
;
#ifdef HB_NOT_IMPLEMENTED
hb_ot_layout_glyph_class_t
X
hb_ot_layout_get_glyph_class
(
hb_face_t
*
face
,
hb_ot_layout_get_glyph_class
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
);
#endif
#ifdef HB_NOT_IMPLEMENTED
Xhb_ot_layout_get_glyphs_in_class
(
hb_face_t
*
face
,
...
...
src/hb-ot-shape.cc
浏览文件 @
5a08ecf9
...
...
@@ -348,8 +348,8 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
unsigned
int
count
=
c
->
buffer
->
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
c
->
buffer
->
info
[
i
].
glyph_props
()
=
_hb_glyph_info_get_general_category
(
&
c
->
buffer
->
info
[
i
])
==
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
?
HB_OT_LAYOUT_GLYPH_
CLAS
S_MARK
:
HB_OT_LAYOUT_GLYPH_
CLAS
S_BASE_GLYPH
;
HB_OT_LAYOUT_GLYPH_
PROP
S_MARK
:
HB_OT_LAYOUT_GLYPH_
PROP
S_BASE_GLYPH
;
}
static
inline
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录