Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
13346617
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,发现更多精彩内容 >>
提交
13346617
编写于
12月 27, 2006
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
s/OpenTypeFont/OpenTypeFontFace/g
上级
71d62baa
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
21 deletion
+23
-21
src/harfbuzz-ng.cc
src/harfbuzz-ng.cc
+23
-21
未找到文件。
src/harfbuzz-ng.cc
浏览文件 @
13346617
...
...
@@ -207,7 +207,7 @@ struct Fixed_Version : Fixed {
* Organization of an OpenType Font
*/
struct
OpenTypeFontFile
;
struct
OpenTypeFontF
aceF
ile
;
struct
OffsetTable
;
struct
TTCHeader
;
...
...
@@ -230,14 +230,14 @@ typedef struct OffsetTable {
USHORT
entrySelector
;
/* Log2(maximum power of 2 <= numTables). */
USHORT
rangeShift
;
/* NumTables x 16-searchRange. */
TableDirectory
tableDir
[];
/* TableDirectory entries. numTables items */
}
OpenTypeFont
;
}
OpenTypeFont
Face
;
/*
* TrueType Collections
*/
struct
TTCHeader
{
/* OpenTypeFonts, in no particular order */
/* OpenTypeFont
Face
s, in no particular order */
DEFINE_OFFSET_ARRAY_TYPE
(
OffsetTable
,
offsetTable
,
numFonts
);
Tag
ttcTag
;
/* TrueType Collection ID string: 'ttcf' */
...
...
@@ -253,8 +253,8 @@ struct TTCHeader {
* OpenType Font File
*/
struct
OpenTypeFontFile
{
DEFINE_NON_INSTANTIABLE
(
OpenTypeFontFile
);
struct
OpenTypeFontF
aceF
ile
{
DEFINE_NON_INSTANTIABLE
(
OpenTypeFontF
aceF
ile
);
static
const
hb_tag_t
TrueTypeTag
=
HB_TAG
(
0
,
1
,
0
,
0
);
static
const
hb_tag_t
CFFTag
=
HB_TAG
(
'O'
,
'T'
,
'T'
,
'O'
);
static
const
hb_tag_t
TTCTag
=
HB_TAG
(
't'
,
't'
,
'c'
,
'f'
);
...
...
@@ -262,11 +262,11 @@ struct OpenTypeFontFile {
/* Factory: ::get(font_data)
* This is how you get a handle to one of these
*/
static
inline
const
OpenTypeFontFile
&
get
(
const
char
*
font_data
)
{
return
(
const
OpenTypeFontFile
&
)
*
font_data
;
static
inline
const
OpenTypeFontF
aceF
ile
&
get
(
const
char
*
font_data
)
{
return
(
const
OpenTypeFontF
aceF
ile
&
)
*
font_data
;
}
static
inline
OpenTypeFontFile
&
get
(
char
*
font_data
)
{
return
(
OpenTypeFontFile
&
)
*
font_data
;
static
inline
OpenTypeFontF
aceF
ile
&
get
(
char
*
font_data
)
{
return
(
OpenTypeFontF
aceF
ile
&
)
*
font_data
;
}
/* This is how you get a table */
...
...
@@ -291,14 +291,14 @@ struct OpenTypeFontFile {
case
TTCTag
:
return
((
const
TTCHeader
&
)
*
this
).
get_len
();
}
}
inline
const
OpenTypeFont
&
operator
[]
(
unsigned
int
i
)
const
{
inline
const
OpenTypeFont
Face
&
operator
[]
(
unsigned
int
i
)
const
{
assert
(
i
<
get_len
());
switch
(
tag
)
{
default:
case
TrueTypeTag
:
case
CFFTag
:
return
(
const
OffsetTable
&
)
*
this
;
case
TTCTag
:
return
((
const
TTCHeader
&
)
*
this
)[
i
];
}
}
inline
OpenTypeFont
&
operator
[]
(
unsigned
int
i
)
{
inline
OpenTypeFont
Face
&
operator
[]
(
unsigned
int
i
)
{
assert
(
i
<
get_len
());
switch
(
tag
)
{
default:
case
TrueTypeTag
:
case
CFFTag
:
return
(
OffsetTable
&
)
*
this
;
...
...
@@ -318,7 +318,7 @@ struct OpenTypeFontFile {
*/
/*
* Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
, SubTable
* Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
*/
struct
Script
;
...
...
@@ -328,7 +328,6 @@ struct Feature;
struct
FeatureList
;
struct
Lookup
;
struct
LookupList
;
struct
SubTable
;
typedef
struct
Record
{
Tag
tag
;
/* 4-byte Tag identifier */
...
...
@@ -440,7 +439,7 @@ struct LookupFlag : USHORT {
struct
Lookup
{
/* SubTables, in the desired order */
DEFINE_OFFSET_ARRAY_TYPE
(
SubTable
,
subTableOffset
,
subTableCount
);
DEFINE_OFFSET_ARRAY_TYPE
(
char
*
,
subTableOffset
,
subTableCount
);
inline
bool
is_right_to_left
(
void
)
const
{
return
lookupFlag
&
LookupFlag
::
RightToLeft
;
}
inline
bool
ignore_base_glyphs
(
void
)
const
{
return
lookupFlag
&
LookupFlag
::
IgnoreBaseGlyphs
;
}
...
...
@@ -716,16 +715,16 @@ main (int argc, char **argv)
printf
(
"Opened font file %s: %d bytes long
\n
"
,
argv
[
1
],
len
);
const
OpenTypeFontF
ile
&
ot
=
OpenTypeFont
File
::
get
(
font_data
);
const
OpenTypeFontF
aceFile
&
ot
=
OpenTypeFontFace
File
::
get
(
font_data
);
switch
(
ot
.
tag
)
{
case
OpenTypeFontFile
::
TrueTypeTag
:
case
OpenTypeFontF
aceF
ile
::
TrueTypeTag
:
printf
(
"OpenType font with TrueType outlines
\n
"
);
break
;
case
OpenTypeFontFile
::
CFFTag
:
case
OpenTypeFontF
aceF
ile
::
CFFTag
:
printf
(
"OpenType font with CFF (Type1) outlines
\n
"
);
break
;
case
OpenTypeFontFile
::
TTCTag
:
case
OpenTypeFontF
aceF
ile
::
TTCTag
:
printf
(
"TrueType Collection of OpenType fonts
\n
"
);
break
;
default:
...
...
@@ -736,7 +735,7 @@ main (int argc, char **argv)
int
num_fonts
=
ot
.
get_len
();
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
];
const
OpenTypeFont
Face
&
font
=
ot
[
n_font
];
printf
(
"Font %d of %d:
\n
"
,
n_font
+
1
,
num_fonts
);
int
num_tables
=
font
.
get_len
();
...
...
@@ -763,8 +762,11 @@ main (int argc, char **argv)
printf
(
" %d language system(s) found in script
\n
"
,
num_langsys
);
for
(
int
n_langsys
=
0
;
n_langsys
<
num_langsys
;
n_langsys
++
)
{
const
LangSys
&
langsys
=
script
[
n_langsys
];
printf
(
" Language System %2d of %2d: %.4s
\n
"
,
n_langsys
+
1
,
num_langsys
,
(
const
char
*
)
script
.
get_tag
(
n_langsys
));
printf
(
" Language System %2d of %2d: %.4s; %d features
\n
"
,
n_langsys
+
1
,
num_langsys
,
(
const
char
*
)
script
.
get_tag
(
n_langsys
),
langsys
.
get_len
());
if
(
!
langsys
.
get_required_feature_index
())
printf
(
" No required feature
\n
"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录