Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e49a84c9
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看板
提交
e49a84c9
编写于
8月 04, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] GDEF sanitize()
上级
18939487
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
57 addition
and
3 deletion
+57
-3
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+54
-0
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+1
-1
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+1
-1
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+1
-1
未找到文件。
src/hb-ot-layout-gdef-private.hh
浏览文件 @
e49a84c9
...
...
@@ -73,6 +73,10 @@ struct AttachList
return
true
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_THIS2
(
coverage
,
attachPoint
);
}
private:
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table -- from
...
...
@@ -98,6 +102,10 @@ struct CaretValueFormat1
return
context
->
font
->
x_scale
*
coordinate
/
0x10000
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_SELF
();
}
private:
USHORT
caretValueFormat
;
/* Format identifier--format = 1 */
SHORT
coordinate
;
/* X or Y value, in design units */
...
...
@@ -114,6 +122,10 @@ struct CaretValueFormat2
return
/* TODO contour point */
0
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_SELF
();
}
private:
USHORT
caretValueFormat
;
/* Format identifier--format = 2 */
USHORT
caretValuePoint
;
/* Contour point index on glyph */
...
...
@@ -131,6 +143,10 @@ struct CaretValueFormat3
((
this
+
deviceTable
).
get_delta
(
context
->
font
->
x_ppem
)
<<
6
);
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_SELF
()
&&
SANITIZE_THIS
(
deviceTable
);
}
private:
USHORT
caretValueFormat
;
/* Format identifier--format = 3 */
SHORT
coordinate
;
/* X or Y value, in design units */
...
...
@@ -154,6 +170,16 @@ struct CaretValue
}
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
!
SANITIZE
(
u
.
format
))
return
false
;
switch
(
u
.
format
)
{
case
1
:
return
u
.
format1
->
sanitize
(
SANITIZE_ARG
);
case
2
:
return
u
.
format2
->
sanitize
(
SANITIZE_ARG
);
case
3
:
return
u
.
format3
->
sanitize
(
SANITIZE_ARG
);
default:
return
true
;
}
}
private:
union
{
USHORT
format
;
/* Format identifier */
...
...
@@ -179,6 +205,10 @@ struct LigGlyph
*
caret_count
=
carets
.
len
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE
(
carets
);
}
private:
OffsetArrayOf
<
CaretValue
>
carets
;
/* Offset rrray of CaretValue tables
...
...
@@ -205,6 +235,10 @@ struct LigCaretList
return
true
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_THIS2
(
coverage
,
ligGlyph
);
}
private:
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
...
...
@@ -221,6 +255,10 @@ 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
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
return
SANITIZE_THIS
(
coverage
);
}
private:
USHORT
format
;
/* Format identifier--format = 1 */
LongOffsetArrayOf
<
Coverage
>
...
...
@@ -239,6 +277,14 @@ struct MarkGlyphSets
}
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
!
SANITIZE
(
u
.
format
))
return
false
;
switch
(
u
.
format
)
{
case
1
:
return
u
.
format1
->
sanitize
(
SANITIZE_ARG
);
default:
return
true
;
}
}
private:
union
{
USHORT
format
;
/* Format identifier */
...
...
@@ -291,6 +337,14 @@ struct GDEF
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
);
}
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
!
SANITIZE
(
version
))
return
false
;
if
(
version
.
major
!=
1
)
return
true
;
return
SANITIZE_THIS2
(
glyphClassDef
,
attachList
)
&&
SANITIZE_THIS2
(
ligCaretList
,
markAttachClassDef
)
&&
(
version
<
0x00010002
||
SANITIZE_THIS
(
markGlyphSetsDef
[
0
]));
}
private:
FixedVersion
version
;
/* Version of the GDEF table--currently
* 0x00010002 */
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
e49a84c9
...
...
@@ -1501,7 +1501,7 @@ struct GPOS : GSUBGPOS
hb_ot_layout_feature_mask_t
mask
)
const
{
return
get_lookup
(
lookup_index
).
apply_string
(
context
,
buffer
,
mask
);
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
GSUBGPOS
::
sanitize
(
SANITIZE_ARG
))
return
false
;
OffsetTo
<
PosLookupList
>
&
list
=
CAST
(
OffsetTo
<
PosLookupList
>
,
lookupList
,
0
);
return
SANITIZE_THIS
(
list
);
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
e49a84c9
...
...
@@ -838,7 +838,7 @@ struct GSUB : GSUBGPOS
{
return
get_lookup
(
lookup_index
).
apply_string
(
context
,
buffer
,
mask
);
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
GSUBGPOS
::
sanitize
(
SANITIZE_ARG
))
return
false
;
OffsetTo
<
SubstLookupList
>
&
list
=
CAST
(
OffsetTo
<
SubstLookupList
>
,
lookupList
,
0
);
return
SANITIZE_THIS
(
list
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
e49a84c9
...
...
@@ -848,7 +848,7 @@ struct GSUBGPOS
DEFINE_TAG_FIND_INTERFACE
(
Script
,
script
);
/* find_script_index (), get_script_by_tag (tag) */
DEFINE_TAG_FIND_INTERFACE
(
Feature
,
feature
);
/* find_feature_index(), get_feature_by_tag(tag) */
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
if
(
!
SANITIZE
(
version
))
return
false
;
if
(
version
.
major
!=
1
)
return
true
;
return
SANITIZE_THIS3
(
scriptList
,
featureList
,
lookupList
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录