Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
53e55945
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看板
提交
53e55945
编写于
10月 09, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kerx] Implement Format0 apply()
Not hooked up to be called yet.
上级
60318f87
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
42 addition
and
13 deletion
+42
-13
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+4
-2
src/hb-aat-layout-kerx-table.hh
src/hb-aat-layout-kerx-table.hh
+26
-3
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+4
-2
src/hb-aat-layout.hh
src/hb-aat-layout.hh
+7
-5
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
未找到文件。
src/hb-aat-layout-common.hh
浏览文件 @
53e55945
...
@@ -518,6 +518,7 @@ struct hb_aat_apply_context_t :
...
@@ -518,6 +518,7 @@ struct hb_aat_apply_context_t :
static
return_t
default_return_value
(
void
)
{
return
false
;
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
hb_ot_shape_plan_t
*
plan
;
hb_font_t
*
font
;
hb_font_t
*
font
;
hb_face_t
*
face
;
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
hb_buffer_t
*
buffer
;
...
@@ -527,10 +528,11 @@ struct hb_aat_apply_context_t :
...
@@ -527,10 +528,11 @@ struct hb_aat_apply_context_t :
unsigned
int
lookup_index
;
unsigned
int
lookup_index
;
unsigned
int
debug_depth
;
unsigned
int
debug_depth
;
inline
hb_aat_apply_context_t
(
hb_font_t
*
font_
,
inline
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
table
)
:
hb_blob_t
*
table
)
:
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
plan
(
plan_
),
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
sanitizer
(),
lookup_index
(
0
),
debug_depth
(
0
)
sanitizer
(),
lookup_index
(
0
),
debug_depth
(
0
)
{
{
sanitizer
.
init
(
table
);
sanitizer
.
init
(
table
);
...
...
src/hb-aat-layout-kerx-table.hh
浏览文件 @
53e55945
...
@@ -59,7 +59,9 @@ struct KerxSubTableFormat0
...
@@ -59,7 +59,9 @@ struct KerxSubTableFormat0
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
/* TODO */
hb_kern_machine_t
<
KerxSubTableFormat0
>
machine
(
*
this
);
machine
.
kern
(
c
->
font
,
c
->
buffer
,
c
->
plan
->
kern_mask
);
return_trace
(
true
);
return_trace
(
true
);
}
}
...
@@ -111,8 +113,6 @@ struct KerxSubTableFormat2
...
@@ -111,8 +113,6 @@ struct KerxSubTableFormat2
unsigned
int
r
=
*
(
this
+
rightClassTable
).
get_value
(
right
,
num_glyphs
);
unsigned
int
r
=
*
(
this
+
rightClassTable
).
get_value
(
right
,
num_glyphs
);
unsigned
int
offset
=
l
+
r
;
unsigned
int
offset
=
l
+
r
;
const
FWORD
*
arr
=
&
(
this
+
array
);
const
FWORD
*
arr
=
&
(
this
+
array
);
if
(
unlikely
((
const
void
*
)
arr
<
(
const
void
*
)
this
||
(
const
void
*
)
arr
>=
(
const
void
*
)
end
))
return
0
;
const
FWORD
*
v
=
&
StructAtOffset
<
FWORD
>
(
arr
,
offset
);
const
FWORD
*
v
=
&
StructAtOffset
<
FWORD
>
(
arr
,
offset
);
if
(
unlikely
((
const
void
*
)
v
<
(
const
void
*
)
arr
||
(
const
void
*
)
(
v
+
1
)
>
(
const
void
*
)
end
))
if
(
unlikely
((
const
void
*
)
v
<
(
const
void
*
)
arr
||
(
const
void
*
)
(
v
+
1
)
>
(
const
void
*
)
end
))
return
0
;
return
0
;
...
@@ -124,6 +124,13 @@ struct KerxSubTableFormat2
...
@@ -124,6 +124,13 @@ struct KerxSubTableFormat2
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
/* TODO */
/* TODO */
#if 0
accelerator_t accel (*this,
c->blob->data + c->blob->len,
c->face->get_num_glyphs ());
hb_kern_machine_t<accelerator_t> machine (accel);
machine.kern (c->font, c->buffer, c->plan->kern_mask);
#endif
return_trace
(
true
);
return_trace
(
true
);
}
}
...
@@ -138,6 +145,22 @@ struct KerxSubTableFormat2
...
@@ -138,6 +145,22 @@ struct KerxSubTableFormat2
array
.
sanitize
(
c
,
this
)));
array
.
sanitize
(
c
,
this
)));
}
}
struct
accelerator_t
{
const
KerxSubTableFormat2
&
table
;
const
char
*
end
;
unsigned
int
num_glyphs
;
inline
accelerator_t
(
const
KerxSubTableFormat2
&
table_
,
const
char
*
end_
,
unsigned
int
num_glyphs_
)
:
table
(
table_
),
end
(
end_
),
num_glyphs
(
num_glyphs_
)
{}
inline
int
get_kerning
(
hb_codepoint_t
left
,
hb_codepoint_t
right
)
const
{
return
table
.
get_kerning
(
left
,
right
,
end
,
num_glyphs
);
}
};
protected:
protected:
HBUINT32
rowWidth
;
/* The width, in bytes, of a row in the table. */
HBUINT32
rowWidth
;
/* The width, in bytes, of a row in the table. */
LOffsetTo
<
Lookup
<
HBUINT16
>
>
LOffsetTo
<
Lookup
<
HBUINT16
>
>
...
...
src/hb-aat-layout.cc
浏览文件 @
53e55945
...
@@ -62,12 +62,14 @@ hb_aat_layout_has_substitution (hb_face_t *face)
...
@@ -62,12 +62,14 @@ hb_aat_layout_has_substitution (hb_face_t *face)
}
}
void
void
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_aat_layout_substitute
(
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
{
{
hb_blob_t
*
blob
;
hb_blob_t
*
blob
;
const
AAT
::
morx
&
morx
=
_get_morx
(
font
->
face
,
&
blob
);
const
AAT
::
morx
&
morx
=
_get_morx
(
font
->
face
,
&
blob
);
AAT
::
hb_aat_apply_context_t
c
(
font
,
buffer
,
blob
);
AAT
::
hb_aat_apply_context_t
c
(
plan
,
font
,
buffer
,
blob
);
morx
.
apply
(
&
c
);
morx
.
apply
(
&
c
);
}
}
...
...
src/hb-aat-layout.hh
浏览文件 @
53e55945
...
@@ -29,17 +29,19 @@
...
@@ -29,17 +29,19 @@
#include "hb.hh"
#include "hb.hh"
#include "hb-font.hh"
#include "hb-ot-shape.hh"
#include "hb-buffer.hh"
#include "hb-open-type.hh"
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
hb_aat_layout_has_substitution
(
hb_face_t
*
face
);
hb_aat_layout_has_substitution
(
hb_face_t
*
face
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_aat_layout_substitute
(
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_position
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_aat_layout_position
(
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
#endif
/* HB_AAT_LAYOUT_HH */
#endif
/* HB_AAT_LAYOUT_HH */
src/hb-ot-shape.cc
浏览文件 @
53e55945
...
@@ -668,7 +668,7 @@ hb_ot_substitute_complex (const hb_ot_shape_context_t *c)
...
@@ -668,7 +668,7 @@ hb_ot_substitute_complex (const hb_ot_shape_context_t *c)
hb_synthesize_glyph_classes
(
c
);
hb_synthesize_glyph_classes
(
c
);
if
(
unlikely
(
c
->
plan
->
apply_morx
))
if
(
unlikely
(
c
->
plan
->
apply_morx
))
hb_aat_layout_substitute
(
c
->
font
,
c
->
buffer
);
hb_aat_layout_substitute
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
else
else
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录