Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e4b92b85
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,发现更多精彩内容 >>
提交
e4b92b85
编写于
5月 26, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Support parsing MarkFilteringSets introduced in OpenType 1.6
上级
515ce4ce
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
11 deletion
+51
-11
src/hb-ot-layout-gdef-private.h
src/hb-ot-layout-gdef-private.h
+47
-8
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+1
-0
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+3
-3
未找到文件。
src/hb-ot-layout-gdef-private.h
浏览文件 @
e4b92b85
...
...
@@ -213,6 +213,39 @@ struct LigCaretList
};
ASSERT_SIZE
(
LigCaretList
,
4
);
struct
MarkGlyphSetsFormat1
{
inline
bool
covers
(
unsigned
int
set_index
,
hb_codepoint_t
glyph_id
)
const
{
return
(
this
+
coverage
[
set_index
]).
get_coverage
(
glyph_id
)
!=
NOT_COVERED
;
}
private:
USHORT
format
;
/* Format identifier--format = 1 */
LongOffsetArrayOf
<
Coverage
>
coverage
;
/* Array of long offsets to mark set
* coverage tables */
};
ASSERT_SIZE
(
MarkGlyphSetsFormat1
,
4
);
struct
MarkGlyphSets
{
inline
bool
covers
(
unsigned
int
set_index
,
hb_codepoint_t
glyph_id
)
const
{
switch
(
u
.
format
)
{
case
1
:
return
u
.
format1
->
covers
(
set_index
,
glyph_id
);
default:
return
false
;
}
}
private:
union
{
USHORT
format
;
/* Format identifier */
MarkGlyphSetsFormat1
format1
[];
}
u
;
};
ASSERT_SIZE
(
MarkGlyphSets
,
2
);
/*
* GDEF
*/
...
...
@@ -232,18 +265,15 @@ struct GDEF
STATIC_DEFINE_GET_FOR_DATA_CHECK_MAJOR_VERSION
(
GDEF
,
1
);
inline
bool
has_glyph_classes
()
const
{
return
glyphClassDef
!=
0
;
}
inline
hb_ot_layout_class_t
get_glyph_class
(
hb_ot_layout_t
*
layout
,
hb_codepoint_t
glyph
)
const
inline
hb_ot_layout_class_t
get_glyph_class
(
hb_codepoint_t
glyph
)
const
{
return
(
this
+
glyphClassDef
).
get_class
(
glyph
);
}
inline
bool
has_mark_attachment_types
()
const
{
return
markAttachClassDef
!=
0
;
}
inline
hb_ot_layout_class_t
get_mark_attachment_type
(
hb_ot_layout_t
*
layout
,
hb_codepoint_t
glyph
)
const
inline
hb_ot_layout_class_t
get_mark_attachment_type
(
hb_codepoint_t
glyph
)
const
{
return
(
this
+
markAttachClassDef
).
get_class
(
glyph
);
}
inline
bool
has_attach_points
()
const
{
return
attachList
!=
0
;
}
inline
bool
get_attach_points
(
hb_ot_layout_t
*
layout
,
hb_codepoint_t
glyph_id
,
inline
bool
get_attach_points
(
hb_codepoint_t
glyph_id
,
unsigned
int
*
point_count
/* IN/OUT */
,
unsigned
int
*
point_array
/* OUT */
)
const
{
return
(
this
+
attachList
).
get_attach_points
(
glyph_id
,
point_count
,
point_array
);
}
...
...
@@ -255,9 +285,13 @@ struct GDEF
int
*
caret_array
/* OUT */
)
const
{
return
(
this
+
ligCaretList
).
get_lig_carets
(
layout
,
glyph_id
,
caret_count
,
caret_array
);
}
inline
bool
has_mark_sets
()
const
{
return
version
>=
0x00010002
&&
markGlyphSetsDef
[
0
]
!=
0
;
}
inline
bool
mark_set_covers
(
unsigned
int
set_index
,
hb_codepoint_t
glyph_id
)
const
{
return
version
>=
0x00010002
&&
(
this
+
markGlyphSetsDef
[
0
]).
covers
(
set_index
,
glyph_id
);
}
private:
FixedVersion
version
;
/* Version of the GDEF table--
initial
ly
* 0x0001000
0
*/
FixedVersion
version
;
/* Version of the GDEF table--
current
ly
* 0x0001000
2
*/
OffsetTo
<
ClassDef
>
glyphClassDef
;
/* Offset to class definition table
* for glyph type--from beginning of
...
...
@@ -274,6 +308,11 @@ struct GDEF
markAttachClassDef
;
/* Offset to class definition table for
* mark attachment type--from beginning
* of GDEF header (may be Null) */
OffsetTo
<
MarkGlyphSets
>
markGlyphSetsDef
[
0
];
/* Offset to the table of mark set
* definitions--from beginning of GDEF
* header (may be NULL). Introduced
* in version 00010002. */
};
ASSERT_SIZE
(
GDEF
,
12
);
...
...
src/hb-ot-layout-gpos-private.h
浏览文件 @
e4b92b85
...
...
@@ -48,6 +48,7 @@ struct ValueFormat : USHORT
yPlaDevice
=
0x0020
,
/* Includes vertical Device table for placement */
xAdvDevice
=
0x0040
,
/* Includes horizontal Device table for advance */
yAdvDevice
=
0x0080
,
/* Includes vertical Device table for advance */
ignored
=
0x0F00
,
/* Was used in TrueType Open for MM fonts */
reserved
=
0xF000
,
/* For future use */
};
...
...
src/hb-ot-layout.cc
浏览文件 @
e4b92b85
...
...
@@ -140,11 +140,11 @@ _hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout,
/* TODO old harfbuzz doesn't always parse mark attachments as it says it was
* introduced without a version bump, so it may not be safe */
klass
=
layout
->
gdef
->
get_mark_attachment_type
(
layout
,
glyph
);
klass
=
layout
->
gdef
->
get_mark_attachment_type
(
glyph
);
if
(
klass
)
return
klass
<<
8
;
klass
=
layout
->
gdef
->
get_glyph_class
(
layout
,
glyph
);
klass
=
layout
->
gdef
->
get_glyph_class
(
glyph
);
if
(
!
klass
&&
glyph
<
layout
->
new_gdef
.
len
)
klass
=
layout
->
new_gdef
.
klasses
[
glyph
];
...
...
@@ -308,7 +308,7 @@ hb_ot_layout_get_attach_points (hb_ot_layout_t *layout,
unsigned
int
*
point_count
/* IN/OUT */
,
unsigned
int
*
point_array
/* OUT */
)
{
return
layout
->
gdef
->
get_attach_points
(
layout
,
glyph
,
point_count
,
point_array
);
return
layout
->
gdef
->
get_attach_points
(
glyph
,
point_count
,
point_array
);
}
hb_bool_t
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录