Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
046690a4
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
046690a4
编写于
1月 17, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[aat] Add hb_aat_apply_context_t
上级
fd034490
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
43 addition
and
20 deletion
+43
-20
src/hb-aat-layout-common-private.hh
src/hb-aat-layout-common-private.hh
+23
-0
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+13
-14
src/hb-aat-layout-private.hh
src/hb-aat-layout-private.hh
+1
-1
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+5
-3
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-2
未找到文件。
src/hb-aat-layout-common-private.hh
浏览文件 @
046690a4
...
@@ -691,6 +691,29 @@ struct StateTableDriver
...
@@ -691,6 +691,29 @@ struct StateTableDriver
};
};
struct
hb_aat_apply_context_t
:
hb_dispatch_context_t
<
hb_aat_apply_context_t
,
bool
,
HB_DEBUG_APPLY
>
{
inline
const
char
*
get_name
(
void
)
{
return
"APPLY"
;
}
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
return
obj
.
apply
(
this
);
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
hb_font_t
*
font
;
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
const
char
*
end
;
hb_aat_apply_context_t
(
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
const
char
*
end_
)
:
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
end
(
end_
)
{}
};
}
/* namespace AAT */
}
/* namespace AAT */
...
...
src/hb-aat-layout-morx-table.hh
浏览文件 @
046690a4
...
@@ -148,7 +148,7 @@ struct RearrangementSubtable
...
@@ -148,7 +148,7 @@ struct RearrangementSubtable
unsigned
int
last_zero_before_start
;
unsigned
int
last_zero_before_start
;
};
};
inline
bool
apply
(
hb_
o
t_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
aa
t_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
...
@@ -245,7 +245,7 @@ struct ContextualSubtable
...
@@ -245,7 +245,7 @@ struct ContextualSubtable
const
UnsizedOffsetListOf
<
Lookup
<
GlyphID
>
,
HBUINT32
>
&
subs
;
const
UnsizedOffsetListOf
<
Lookup
<
GlyphID
>
,
HBUINT32
>
&
subs
;
};
};
inline
bool
apply
(
hb_
o
t_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
aa
t_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
...
@@ -326,7 +326,7 @@ struct LigatureSubtable
...
@@ -326,7 +326,7 @@ struct LigatureSubtable
private:
private:
};
};
inline
bool
apply
(
hb_
o
t_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
aa
t_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
...
@@ -360,7 +360,7 @@ struct LigatureSubtable
...
@@ -360,7 +360,7 @@ struct LigatureSubtable
struct
NoncontextualSubtable
struct
NoncontextualSubtable
{
{
inline
bool
apply
(
hb_
o
t_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
aa
t_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
...
@@ -396,7 +396,7 @@ struct NoncontextualSubtable
...
@@ -396,7 +396,7 @@ struct NoncontextualSubtable
struct
InsertionSubtable
struct
InsertionSubtable
{
{
inline
bool
apply
(
hb_
o
t_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
aa
t_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
/* TODO */
/* TODO */
...
@@ -448,13 +448,13 @@ struct ChainSubtable
...
@@ -448,13 +448,13 @@ struct ChainSubtable
Insertion
=
5
Insertion
=
5
};
};
inline
void
apply
(
hb_
ot_apply_context_t
*
c
,
const
char
*
end
)
const
inline
void
apply
(
hb_
aat_apply_context_t
*
c
)
const
{
{
dispatch
(
c
,
end
);
dispatch
(
c
);
}
}
template
<
typename
context_t
>
template
<
typename
context_t
>
inline
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
const
char
*
end
)
const
inline
typename
context_t
::
return_t
dispatch
(
context_t
*
c
)
const
{
{
unsigned
int
subtable_type
=
get_type
();
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
TRACE_DISPATCH
(
this
,
subtable_type
);
...
@@ -476,7 +476,7 @@ struct ChainSubtable
...
@@ -476,7 +476,7 @@ struct ChainSubtable
!
c
->
check_range
(
this
,
length
))
!
c
->
check_range
(
this
,
length
))
return_trace
(
false
);
return_trace
(
false
);
return_trace
(
dispatch
(
c
,
c
->
end
));
return_trace
(
dispatch
(
c
));
}
}
protected:
protected:
...
@@ -496,13 +496,13 @@ struct ChainSubtable
...
@@ -496,13 +496,13 @@ struct ChainSubtable
struct
Chain
struct
Chain
{
{
inline
void
apply
(
hb_
ot_apply_context_t
*
c
,
const
char
*
end
)
const
inline
void
apply
(
hb_
aat_apply_context_t
*
c
)
const
{
{
const
ChainSubtable
*
subtable
=
&
StructAtOffset
<
ChainSubtable
>
(
featureZ
,
featureZ
[
0
].
static_size
*
featureCount
);
const
ChainSubtable
*
subtable
=
&
StructAtOffset
<
ChainSubtable
>
(
featureZ
,
featureZ
[
0
].
static_size
*
featureCount
);
unsigned
int
count
=
subtableCount
;
unsigned
int
count
=
subtableCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
{
subtable
->
apply
(
c
,
end
);
subtable
->
apply
(
c
);
subtable
=
&
StructAfter
<
ChainSubtable
>
(
*
subtable
);
subtable
=
&
StructAfter
<
ChainSubtable
>
(
*
subtable
);
}
}
}
}
...
@@ -555,14 +555,13 @@ struct morx
...
@@ -555,14 +555,13 @@ struct morx
{
{
static
const
hb_tag_t
tableTag
=
HB_AAT_TAG_MORX
;
static
const
hb_tag_t
tableTag
=
HB_AAT_TAG_MORX
;
inline
void
apply
(
hb_
ot_apply_context_t
*
c
,
unsigned
int
length
)
const
inline
void
apply
(
hb_
aat_apply_context_t
*
c
)
const
{
{
const
char
*
end
=
(
const
char
*
)
this
+
length
;
const
Chain
*
chain
=
chains
;
const
Chain
*
chain
=
chains
;
unsigned
int
count
=
chainCount
;
unsigned
int
count
=
chainCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
{
chain
->
apply
(
c
,
end
);
chain
->
apply
(
c
);
chain
=
&
StructAfter
<
Chain
>
(
*
chain
);
chain
=
&
StructAfter
<
Chain
>
(
*
chain
);
}
}
}
}
...
...
src/hb-aat-layout-private.hh
浏览文件 @
046690a4
...
@@ -35,6 +35,6 @@
...
@@ -35,6 +35,6 @@
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_substitute
(
OT
::
hb_ot_apply_context_t
*
c
);
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
#endif
/* HB_AAT_LAYOUT_PRIVATE_HH */
#endif
/* HB_AAT_LAYOUT_PRIVATE_HH */
src/hb-aat-layout.cc
浏览文件 @
046690a4
...
@@ -68,9 +68,11 @@ _hb_aat_layout_create (hb_face_t *face)
...
@@ -68,9 +68,11 @@ _hb_aat_layout_create (hb_face_t *face)
}
}
void
void
hb_aat_layout_substitute
(
OT
::
hb_ot_apply_context_t
*
c
)
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
{
{
unsigned
int
length
;
unsigned
int
length
;
const
AAT
::
morx
&
morx
=
_get_morx
(
c
->
face
,
&
length
);
const
AAT
::
morx
&
morx
=
_get_morx
(
font
->
face
,
&
length
);
morx
.
apply
(
c
,
length
);
AAT
::
hb_aat_apply_context_t
c
(
font
,
buffer
,
(
const
char
*
)
&
morx
+
length
);
morx
.
apply
(
&
c
);
}
}
src/hb-ot-shape.cc
浏览文件 @
046690a4
...
@@ -619,8 +619,7 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
...
@@ -619,8 +619,7 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
/* XXX Call morx instead. */
/* XXX Call morx instead. */
//OT::hb_ot_apply_context_t ac (0, c->font, c->buffer);
//hb_aat_layout_substitute (c->font, c->buffer);
//hb_aat_layout_substitute (&ac);
}
}
static
inline
void
static
inline
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录