Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f78e70c3
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
f78e70c3
编写于
12月 21, 2006
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
First version.
上级
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
116 addition
and
0 deletion
+116
-0
src/hb-types-private.cc
src/hb-types-private.cc
+116
-0
未找到文件。
src/hb-types-private.cc
0 → 100644
浏览文件 @
f78e70c3
#include <stdint.h>
/*
*
* The OpenType Font File
*
*/
/*
* Data Types:
*/
/* "All OpenType fonts use Motorola-style byte ordering (Big Endian)"
* So we define the following hb_be_* types as structs/unions, to
* disallow accidental access to them as an integer. */
typedef
union
{
uint8_t
u8
;
uint8_t
v
;
}
hb_be_uint8_t
;
typedef
union
{
int8_t
i8
;
int8_t
v
;
}
hb_be_int8_t
;
typedef
union
{
uint8_t
u8x2
[
2
];
uint16_t
u16
;
uint16_t
v
;
}
hb_be_uint16_t
;
typedef
union
{
uint8_t
u8x2
[
2
];
int16_t
i16
;
int16_t
v
;
}
hb_be_int16_t
;
typedef
union
{
uint8_t
u8x4
[
4
];
uint16_t
u16x2
[
2
];
uint32_t
u32
;
uint32_t
v
;
inline
operator
int
()
{
return
(
u8x4
[
0
]
<<
24
)
+
(
u8x4
[
1
]
<<
16
)
+
(
u8x4
[
2
]
<<
8
)
+
u8x4
[
3
];
}
}
hb_be_uint32_t
;
typedef
union
{
uint8_t
u8x4
[
4
];
uint16_t
u16x2
[
2
];
int32_t
i32
;
int32_t
v
;
}
hb_be_int32_t
;
typedef
union
{
uint8_t
u8x8
[
8
];
uint16_t
u16x4
[
4
];
uint32_t
u32x2
[
2
];
uint64_t
u64
;
uint64_t
v
;
}
hb_be_uint64_t
;
typedef
union
{
uint8_t
u8x8
[
8
];
uint16_t
u16x4
[
4
];
uint32_t
u32x2
[
2
];
int64_t
i64
;
int64_t
v
;
}
hb_be_int64_t
;
/* "The following data types are used in the OpenType font file." */
typedef
hb_be_uint8_t
HB_BYTE
;
/* 8-bit unsigned integer. */
typedef
hb_be_int8_t
HB_CHAR
;
/* 8-bit signed integer. */
typedef
hb_be_uint16_t
HB_USHORT
;
/* 16-bit unsigned integer. */
typedef
hb_be_int16_t
HB_SHORT
;
/* 16-bit signed integer. */
typedef
hb_be_uint32_t
HB_ULONG
;
/* 32-bit unsigned integer. */
typedef
hb_be_int32_t
HB_LONG
;
/* 32-bit signed integer. */
typedef
hb_be_int32_t
HB_Fixed
;
/* 32-bit signed fixed-point number
* (16.16) */
typedef
struct
_FUNIT
HB_FUNIT
;
/* Smallest measurable distance
* in the em space. */
typedef
HB_SHORT
HB_FWORD
;
/* 16-bit signed integer (SHORT) that
* describes a quantity in FUnits. */
typedef
HB_USHORT
HB_UFWORD
;
/* 16-bit unsigned integer (USHORT)
* that describes a quantity in
* FUnits. */
typedef
hb_be_int16_t
HB_F2DOT14
;
/* 16-bit signed fixed number with the
* low 14 bits of fraction (2.14). */
typedef
hb_be_int64_t
HB_LONGDATETIME
;
/* Date represented in number of
* seconds since 12:00 midnight,
* January 1, 1904. The value is
* represented as a signed 64-bit
* integer. */
typedef
hb_be_uint32_t
HB_Tag
;
/* Array of four uint8s (length = 32
* bits) used to identify a script,
* language system, feature, or
* baseline */
typedef
hb_be_uint16_t
HB_GlyphID
;
/* Glyph index number, same as
* uint16(length = 16 bits) */
typedef
hb_be_uint16_t
HB_Offset
;
/* Offset to a table, same as uint16
* (length = 16 bits), NULL offset =
* 0x0000 */
#include <stdio.h>
int
main
(
void
)
{
HB_Tag
x
=
{{
'a'
,
'b'
,
'c'
,
'd'
}};
HB_ULONG
y
=
x
;
printf
(
"%d
\n
"
,
x
+
0
);
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录