Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c81efca1
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
c81efca1
编写于
12月 25, 2006
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use CamelCaseTags.
上级
808dbe28
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
15 deletion
+14
-15
src/hb-types-private.cc
src/hb-types-private.cc
+14
-15
未找到文件。
src/hb-types-private.cc
浏览文件 @
c81efca1
...
...
@@ -256,9 +256,9 @@ struct TTCHeader {
typedef
struct
OpenTypeFontFile
{
DEFINE_NOT_INSTANTIABLE
(
OpenTypeFontFile
);
static
const
hb_tag_t
truetype_t
ag
=
HB_TAG
(
0
,
1
,
0
,
0
);
static
const
hb_tag_t
cff_t
ag
=
HB_TAG
(
'O'
,
'T'
,
'T'
,
'O'
);
static
const
hb_tag_t
ttc_t
ag
=
HB_TAG
(
't'
,
't'
,
'c'
,
'f'
);
static
const
hb_tag_t
TrueTypeT
ag
=
HB_TAG
(
0
,
1
,
0
,
0
);
static
const
hb_tag_t
CFFT
ag
=
HB_TAG
(
'O'
,
'T'
,
'T'
,
'O'
);
static
const
hb_tag_t
TTCT
ag
=
HB_TAG
(
't'
,
't'
,
'c'
,
'f'
);
/* Factory: ::get(font_data)
* This is how you get a handle to one of these
...
...
@@ -274,22 +274,22 @@ typedef struct OpenTypeFontFile {
inline
unsigned
int
get_len
(
void
)
const
{
switch
(
tag
)
{
default:
return
0
;
case
truetype_tag
:
case
cff_t
ag
:
return
1
;
case
ttc_t
ag
:
return
((
const
TTCHeader
&
)
*
this
).
get_len
();
case
TrueTypeTag
:
case
CFFT
ag
:
return
1
;
case
TTCT
ag
:
return
((
const
TTCHeader
&
)
*
this
).
get_len
();
}
}
inline
const
OpenTypeFont
&
operator
[]
(
unsigned
int
i
)
const
{
assert
(
i
<
get_len
());
switch
(
tag
)
{
default:
case
truetype_tag
:
case
cff_t
ag
:
return
(
const
OffsetTable
&
)
*
this
;
case
ttc_t
ag
:
return
((
const
TTCHeader
&
)
*
this
)[
i
];
default:
case
TrueTypeTag
:
case
CFFT
ag
:
return
(
const
OffsetTable
&
)
*
this
;
case
TTCT
ag
:
return
((
const
TTCHeader
&
)
*
this
)[
i
];
}
}
inline
OpenTypeFont
&
operator
[]
(
unsigned
int
i
)
{
assert
(
i
<
get_len
());
switch
(
tag
)
{
default:
case
truetype_tag
:
case
cff_t
ag
:
return
(
OffsetTable
&
)
*
this
;
case
ttc_t
ag
:
return
((
TTCHeader
&
)
*
this
)[
i
];
default:
case
TrueTypeTag
:
case
CFFT
ag
:
return
(
OffsetTable
&
)
*
this
;
case
TTCT
ag
:
return
((
TTCHeader
&
)
*
this
)[
i
];
}
}
...
...
@@ -363,18 +363,17 @@ main (int argc, char **argv)
const
OpenTypeFontFile
&
ot
=
OpenTypeFontFile
::
get
(
font_data
);
switch
(
ot
.
tag
)
{
case
HB_TAG
(
0
,
1
,
0
,
0
)
:
case
OpenTypeFontFile
::
TrueTypeTag
:
printf
(
"OpenType font with TrueType outlines
\n
"
);
break
;
case
HB_TAG
(
'O'
,
'T'
,
'T'
,
'O'
)
:
case
OpenTypeFontFile
::
CFFTag
:
printf
(
"OpenType font with CFF (Type1) outlines
\n
"
);
break
;
case
HB_TAG
(
't'
,
't'
,
'c'
,
'f'
)
:
case
OpenTypeFontFile
::
TTCTag
:
printf
(
"TrueType Collection of OpenType fonts
\n
"
);
break
;
default:
fprintf
(
stderr
,
"Unknown font format
\n
"
);
exit
(
1
);
printf
(
"Unknown font format
\n
"
);
break
;
}
...
...
@@ -382,7 +381,7 @@ main (int argc, char **argv)
printf
(
"%d font(s) found in file
\n
"
,
num_fonts
);
for
(
int
n_font
=
0
;
n_font
<
num_fonts
;
n_font
++
)
{
const
OpenTypeFont
&
font
=
ot
[
n_font
];
printf
(
"Font %d of %d
\n
"
,
n_font
+
1
,
num_fonts
);
printf
(
"Font %d of %d
:
\n
"
,
n_font
+
1
,
num_fonts
);
int
num_tables
=
font
.
get_len
();
printf
(
"%d table(s) found in font
\n
"
,
num_tables
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录