Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b6f902a1
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看板
提交
b6f902a1
编写于
5月 11, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
上级
abcfe9b5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
src/hb-font-private.hh
src/hb-font-private.hh
+3
-3
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+3
-3
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+10
-10
未找到文件。
src/hb-font-private.hh
浏览文件 @
b6f902a1
...
...
@@ -115,11 +115,11 @@ struct _hb_font_t {
/* Convert from font-space to user-space */
inline
hb_position_t
scale_x
(
int16_t
v
)
{
return
scale
(
v
,
this
->
x_scale
);
}
inline
hb_position_t
scale_y
(
int16_t
v
)
{
return
scale
(
v
,
this
->
y_scale
);
}
inline
hb_position_t
em_scale_x
(
int16_t
v
)
{
return
em_
scale
(
v
,
this
->
x_scale
);
}
inline
hb_position_t
em_scale_y
(
int16_t
v
)
{
return
em_
scale
(
v
,
this
->
y_scale
);
}
private:
inline
hb_position_t
scale
(
int16_t
v
,
int
scale
)
{
return
v
*
(
int64_t
)
scale
/
this
->
face
->
upem
;
}
inline
hb_position_t
em_
scale
(
int16_t
v
,
int
scale
)
{
return
v
*
(
int64_t
)
scale
/
this
->
face
->
upem
;
}
};
...
...
src/hb-ot-layout-gdef-private.hh
浏览文件 @
b6f902a1
...
...
@@ -98,7 +98,7 @@ struct CaretValueFormat1
private:
inline
int
get_caret_value
(
hb_font_t
*
font
,
hb_direction_t
direction
,
hb_codepoint_t
glyph_id
HB_UNUSED
)
const
{
return
HB_DIRECTION_IS_HORIZONTAL
(
direction
)
?
font
->
scale_x
(
coordinate
)
:
font
->
scale_y
(
coordinate
);
return
HB_DIRECTION_IS_HORIZONTAL
(
direction
)
?
font
->
em_scale_x
(
coordinate
)
:
font
->
em_
scale_y
(
coordinate
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
{
...
...
@@ -146,8 +146,8 @@ struct CaretValueFormat3
inline
int
get_caret_value
(
hb_font_t
*
font
,
hb_direction_t
direction
,
hb_codepoint_t
glyph_id
)
const
{
return
HB_DIRECTION_IS_HORIZONTAL
(
direction
)
?
font
->
scale_x
(
coordinate
)
+
(
this
+
deviceTable
).
get_x_delta
(
font
)
:
font
->
scale_y
(
coordinate
)
+
(
this
+
deviceTable
).
get_y_delta
(
font
);
font
->
em_
scale_x
(
coordinate
)
+
(
this
+
deviceTable
).
get_x_delta
(
font
)
:
font
->
em_
scale_y
(
coordinate
)
+
(
this
+
deviceTable
).
get_y_delta
(
font
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
{
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
b6f902a1
...
...
@@ -105,10 +105,10 @@ struct ValueFormat : USHORT
if
(
!
format
)
return
;
/* design units -> fractional pixel */
if
(
format
&
xPlacement
)
glyph_pos
.
x_offset
+=
font
->
scale_x
(
get_short
(
values
++
));
if
(
format
&
yPlacement
)
glyph_pos
.
y_offset
+=
font
->
scale_y
(
get_short
(
values
++
));
if
(
format
&
xAdvance
)
glyph_pos
.
x_advance
+=
font
->
scale_x
(
get_short
(
values
++
));
if
(
format
&
yAdvance
)
glyph_pos
.
y_advance
+=
font
->
scale_y
(
get_short
(
values
++
));
if
(
format
&
xPlacement
)
glyph_pos
.
x_offset
+=
font
->
em_
scale_x
(
get_short
(
values
++
));
if
(
format
&
yPlacement
)
glyph_pos
.
y_offset
+=
font
->
em_
scale_y
(
get_short
(
values
++
));
if
(
format
&
xAdvance
)
glyph_pos
.
x_advance
+=
font
->
em_
scale_x
(
get_short
(
values
++
));
if
(
format
&
yAdvance
)
glyph_pos
.
y_advance
+=
font
->
em_
scale_y
(
get_short
(
values
++
));
if
(
!
has_device
())
return
;
...
...
@@ -212,8 +212,8 @@ struct AnchorFormat1
inline
void
get_anchor
(
hb_font_t
*
font
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
*
x
=
font
->
scale_x
(
xCoordinate
);
*
y
=
font
->
scale_y
(
yCoordinate
);
*
x
=
font
->
em_
scale_x
(
xCoordinate
);
*
y
=
font
->
em_
scale_y
(
yCoordinate
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
{
...
...
@@ -244,8 +244,8 @@ struct AnchorFormat2
if
(
x_ppem
||
y_ppem
)
ret
=
hb_font_get_contour_point
(
font
,
anchorPoint
,
glyph_id
,
&
cx
,
&
cy
);
*
x
=
x_ppem
&&
ret
?
cx
:
font
->
scale_x
(
xCoordinate
);
*
y
=
y_ppem
&&
ret
?
cy
:
font
->
scale_y
(
yCoordinate
);
*
x
=
x_ppem
&&
ret
?
cx
:
font
->
em_
scale_x
(
xCoordinate
);
*
y
=
y_ppem
&&
ret
?
cy
:
font
->
em_
scale_y
(
yCoordinate
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
{
...
...
@@ -270,8 +270,8 @@ struct AnchorFormat3
inline
void
get_anchor
(
hb_font_t
*
font
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
*
x
=
font
->
scale_x
(
xCoordinate
);
*
y
=
font
->
scale_y
(
yCoordinate
);
*
x
=
font
->
em_
scale_x
(
xCoordinate
);
*
y
=
font
->
em_
scale_y
(
yCoordinate
);
/* pixel -> fractional pixel */
if
(
font
->
x_ppem
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录