Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
357ccde3
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 搜索 >>
提交
357ccde3
编写于
5月 21, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[GPOS] MarkBasePosFormat1
上级
377bfc58
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
58 addition
and
5 deletion
+58
-5
src/TODO
src/TODO
+1
-0
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+57
-5
未找到文件。
src/TODO
浏览文件 @
357ccde3
...
...
@@ -3,3 +3,4 @@
- Implement is_simple()
- Static assert PangoOTGlyph vs hb */
- Face index > 0 and dfont fonts
- assert static HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
src/hb-ot-layout-gpos-private.h
浏览文件 @
357ccde3
...
...
@@ -240,8 +240,8 @@ ASSERT_SIZE (MarkRecord, 4);
struct
MarkArray
{
inline
unsigned
int
get_class
(
unsigned
int
index
)
{
return
markRecord
[
index
].
klass
;
}
inline
const
Anchor
&
get_anchor
(
unsigned
int
index
)
{
return
this
+
markRecord
[
index
].
markAnchor
;
}
inline
unsigned
int
get_class
(
unsigned
int
index
)
const
{
return
markRecord
[
index
].
klass
;
}
inline
const
Anchor
&
get_anchor
(
unsigned
int
index
)
const
{
return
this
+
markRecord
[
index
].
markAnchor
;
}
private:
ArrayOf
<
MarkRecord
>
...
...
@@ -774,9 +774,61 @@ struct MarkBasePosFormat1
private:
inline
bool
apply
(
APPLY_ARG_DEF
)
const
{
/* TODO */
/* XXXXXXXXXXXXXXX */
return
false
;
if
(
lookup_flag
&
LookupFlag
::
IgnoreBaseGlyphs
)
return
false
;
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
IN_CURGLYPH
());
if
(
HB_LIKELY
(
mark_index
==
NOT_COVERED
))
return
false
;
/* now we search backwards for a non-mark glyph */
unsigned
int
count
=
buffer
->
in_pos
;
unsigned
int
i
=
1
,
j
=
count
-
1
;
while
(
i
<=
count
)
{
property
=
_hb_ot_layout_get_glyph_property
(
layout
,
IN_GLYPH
(
j
));
if
(
!
(
property
==
LookupFlag
::
IgnoreMarks
||
property
&
LookupFlag
::
MarkAttachmentType
))
break
;
i
++
,
j
--
;
}
if
(
HB_UNLIKELY
(
i
>
buffer
->
in_pos
))
return
false
;
/* The following assertion is too strong -- at least for mangal.ttf. */
if
(
property
!=
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
)
return
false
;
unsigned
int
base_index
=
(
this
+
baseCoverage
)
(
IN_GLYPH
(
j
));
if
(
HB_LIKELY
(
base_index
==
NOT_COVERED
))
return
false
;
const
MarkArray
&
mark_array
=
this
+
markArray
;
const
BaseArray
&
base_array
=
this
+
baseArray
;
unsigned
int
mark_class
=
mark_array
.
get_class
(
mark_index
);
const
Anchor
&
mark_anchor
=
mark_array
.
get_anchor
(
mark_index
);
if
(
HB_UNLIKELY
(
mark_class
>=
classCount
||
base_index
>=
base_array
.
len
))
return
false
;
hb_position_t
mark_x
,
mark_y
,
base_x
,
base_y
;
mark_anchor
.
get_anchor
(
layout
,
IN_CURGLYPH
(),
&
mark_x
,
&
mark_y
);
unsigned
int
index
=
base_index
*
classCount
+
mark_class
;
(
&
base_array
+
base_array
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
base_x
,
&
base_y
);
/* anchor points are not cumulative */
HB_Position
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
base_x
-
mark_x
;
o
->
y_pos
=
base_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
y_advance
=
0
;
o
->
back
=
i
;
buffer
->
in_pos
++
;
return
true
;
}
private:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录