Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b605db2f
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看板
提交
b605db2f
编写于
11月 04, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[aat] Clean up ankr table include mess
上级
bce437cf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
59 addition
and
34 deletion
+59
-34
src/hb-aat-layout-ankr-table.hh
src/hb-aat-layout-ankr-table.hh
+2
-0
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+9
-22
src/hb-aat-layout-kerx-table.hh
src/hb-aat-layout-kerx-table.hh
+8
-8
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+40
-2
src/hb-ot-kern-table.hh
src/hb-ot-kern-table.hh
+0
-1
src/hb-static.cc
src/hb-static.cc
+0
-1
未找到文件。
src/hb-aat-layout-ankr-table.hh
浏览文件 @
b605db2f
...
...
@@ -36,6 +36,8 @@
namespace
AAT
{
using
namespace
OT
;
struct
Anchor
{
...
...
src/hb-aat-layout-common.hh
浏览文件 @
b605db2f
...
...
@@ -698,36 +698,23 @@ struct hb_aat_apply_context_t :
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
hb_sanitize_context_t
sanitizer
;
const
ankr
&
ankr_table
;
const
ankr
*
ankr_table
;
const
char
*
ankr_end
;
/* Unused. For debug tracing only. */
unsigned
int
lookup_index
;
unsigned
int
debug_depth
;
inline
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
blob
=
const_cast
<
hb_blob_t
*>
(
&
Null
(
hb_blob_t
)),
const
ankr
&
ankr_table_
=
Null
(
ankr
),
const
char
*
ankr_end_
=
nullptr
)
:
plan
(
plan_
),
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
sanitizer
(),
ankr_table
(
ankr_table_
),
ankr_end
(
ankr_end_
),
lookup_index
(
0
),
debug_depth
(
0
)
{
sanitizer
.
init
(
blob
);
sanitizer
.
set_num_glyphs
(
face
->
get_num_glyphs
());
sanitizer
.
start_processing
();
sanitizer
.
set_max_ops
(
HB_SANITIZE_MAX_OPS_MAX
);
}
HB_INTERNAL
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
blob
=
const_cast
<
hb_blob_t
*>
(
&
Null
(
hb_blob_t
)));
inline
void
set_lookup_index
(
unsigned
int
i
)
{
lookup_index
=
i
;
}
HB_INTERNAL
~
hb_aat_apply_context_t
(
void
);
inline
~
hb_aat_apply_context_t
(
void
)
{
sanitizer
.
end_processing
();
}
HB_INTERNAL
void
set_ankr_table
(
const
AAT
::
ankr
*
ankr_table_
,
const
char
*
ankr_end_
);
inline
void
set_lookup_index
(
unsigned
int
i
)
{
lookup_index
=
i
;
}
};
...
...
src/hb-aat-layout-kerx-table.hh
浏览文件 @
b605db2f
...
...
@@ -423,14 +423,14 @@ struct KerxSubTableFormat4
return
false
;
unsigned
int
markAnchorPoint
=
*
data
++
;
unsigned
int
currAnchorPoint
=
*
data
++
;
const
Anchor
markAnchor
=
c
->
ankr_table
.
get_anchor
(
c
->
buffer
->
info
[
mark
].
codepoint
,
markAnchorPoint
,
c
->
sanitizer
.
get_num_glyphs
(),
c
->
ankr_end
);
const
Anchor
currAnchor
=
c
->
ankr_table
.
get_anchor
(
c
->
buffer
->
cur
().
codepoint
,
currAnchorPoint
,
c
->
sanitizer
.
get_num_glyphs
(),
c
->
ankr_end
);
const
Anchor
markAnchor
=
c
->
ankr_table
->
get_anchor
(
c
->
buffer
->
info
[
mark
].
codepoint
,
markAnchorPoint
,
c
->
sanitizer
.
get_num_glyphs
(),
c
->
ankr_end
);
const
Anchor
currAnchor
=
c
->
ankr_table
->
get_anchor
(
c
->
buffer
->
cur
().
codepoint
,
currAnchorPoint
,
c
->
sanitizer
.
get_num_glyphs
(),
c
->
ankr_end
);
o
.
x_offset
=
c
->
font
->
em_scale_x
(
markAnchor
.
xCoordinate
)
-
c
->
font
->
em_scale_x
(
currAnchor
.
xCoordinate
);
o
.
y_offset
=
c
->
font
->
em_scale_y
(
markAnchor
.
yCoordinate
)
-
c
->
font
->
em_scale_y
(
currAnchor
.
yCoordinate
);
...
...
src/hb-aat-layout.cc
浏览文件 @
b605db2f
...
...
@@ -130,6 +130,44 @@ hb_aat_layout_find_feature_mapping (hb_tag_t tag)
}
/*
* hb_aat_apply_context_t
*/
AAT
::
hb_aat_apply_context_t
::
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
blob
)
:
plan
(
plan_
),
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
sanitizer
(),
ankr_table
(
&
Null
(
AAT
::
ankr
)),
ankr_end
(
nullptr
),
lookup_index
(
0
),
debug_depth
(
0
)
{
sanitizer
.
init
(
blob
);
sanitizer
.
set_num_glyphs
(
face
->
get_num_glyphs
());
sanitizer
.
start_processing
();
sanitizer
.
set_max_ops
(
HB_SANITIZE_MAX_OPS_MAX
);
}
AAT
::
hb_aat_apply_context_t
::~
hb_aat_apply_context_t
(
void
)
{
sanitizer
.
end_processing
();
}
void
AAT
::
hb_aat_apply_context_t
::
set_ankr_table
(
const
AAT
::
ankr
*
ankr_table_
,
const
char
*
ankr_end_
)
{
ankr_table
=
ankr_table_
;
ankr_end
=
ankr_end_
;
}
/*
* mort/morx/kerx/trak
*/
...
...
@@ -273,8 +311,8 @@ hb_aat_layout_position (hb_ot_shape_plan_t *plan,
hb_blob_t
*
ankr_blob
;
const
AAT
::
ankr
&
ankr
=
_get_ankr
(
font
->
face
,
&
ankr_blob
);
AAT
::
hb_aat_apply_context_t
c
(
plan
,
font
,
buffer
,
blob
,
ankr
,
ankr_blob
->
data
+
ankr_blob
->
length
);
AAT
::
hb_aat_apply_context_t
c
(
plan
,
font
,
buffer
,
blob
);
c
.
set_ankr_table
(
&
ankr
,
ankr_blob
->
data
+
ankr_blob
->
length
);
kerx
.
apply
(
&
c
);
}
...
...
src/hb-ot-kern-table.hh
浏览文件 @
b605db2f
...
...
@@ -30,7 +30,6 @@
#include "hb-open-type.hh"
#include "hb-ot-shape.hh"
#include "hb-ot-layout-gsubgpos.hh"
#include "hb-aat-layout-ankr-table.hh" // Ugly but needed.
#include "hb-aat-layout-common.hh"
...
...
src/hb-static.cc
浏览文件 @
b605db2f
...
...
@@ -28,7 +28,6 @@
#include "hb-open-type.hh"
#include "hb-ot-layout-common.hh"
#include "hb-aat-layout-ankr-table.hh"
/* I don't even want to know why... */
#include "hb-aat-layout-common.hh"
#include "hb-face.hh"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录