Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5b2e947f
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,发现更多精彩内容 >>
提交
5b2e947f
编写于
7月 06, 2007
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[open] small fixes, including not using unions for main structs
上级
151df443
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
25 deletion
+29
-25
src/harfbuzz-open-private.h
src/harfbuzz-open-private.h
+29
-25
未找到文件。
src/harfbuzz-open-private.h
浏览文件 @
5b2e947f
...
...
@@ -236,7 +236,7 @@ struct TTCHeader {
Tag
ttcTag
;
/* TrueType Collection ID string: 'ttcf' */
ULONG
version
;
/* Version of the TTC Header (1.0 or 2.0),
* 0x00010000 or 0x00020000 */
* 0x00010000 or 0x00020000 */
ULONG
numFonts
;
/* Number of fonts in TTC */
ULONG
offsetTable
[];
/* Array of offsets to the OffsetTable for each font
* from the beginning of the file */
...
...
@@ -506,29 +506,31 @@ struct CoverageFormat2 {
* long */
};
union
Coverage
{
struct
Coverage
{
DEFINE_NON_INSTANTIABLE
(
Coverage
);
inline
unsigned
int
get_size
(
void
)
const
{
switch
(
coverageFormat
)
{
case
1
:
return
format1
.
get_size
();
case
2
:
return
format2
.
get_size
();
default:
return
sizeof
(
coverageFormat
);
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
default:
return
sizeof
(
u
.
coverageFormat
);
}
}
/* Returns -1 if not covered. */
inline
int
get_coverage
(
uint16_t
glyph_id
)
const
{
switch
(
coverageFormat
)
{
case
1
:
return
format1
.
get_coverage
(
glyph_id
);
case
2
:
return
format2
.
get_coverage
(
glyph_id
);
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_coverage
(
glyph_id
);
case
2
:
return
u
.
format2
.
get_coverage
(
glyph_id
);
default:
return
-
1
;
}
}
union
{
USHORT
coverageFormat
;
/* Format identifier */
CoverageFormat1
format1
;
CoverageFormat2
format2
;
}
u
;
};
/*
...
...
@@ -589,25 +591,27 @@ struct ClassDef {
DEFINE_NON_INSTANTIABLE
(
ClassDef
);
inline
unsigned
int
get_size
(
void
)
const
{
switch
(
classFormat
)
{
case
1
:
return
format1
.
get_size
();
case
2
:
return
format2
.
get_size
();
default:
return
sizeof
(
classFormat
);
switch
(
u
.
classFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
default:
return
sizeof
(
u
.
classFormat
);
}
}
/* Returns 0 if not found. */
inline
int
get_class
(
uint16_t
glyph_id
)
const
{
switch
(
classFormat
)
{
case
1
:
format1
.
get_class
(
glyph_id
);
case
2
:
format2
.
get_class
(
glyph_id
);
switch
(
u
.
classFormat
)
{
case
1
:
u
.
format1
.
get_class
(
glyph_id
);
case
2
:
u
.
format2
.
get_class
(
glyph_id
);
default:
return
0
;
}
}
union
{
USHORT
classFormat
;
/* Format identifier */
ClassDefFormat1
format1
;
ClassDefFormat2
format2
;
}
u
;
};
/*
...
...
@@ -627,7 +631,7 @@ struct Device {
}
}
inline
int
get_delta
(
int
ppem_size
)
{
inline
int
get_delta
(
int
ppem_size
)
const
{
if
(
ppem_size
>=
startSize
&&
ppem_size
<=
endSize
&&
deltaFormat
>=
1
&&
deltaFormat
<=
3
)
{
int
s
=
ppem_size
-
startSize
;
...
...
@@ -673,14 +677,14 @@ struct GSUBGPOSHeader {
DEFINE_LIST_ACCESSOR
(
Feature
,
feature
);
/* get_feature_list and feature(i) */
DEFINE_LIST_ACCESSOR
(
Lookup
,
lookup
);
/* get_lookup_list and lookup(i) */
Fixed_Version
version
;
/* Version of the GSUB
table-initially set to
* 0x00010000 */
Offset
scriptList
;
/* Offset to ScriptList table-from beginning of
* GSUB table */
Offset
featureList
;
/* Offset to FeatureList table-from beginning of
* GSUB table */
Offset
lookupList
;
/* Offset to LookupList table-from beginning of
* GSUB table */
Fixed_Version
version
;
/* Version of the GSUB
/GPOS table--initially set
*
to
0x00010000 */
Offset
scriptList
;
/* Offset to ScriptList table-
-
from beginning of
* GSUB
/GPOS
table */
Offset
featureList
;
/* Offset to FeatureList table-
-
from beginning of
* GSUB
/GPOS
table */
Offset
lookupList
;
/* Offset to LookupList table-
-
from beginning of
* GSUB
/GPOS
table */
};
#endif
/* HARFBUZZ_OPEN_PRIVATE_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录