Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7ca54811
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7ca54811
编写于
7月 02, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[amalgam] Fix CFF
Part of
https://github.com/harfbuzz/harfbuzz/issues/1809
上级
3724f13b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
src/hb-ot-cff1-table.cc
src/hb-ot-cff1-table.cc
+9
-9
src/hb-ot-cff2-table.cc
src/hb-ot-cff2-table.cc
+8
-8
未找到文件。
src/hb-ot-cff1-table.cc
浏览文件 @
7ca54811
...
...
@@ -210,7 +210,7 @@ struct bounds_t
point_t
max
;
};
struct
extents_param_t
struct
cff1_
extents_param_t
{
void
init
(
const
OT
::
cff1
::
accelerator_t
*
_cff
)
{
...
...
@@ -229,15 +229,15 @@ struct extents_param_t
const
OT
::
cff1
::
accelerator_t
*
cff
;
};
struct
cff1_path_procs_extents_t
:
path_procs_t
<
cff1_path_procs_extents_t
,
cff1_cs_interp_env_t
,
extents_param_t
>
struct
cff1_path_procs_extents_t
:
path_procs_t
<
cff1_path_procs_extents_t
,
cff1_cs_interp_env_t
,
cff1_
extents_param_t
>
{
static
void
moveto
(
cff1_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt
)
static
void
moveto
(
cff1_cs_interp_env_t
&
env
,
cff1_
extents_param_t
&
param
,
const
point_t
&
pt
)
{
param
.
end_path
();
env
.
moveto
(
pt
);
}
static
void
line
(
cff1_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt1
)
static
void
line
(
cff1_cs_interp_env_t
&
env
,
cff1_
extents_param_t
&
param
,
const
point_t
&
pt1
)
{
if
(
!
param
.
is_path_open
())
{
...
...
@@ -248,7 +248,7 @@ struct cff1_path_procs_extents_t : path_procs_t<cff1_path_procs_extents_t, cff1_
param
.
bounds
.
update
(
env
.
get_pt
());
}
static
void
curve
(
cff1_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt1
,
const
point_t
&
pt2
,
const
point_t
&
pt3
)
static
void
curve
(
cff1_cs_interp_env_t
&
env
,
cff1_
extents_param_t
&
param
,
const
point_t
&
pt1
,
const
point_t
&
pt2
,
const
point_t
&
pt3
)
{
if
(
!
param
.
is_path_open
())
{
...
...
@@ -265,9 +265,9 @@ struct cff1_path_procs_extents_t : path_procs_t<cff1_path_procs_extents_t, cff1_
static
bool
_get_bounds
(
const
OT
::
cff1
::
accelerator_t
*
cff
,
hb_codepoint_t
glyph
,
bounds_t
&
bounds
,
bool
in_seac
=
false
);
struct
cff1_cs_opset_extents_t
:
cff1_cs_opset_t
<
cff1_cs_opset_extents_t
,
extents_param_t
,
cff1_path_procs_extents_t
>
struct
cff1_cs_opset_extents_t
:
cff1_cs_opset_t
<
cff1_cs_opset_extents_t
,
cff1_
extents_param_t
,
cff1_path_procs_extents_t
>
{
static
void
process_seac
(
cff1_cs_interp_env_t
&
env
,
extents_param_t
&
param
)
static
void
process_seac
(
cff1_cs_interp_env_t
&
env
,
cff1_
extents_param_t
&
param
)
{
unsigned
int
n
=
env
.
argStack
.
get_count
();
point_t
delta
;
...
...
@@ -296,11 +296,11 @@ bool _get_bounds (const OT::cff1::accelerator_t *cff, hb_codepoint_t glyph, boun
if
(
unlikely
(
!
cff
->
is_valid
()
||
(
glyph
>=
cff
->
num_glyphs
)))
return
false
;
unsigned
int
fd
=
cff
->
fdSelect
->
get_fd
(
glyph
);
cff1_cs_interpreter_t
<
cff1_cs_opset_extents_t
,
extents_param_t
>
interp
;
cff1_cs_interpreter_t
<
cff1_cs_opset_extents_t
,
cff1_
extents_param_t
>
interp
;
const
byte_str_t
str
=
(
*
cff
->
charStrings
)[
glyph
];
interp
.
env
.
init
(
str
,
*
cff
,
fd
);
interp
.
env
.
set_in_seac
(
in_seac
);
extents_param_t
param
;
cff1_
extents_param_t
param
;
param
.
init
(
cff
);
if
(
unlikely
(
!
interp
.
interpret
(
param
)))
return
false
;
bounds
=
param
.
bounds
;
...
...
src/hb-ot-cff2-table.cc
浏览文件 @
7ca54811
...
...
@@ -33,7 +33,7 @@
using
namespace
CFF
;
struct
extents_param_t
struct
cff2_
extents_param_t
{
void
init
()
{
...
...
@@ -63,15 +63,15 @@ struct extents_param_t
number_t
max_y
;
};
struct
cff2_path_procs_extents_t
:
path_procs_t
<
cff2_path_procs_extents_t
,
cff2_cs_interp_env_t
,
extents_param_t
>
struct
cff2_path_procs_extents_t
:
path_procs_t
<
cff2_path_procs_extents_t
,
cff2_cs_interp_env_t
,
cff2_
extents_param_t
>
{
static
void
moveto
(
cff2_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt
)
static
void
moveto
(
cff2_cs_interp_env_t
&
env
,
cff2_
extents_param_t
&
param
,
const
point_t
&
pt
)
{
param
.
end_path
();
env
.
moveto
(
pt
);
}
static
void
line
(
cff2_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt1
)
static
void
line
(
cff2_cs_interp_env_t
&
env
,
cff2_
extents_param_t
&
param
,
const
point_t
&
pt1
)
{
if
(
!
param
.
is_path_open
())
{
...
...
@@ -82,7 +82,7 @@ struct cff2_path_procs_extents_t : path_procs_t<cff2_path_procs_extents_t, cff2_
param
.
update_bounds
(
env
.
get_pt
());
}
static
void
curve
(
cff2_cs_interp_env_t
&
env
,
extents_param_t
&
param
,
const
point_t
&
pt1
,
const
point_t
&
pt2
,
const
point_t
&
pt3
)
static
void
curve
(
cff2_cs_interp_env_t
&
env
,
cff2_
extents_param_t
&
param
,
const
point_t
&
pt1
,
const
point_t
&
pt2
,
const
point_t
&
pt3
)
{
if
(
!
param
.
is_path_open
())
{
...
...
@@ -97,7 +97,7 @@ struct cff2_path_procs_extents_t : path_procs_t<cff2_path_procs_extents_t, cff2_
}
};
struct
cff2_cs_opset_extents_t
:
cff2_cs_opset_t
<
cff2_cs_opset_extents_t
,
extents_param_t
,
cff2_path_procs_extents_t
>
{};
struct
cff2_cs_opset_extents_t
:
cff2_cs_opset_t
<
cff2_cs_opset_extents_t
,
cff2_
extents_param_t
,
cff2_path_procs_extents_t
>
{};
bool
OT
::
cff2
::
accelerator_t
::
get_extents
(
hb_font_t
*
font
,
hb_codepoint_t
glyph
,
...
...
@@ -113,10 +113,10 @@ bool OT::cff2::accelerator_t::get_extents (hb_font_t *font,
unsigned
int
num_coords
;
const
int
*
coords
=
hb_font_get_var_coords_normalized
(
font
,
&
num_coords
);
unsigned
int
fd
=
fdSelect
->
get_fd
(
glyph
);
cff2_cs_interpreter_t
<
cff2_cs_opset_extents_t
,
extents_param_t
>
interp
;
cff2_cs_interpreter_t
<
cff2_cs_opset_extents_t
,
cff2_
extents_param_t
>
interp
;
const
byte_str_t
str
=
(
*
charStrings
)[
glyph
];
interp
.
env
.
init
(
str
,
*
this
,
fd
,
coords
,
num_coords
);
extents_param_t
param
;
cff2_
extents_param_t
param
;
param
.
init
();
if
(
unlikely
(
!
interp
.
interpret
(
param
)))
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录