Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7586089c
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看板
提交
7586089c
编写于
1月 23, 2008
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
上级
aefaafe5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
86 addition
and
15 deletion
+86
-15
src/hb-ot-layout-gdef-private.h
src/hb-ot-layout-gdef-private.h
+30
-7
src/hb-ot-layout-gsub-private.h
src/hb-ot-layout-gsub-private.h
+13
-0
src/hb-ot-layout-open-private.h
src/hb-ot-layout-open-private.h
+41
-8
src/hb-private.h
src/hb-private.h
+2
-0
未找到文件。
src/hb-ot-layout-gdef-private.h
浏览文件 @
7586089c
...
...
@@ -53,6 +53,10 @@ struct GlyphClassDef : ClassDef {
*/
struct
AttachPoint
{
friend
struct
AttachList
;
private:
/* countour point indices, in increasing numerical order */
DEFINE_ARRAY_TYPE
(
USHORT
,
pointIndex
,
pointCount
);
...
...
@@ -65,6 +69,10 @@ struct AttachPoint {
DEFINE_NULL_ASSERT_SIZE
(
AttachPoint
,
2
);
struct
AttachList
{
friend
struct
GDEF
;
private:
/* const AttachPoint& get_attach_points (uint16_t glyph_id); */
DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP
(
AttachPoint
,
get_attach_points
);
...
...
@@ -90,6 +98,9 @@ DEFINE_NULL_ASSERT_SIZE (AttachList, 4);
struct
CaretValueFormat1
{
friend
struct
CaretValue
;
private:
inline
int
get_caret_value
(
int
ppem
)
const
{
return
/* TODO garbage */
coordinate
/
ppem
;
}
...
...
@@ -102,6 +113,9 @@ ASSERT_SIZE (CaretValueFormat1, 4);
struct
CaretValueFormat2
{
friend
struct
CaretValue
;
private:
inline
int
get_caret_value
(
int
ppem
)
const
{
return
/* TODO garbage */
0
/
ppem
;
}
...
...
@@ -114,6 +128,9 @@ ASSERT_SIZE (CaretValueFormat2, 4);
struct
CaretValueFormat3
{
friend
struct
CaretValue
;
private:
inline
const
Device
&
get_device
(
void
)
const
{
if
(
HB_UNLIKELY
(
!
deviceTable
))
return
NullDevice
;
return
*
(
const
Device
*
)((
const
char
*
)
this
+
deviceTable
);
...
...
@@ -135,7 +152,7 @@ ASSERT_SIZE (CaretValueFormat3, 6);
struct
CaretValue
{
DEFINE_NON_INSTANTIABLE
(
CaretValue
);
inline
unsigned
int
get_size
(
void
)
const
{
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
caretValueFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
case
2
:
return
sizeof
(
u
.
format2
);
...
...
@@ -145,7 +162,7 @@ struct CaretValue {
}
/* XXX we need access to a load-contour-point vfunc here */
in
line
in
t
get_caret_value
(
int
ppem
)
const
{
int
get_caret_value
(
int
ppem
)
const
{
switch
(
u
.
caretValueFormat
)
{
case
1
:
return
u
.
format1
.
get_caret_value
(
ppem
);
case
2
:
return
u
.
format2
.
get_caret_value
(
ppem
);
...
...
@@ -166,6 +183,10 @@ struct CaretValue {
DEFINE_NULL
(
CaretValue
,
2
);
struct
LigGlyph
{
friend
struct
LigCaretList
;
private:
/* Caret value tables, in increasing coordinate order */
DEFINE_OFFSET_ARRAY_TYPE
(
CaretValue
,
caretValue
,
caretCount
);
/* TODO */
...
...
@@ -181,6 +202,10 @@ struct LigGlyph {
DEFINE_NULL_ASSERT_SIZE
(
LigGlyph
,
2
);
struct
LigCaretList
{
friend
struct
GDEF
;
private:
/* const LigGlyph& get_lig_glyph (uint16_t glyph_id); */
DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP
(
LigGlyph
,
get_lig_glyph
);
...
...
@@ -205,7 +230,7 @@ DEFINE_NULL_ASSERT_SIZE (LigCaretList, 4);
*/
struct
GDEF
{
static
const
hb_tag_t
GDEF
Tag
=
HB_TAG
(
'G'
,
'D'
,
'E'
,
'F'
);
static
const
hb_tag_t
Tag
=
HB_TAG
(
'G'
,
'D'
,
'E'
,
'F'
);
STATIC_DEFINE_GET_FOR_DATA
(
GDEF
);
/* XXX check version here? */
...
...
@@ -217,14 +242,12 @@ struct GDEF {
/* Returns 0 if not found. */
inline
int
get_glyph_class
(
uint16_t
glyph_id
)
const
{
const
ClassDef
&
class_def
=
get_glyph_class_def
();
return
class_def
.
get_class
(
glyph_id
);
return
get_glyph_class_def
().
get_class
(
glyph_id
);
}
/* Returns 0 if not found. */
inline
int
get_mark_attachment_type
(
uint16_t
glyph_id
)
const
{
const
ClassDef
&
class_def
=
get_mark_attach_class_def
();
return
class_def
.
get_class
(
glyph_id
);
return
get_mark_attach_class_def
().
get_class
(
glyph_id
);
}
/* TODO get_glyph_property */
...
...
src/hb-ot-layout-gsub-private.h
浏览文件 @
7586089c
...
...
@@ -450,4 +450,17 @@ struct ReverseChainSingleSubstFormat1 {
};
ASSERT_SIZE
(
ReverseChainSingleSubstFormat1
,
10
);
/*
* GSUB
*/
struct
GSUB
:
GSUBGPOS
{
static
const
hb_tag_t
Tag
=
HB_TAG
(
'G'
,
'S'
,
'U'
,
'B'
);
STATIC_DEFINE_GET_FOR_DATA
(
GSUB
);
/* XXX check version here? */
};
DEFINE_NULL_ALIAS
(
GSUB
,
GSUBGPOS
);
#endif
/* HB_OT_LAYOUT_GSUB_PRIVATE_H */
src/hb-ot-layout-open-private.h
浏览文件 @
7586089c
...
...
@@ -314,6 +314,12 @@ typedef struct TableDirectory {
DEFINE_NULL_ASSERT_SIZE
(
TableDirectory
,
16
);
typedef
struct
OffsetTable
{
friend
struct
OpenTypeFontFile
;
friend
struct
TTCHeader
;
// XXX private:
// Add get_num_tables and get_table...
/* OpenTypeTables, in no particular order */
DEFINE_ARRAY_TYPE
(
TableDirectory
,
tableDir
,
numTables
);
// TODO: Implement find_table
...
...
@@ -334,6 +340,10 @@ DEFINE_NULL_ALIAS (OpenTypeFontFace, OffsetTable);
*/
struct
TTCHeader
{
friend
struct
OpenTypeFontFile
;
private:
/* OpenTypeFontFaces, in no particular order */
DEFINE_OFFSET_ARRAY_TYPE
(
OffsetTable
,
offsetTable
,
numFonts
);
/* XXX check version here? */
...
...
@@ -376,14 +386,14 @@ struct OpenTypeFontFile {
}
/* Array interface sans get_size() */
inline
unsigned
int
get_len
(
void
)
const
{
unsigned
int
get_len
(
void
)
const
{
switch
(
tag
)
{
default:
return
0
;
case
TrueTypeTag
:
case
CFFTag
:
return
1
;
case
TTCTag
:
return
((
const
TTCHeader
&
)
*
this
).
get_len
();
}
}
inline
const
OpenTypeFontFace
&
operator
[]
(
unsigned
int
i
)
const
{
const
OpenTypeFontFace
&
operator
[]
(
unsigned
int
i
)
const
{
if
(
HB_UNLIKELY
(
i
>=
get_len
()))
return
NullOpenTypeFontFace
;
switch
(
tag
)
{
default:
case
TrueTypeTag
:
case
CFFTag
:
return
(
const
OffsetTable
&
)
*
this
;
...
...
@@ -566,6 +576,10 @@ DEFINE_NULL_ASSERT_SIZE (LookupList, 2);
*/
struct
CoverageFormat1
{
friend
struct
Coverage
;
private:
/* GlyphIDs, in sorted numerical order */
DEFINE_ARRAY_TYPE
(
GlyphID
,
glyphArray
,
glyphCount
);
...
...
@@ -588,6 +602,9 @@ ASSERT_SIZE (CoverageFormat1, 4);
struct
CoverageRangeRecord
{
friend
struct
CoverageFormat2
;
private:
inline
int
get_coverage
(
uint16_t
glyph_id
)
const
{
if
(
glyph_id
>=
start
&&
glyph_id
<=
end
)
return
startCoverageIndex
+
(
glyph_id
-
start
);
...
...
@@ -603,6 +620,10 @@ struct CoverageRangeRecord {
DEFINE_NULL_ASSERT_SIZE_DATA
(
CoverageRangeRecord
,
6
,
"
\001
"
);
struct
CoverageFormat2
{
friend
struct
Coverage
;
private:
/* CoverageRangeRecords, in sorted numerical start order */
DEFINE_ARRAY_TYPE
(
CoverageRangeRecord
,
rangeRecord
,
rangeCount
);
...
...
@@ -628,7 +649,7 @@ ASSERT_SIZE (CoverageFormat2, 4);
struct
Coverage
{
DEFINE_NON_INSTANTIABLE
(
Coverage
);
inline
unsigned
int
get_size
(
void
)
const
{
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
...
...
@@ -637,7 +658,7 @@ struct Coverage {
}
/* Returns -1 if not covered. */
in
line
in
t
get_coverage
(
uint16_t
glyph_id
)
const
{
int
get_coverage
(
uint16_t
glyph_id
)
const
{
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_coverage
(
glyph_id
);
case
2
:
return
u
.
format2
.
get_coverage
(
glyph_id
);
...
...
@@ -659,6 +680,10 @@ DEFINE_NULL (Coverage, 2);
*/
struct
ClassDefFormat1
{
friend
struct
ClassDef
;
private:
/* GlyphIDs, in sorted numerical order */
DEFINE_ARRAY_TYPE
(
USHORT
,
classValueArray
,
glyphCount
);
...
...
@@ -678,6 +703,9 @@ ASSERT_SIZE (ClassDefFormat1, 6);
struct
ClassRangeRecord
{
friend
struct
ClassDefFormat2
;
private:
inline
int
get_class
(
uint16_t
glyph_id
)
const
{
if
(
glyph_id
>=
start
&&
glyph_id
<=
end
)
return
classValue
;
...
...
@@ -692,6 +720,10 @@ struct ClassRangeRecord {
DEFINE_NULL_ASSERT_SIZE_DATA
(
ClassRangeRecord
,
6
,
"
\001
"
);
struct
ClassDefFormat2
{
friend
struct
ClassDef
;
private:
/* ClassRangeRecords, in sorted numerical start order */
DEFINE_ARRAY_TYPE
(
ClassRangeRecord
,
rangeRecord
,
rangeCount
);
...
...
@@ -716,7 +748,7 @@ ASSERT_SIZE (ClassDefFormat2, 4);
struct
ClassDef
{
DEFINE_NON_INSTANTIABLE
(
ClassDef
);
inline
unsigned
int
get_size
(
void
)
const
{
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
classFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
...
...
@@ -725,7 +757,7 @@ struct ClassDef {
}
/* Returns 0 if not found. */
in
line
in
t
get_class
(
uint16_t
glyph_id
)
const
{
int
get_class
(
uint16_t
glyph_id
)
const
{
switch
(
u
.
classFormat
)
{
case
1
:
return
u
.
format1
.
get_class
(
glyph_id
);
case
2
:
return
u
.
format2
.
get_class
(
glyph_id
);
...
...
@@ -747,8 +779,9 @@ DEFINE_NULL (ClassDef, 2);
*/
struct
Device
{
DEFINE_NON_INSTANTIABLE
(
Device
);
inline
unsigned
int
get_size
(
void
)
const
{
unsigned
int
get_size
(
void
)
const
{
int
count
=
endSize
-
startSize
+
1
;
if
(
count
<
0
)
count
=
0
;
switch
(
deltaFormat
)
{
...
...
@@ -759,7 +792,7 @@ struct Device {
}
}
in
line
in
t
get_delta
(
int
ppem_size
)
const
{
int
get_delta
(
int
ppem_size
)
const
{
if
(
ppem_size
>=
startSize
&&
ppem_size
<=
endSize
&&
deltaFormat
>=
1
&&
deltaFormat
<=
3
)
{
int
s
=
ppem_size
-
startSize
;
...
...
src/hb-private.h
浏览文件 @
7586089c
...
...
@@ -41,6 +41,8 @@
#define HB_LIKELY G_LIKEYLY
#define HB_UNLIKELY G_UNLIKELY
#define HB_UNUSED(arg) ((arg) = (arg))
#include <assert.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录