Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ca286703
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
11 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
ca286703
编写于
3月 01, 2016
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[GX] Towards anisotropic interpolation
Also hookup to ValueRecord and Anchors.
上级
6d9d3c55
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
16 deletion
+22
-16
src/hb-font-private.hh
src/hb-font-private.hh
+3
-2
src/hb-font.cc
src/hb-font.cc
+7
-2
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+2
-2
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+10
-10
未找到文件。
src/hb-font-private.hh
浏览文件 @
ca286703
...
...
@@ -109,8 +109,9 @@ struct hb_font_t {
unsigned
int
y_ppem
;
/* Font variation coordinates. */
int
*
coords
;
unsigned
int
coord_count
;
unsigned
int
num_coords
;
int
*
x_coords
;
int
*
y_coords
;
hb_font_funcs_t
*
klass
;
void
*
user_data
;
...
...
src/hb-font.cc
浏览文件 @
ca286703
...
...
@@ -1165,6 +1165,8 @@ hb_font_create_sub_font (hb_font_t *parent)
font
->
x_ppem
=
parent
->
x_ppem
;
font
->
y_ppem
=
parent
->
y_ppem
;
/* TODO: copy variation coordinates. */
return
font
;
}
...
...
@@ -1194,8 +1196,9 @@ hb_font_get_empty (void)
0
,
/* x_ppem */
0
,
/* y_ppem */
NULL
,
/* coords */
0
,
/* coord_count */
0
,
/* num_coords */
NULL
,
/* x_coords */
NULL
,
/* y_coords */
const_cast
<
hb_font_funcs_t
*>
(
&
_hb_font_funcs_nil
),
/* klass */
NULL
,
/* user_data */
...
...
@@ -1251,6 +1254,8 @@ hb_font_destroy (hb_font_t *font)
hb_face_destroy
(
font
->
face
);
hb_font_funcs_destroy
(
font
->
klass
);
/* TODO: destroy variation coordinates. */
free
(
font
);
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
ca286703
...
...
@@ -1315,10 +1315,10 @@ struct VariationDevice
{
inline
hb_position_t
get_x_delta
(
hb_font_t
*
font
)
const
{
return
font
->
em_scalef_x
(
get_delta
(
font
->
coords
,
font
->
coord_count
));
}
{
return
font
->
em_scalef_x
(
get_delta
(
font
->
x_coords
,
font
->
num_coords
));
}
inline
hb_position_t
get_y_delta
(
hb_font_t
*
font
)
const
{
return
font
->
em_scalef_y
(
get_delta
(
font
->
coords
,
font
->
coord_count
));
}
{
return
font
->
em_scalef_y
(
get_delta
(
font
->
y_coords
,
font
->
num_coords
));
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
ca286703
...
...
@@ -109,7 +109,6 @@ struct ValueFormat : USHORT
const
Value
*
values
,
hb_glyph_position_t
&
glyph_pos
)
const
{
unsigned
int
x_ppem
,
y_ppem
;
unsigned
int
format
=
*
this
;
hb_bool_t
horizontal
=
HB_DIRECTION_IS_HORIZONTAL
(
direction
);
...
...
@@ -129,27 +128,28 @@ struct ValueFormat : USHORT
if
(
!
has_device
())
return
;
x_ppem
=
font
->
x_ppem
;
y_ppem
=
font
->
y_ppem
;
bool
use_x_device
=
font
->
x_ppem
||
font
->
num_coords
;
bool
use_y_device
=
font
->
y_ppem
||
font
->
num_coords
;
if
(
!
x_ppem
&&
!
y_ppem
)
return
;
if
(
!
use_x_device
&&
!
use_y_device
)
return
;
/* pixel -> fractional pixel */
if
(
format
&
xPlaDevice
)
{
if
(
x_ppem
)
glyph_pos
.
x_offset
+=
(
base
+
get_device
(
values
)).
get_x_delta
(
font
);
if
(
use_x_device
)
glyph_pos
.
x_offset
+=
(
base
+
get_device
(
values
)).
get_x_delta
(
font
);
values
++
;
}
if
(
format
&
yPlaDevice
)
{
if
(
y_ppem
)
glyph_pos
.
y_offset
+=
(
base
+
get_device
(
values
)).
get_y_delta
(
font
);
if
(
use_y_device
)
glyph_pos
.
y_offset
+=
(
base
+
get_device
(
values
)).
get_y_delta
(
font
);
values
++
;
}
if
(
format
&
xAdvDevice
)
{
if
(
horizontal
&&
x_ppem
)
glyph_pos
.
x_advance
+=
(
base
+
get_device
(
values
)).
get_x_delta
(
font
);
if
(
horizontal
&&
use_x_device
)
glyph_pos
.
x_advance
+=
(
base
+
get_device
(
values
)).
get_x_delta
(
font
);
values
++
;
}
if
(
format
&
yAdvDevice
)
{
/* y_advance values grow downward but font-space grows upward, hence negation */
if
(
!
horizontal
&&
y_ppem
)
glyph_pos
.
y_advance
-=
(
base
+
get_device
(
values
)).
get_y_delta
(
font
);
if
(
!
horizontal
&&
use_y_device
)
glyph_pos
.
y_advance
-=
(
base
+
get_device
(
values
)).
get_y_delta
(
font
);
values
++
;
}
}
...
...
@@ -291,9 +291,9 @@ struct AnchorFormat3
*
x
=
font
->
em_scale_x
(
xCoordinate
);
*
y
=
font
->
em_scale_y
(
yCoordinate
);
if
(
font
->
x_ppem
)
if
(
font
->
x_ppem
||
font
->
num_coords
)
*
x
+=
(
this
+
xDeviceTable
).
get_x_delta
(
font
);
if
(
font
->
y_ppem
)
if
(
font
->
y_ppem
||
font
->
num_coords
)
*
y
+=
(
this
+
yDeviceTable
).
get_x_delta
(
font
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录