Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
dfc57802
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看板
提交
dfc57802
编写于
5月 07, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix more double-promotion errors
WHy do only some of the clang bots catch this I have no idea :(.
上级
c2c9d204
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
26 deletion
+26
-26
src/hb-aat-layout-trak-table.hh
src/hb-aat-layout-trak-table.hh
+2
-2
src/hb-font.hh
src/hb-font.hh
+1
-1
src/hb-open-type.hh
src/hb-open-type.hh
+2
-2
src/hb-ot-color-cbdt-table.hh
src/hb-ot-color-cbdt-table.hh
+6
-6
src/hb-ot-color-sbix-table.hh
src/hb-ot-color-sbix-table.hh
+5
-5
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+10
-10
未找到文件。
src/hb-aat-layout-trak-table.hh
浏览文件 @
dfc57802
...
...
@@ -133,8 +133,8 @@ struct TrackData
if
(
size_table
[
size_index
].
to_float
()
>=
csspx
)
break
;
return
round
(
interpolate_at
(
size_index
?
size_index
-
1
:
0
,
csspx
,
*
trackTableEntry
,
base
));
return
round
f
(
interpolate_at
(
size_index
?
size_index
-
1
:
0
,
csspx
,
*
trackTableEntry
,
base
));
}
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
)
const
...
...
src/hb-font.hh
浏览文件 @
dfc57802
...
...
@@ -607,7 +607,7 @@ struct hb_font_t
return
(
hb_position_t
)
(
scaled
/
upem
);
}
hb_position_t
em_scalef
(
float
v
,
int
scale
)
{
return
(
hb_position_t
)
round
(
v
*
scale
/
face
->
get_upem
());
}
{
return
(
hb_position_t
)
round
f
(
v
*
scale
/
face
->
get_upem
());
}
float
em_fscale
(
int16_t
v
,
int
scale
)
{
return
(
float
)
v
*
scale
/
face
->
get_upem
();
}
};
...
...
src/hb-open-type.hh
浏览文件 @
dfc57802
...
...
@@ -110,7 +110,7 @@ struct F2DOT14 : HBINT16
F2DOT14
&
operator
=
(
uint16_t
i
)
{
HBINT16
::
operator
=
(
i
);
return
*
this
;
}
// 16384 means 1<<14
float
to_float
()
const
{
return
((
int32_t
)
v
)
/
16384.
f
;
}
void
set_float
(
float
f
)
{
v
=
round
(
f
*
16384.
f
);
}
void
set_float
(
float
f
)
{
v
=
round
f
(
f
*
16384.
f
);
}
public:
DEFINE_SIZE_STATIC
(
2
);
};
...
...
@@ -121,7 +121,7 @@ struct Fixed : HBINT32
Fixed
&
operator
=
(
uint32_t
i
)
{
HBINT32
::
operator
=
(
i
);
return
*
this
;
}
// 65536 means 1<<16
float
to_float
()
const
{
return
((
int32_t
)
v
)
/
65536.
f
;
}
void
set_float
(
float
f
)
{
v
=
round
(
f
*
65536.
f
);
}
void
set_float
(
float
f
)
{
v
=
round
f
(
f
*
65536.
f
);
}
public:
DEFINE_SIZE_STATIC
(
4
);
};
...
...
src/hb-ot-color-cbdt-table.hh
浏览文件 @
dfc57802
...
...
@@ -442,12 +442,12 @@ struct CBDT
}
/* Convert to font units. */
double
x_scale
=
upem
/
(
double
)
strike
.
ppemX
;
double
y_scale
=
upem
/
(
double
)
strike
.
ppemY
;
extents
->
x_bearing
=
round
(
extents
->
x_bearing
*
x_scale
);
extents
->
y_bearing
=
round
(
extents
->
y_bearing
*
y_scale
);
extents
->
width
=
round
(
extents
->
width
*
x_scale
);
extents
->
height
=
round
(
extents
->
height
*
y_scale
);
float
x_scale
=
upem
/
(
float
)
strike
.
ppemX
;
float
y_scale
=
upem
/
(
float
)
strike
.
ppemY
;
extents
->
x_bearing
=
round
f
(
extents
->
x_bearing
*
x_scale
);
extents
->
y_bearing
=
round
f
(
extents
->
y_bearing
*
y_scale
);
extents
->
width
=
round
f
(
extents
->
width
*
x_scale
);
extents
->
height
=
round
f
(
extents
->
height
*
y_scale
);
return
true
;
}
...
...
src/hb-ot-color-sbix-table.hh
浏览文件 @
dfc57802
...
...
@@ -242,11 +242,11 @@ struct sbix
/* Convert to font units. */
if
(
strike_ppem
)
{
double
scale
=
font
->
face
->
get_upem
()
/
(
double
)
strike_ppem
;
extents
->
x_bearing
=
round
(
extents
->
x_bearing
*
scale
);
extents
->
y_bearing
=
round
(
extents
->
y_bearing
*
scale
);
extents
->
width
=
round
(
extents
->
width
*
scale
);
extents
->
height
=
round
(
extents
->
height
*
scale
);
float
scale
=
font
->
face
->
get_upem
()
/
(
float
)
strike_ppem
;
extents
->
x_bearing
=
round
f
(
extents
->
x_bearing
*
scale
);
extents
->
y_bearing
=
round
f
(
extents
->
y_bearing
*
scale
);
extents
->
width
=
round
f
(
extents
->
width
*
scale
);
extents
->
height
=
round
f
(
extents
->
height
*
scale
);
}
hb_blob_destroy
(
blob
);
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
dfc57802
...
...
@@ -446,8 +446,8 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
glyph_anchor
.
get_anchor
(
c
,
buffer
->
info
[
glyph_pos
].
codepoint
,
&
base_x
,
&
base_y
);
hb_glyph_position_t
&
o
=
buffer
->
cur_pos
();
o
.
x_offset
=
round
(
base_x
-
mark_x
);
o
.
y_offset
=
round
(
base_y
-
mark_y
);
o
.
x_offset
=
round
f
(
base_x
-
mark_x
);
o
.
y_offset
=
round
f
(
base_y
-
mark_y
);
o
.
attach_type
()
=
ATTACH_TYPE_MARK
;
o
.
attach_chain
()
=
(
int
)
glyph_pos
-
(
int
)
buffer
->
idx
;
buffer
->
scratch_flags
|=
HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT
;
...
...
@@ -993,32 +993,32 @@ struct CursivePosFormat1
/* Main-direction adjustment */
switch
(
c
->
direction
)
{
case
HB_DIRECTION_LTR
:
pos
[
i
].
x_advance
=
round
(
exit_x
)
+
pos
[
i
].
x_offset
;
pos
[
i
].
x_advance
=
round
f
(
exit_x
)
+
pos
[
i
].
x_offset
;
d
=
round
(
entry_x
)
+
pos
[
j
].
x_offset
;
d
=
round
f
(
entry_x
)
+
pos
[
j
].
x_offset
;
pos
[
j
].
x_advance
-=
d
;
pos
[
j
].
x_offset
-=
d
;
break
;
case
HB_DIRECTION_RTL
:
d
=
round
(
exit_x
)
+
pos
[
i
].
x_offset
;
d
=
round
f
(
exit_x
)
+
pos
[
i
].
x_offset
;
pos
[
i
].
x_advance
-=
d
;
pos
[
i
].
x_offset
-=
d
;
pos
[
j
].
x_advance
=
round
(
entry_x
)
+
pos
[
j
].
x_offset
;
pos
[
j
].
x_advance
=
round
f
(
entry_x
)
+
pos
[
j
].
x_offset
;
break
;
case
HB_DIRECTION_TTB
:
pos
[
i
].
y_advance
=
round
(
exit_y
)
+
pos
[
i
].
y_offset
;
pos
[
i
].
y_advance
=
round
f
(
exit_y
)
+
pos
[
i
].
y_offset
;
d
=
round
(
entry_y
)
+
pos
[
j
].
y_offset
;
d
=
round
f
(
entry_y
)
+
pos
[
j
].
y_offset
;
pos
[
j
].
y_advance
-=
d
;
pos
[
j
].
y_offset
-=
d
;
break
;
case
HB_DIRECTION_BTT
:
d
=
round
(
exit_y
)
+
pos
[
i
].
y_offset
;
d
=
round
f
(
exit_y
)
+
pos
[
i
].
y_offset
;
pos
[
i
].
y_advance
-=
d
;
pos
[
i
].
y_offset
-=
d
;
pos
[
j
].
y_advance
=
round
(
entry_y
);
pos
[
j
].
y_advance
=
round
f
(
entry_y
);
break
;
case
HB_DIRECTION_INVALID
:
default:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录