Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f45107fe
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f45107fe
编写于
5月 17, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] More shuffling
上级
f8dc67b3
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
71 addition
and
71 deletion
+71
-71
src/hb-ot-layout-gsub-private.h
src/hb-ot-layout-gsub-private.h
+41
-30
src/hb-ot-layout-gsubgpos-private.h
src/hb-ot-layout-gsubgpos-private.h
+30
-0
src/hb-ot-layout-open-private.h
src/hb-ot-layout-open-private.h
+0
-41
未找到文件。
src/hb-ot-layout-gsub-private.h
浏览文件 @
f45107fe
...
@@ -29,6 +29,16 @@
...
@@ -29,6 +29,16 @@
#include "hb-ot-layout-gsubgpos-private.h"
#include "hb-ot-layout-gsubgpos-private.h"
/* XXX */
#include "harfbuzz-impl.h"
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph_ids
(
HB_Buffer
buffer
,
HB_UShort
num_in
,
HB_UShort
num_out
,
const
GlyphID
*
glyph_data
,
HB_UShort
component
,
HB_UShort
ligID
);
struct
SingleSubstFormat1
{
struct
SingleSubstFormat1
{
friend
struct
SingleSubst
;
friend
struct
SingleSubst
;
...
@@ -47,7 +57,7 @@ struct SingleSubstFormat1 {
...
@@ -47,7 +57,7 @@ struct SingleSubstFormat1 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
...
@@ -74,7 +84,7 @@ struct SingleSubstFormat2 {
...
@@ -74,7 +84,7 @@ struct SingleSubstFormat2 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 2 */
USHORT
format
;
/* Format identifier--format = 2 */
OffsetTo
<
Coverage
>
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
...
@@ -180,7 +190,7 @@ struct MultipleSubstFormat1 {
...
@@ -180,7 +190,7 @@ struct MultipleSubstFormat1 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
...
@@ -258,7 +268,7 @@ struct AlternateSubstFormat1 {
...
@@ -258,7 +268,7 @@ struct AlternateSubstFormat1 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
...
@@ -415,7 +425,7 @@ struct LigatureSubstFormat1 {
...
@@ -415,7 +425,7 @@ struct LigatureSubstFormat1 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
...
@@ -504,7 +514,7 @@ struct ChainContextSubstFormat1 {
...
@@ -504,7 +514,7 @@ struct ChainContextSubstFormat1 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
Offset
coverage
;
/* Offset to Coverage table--from
Offset
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
USHORT
chainSubRuleSetCount
;
/* Number of ChainSubRuleSet
USHORT
chainSubRuleSetCount
;
/* Number of ChainSubRuleSet
...
@@ -564,7 +574,7 @@ struct ChainContextSubstFormat2 {
...
@@ -564,7 +574,7 @@ struct ChainContextSubstFormat2 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 2 */
USHORT
format
;
/* Format identifier--format = 2 */
Offset
coverage
;
/* Offset to Coverage table--from
Offset
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
* beginning of Substitution table */
Offset
backtrackClassDef
;
/* Offset to glyph ClassDef table
Offset
backtrackClassDef
;
/* Offset to glyph ClassDef table
...
@@ -594,7 +604,7 @@ struct ChainContextSubstFormat3 {
...
@@ -594,7 +604,7 @@ struct ChainContextSubstFormat3 {
}
}
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 3 */
USHORT
format
;
/* Format identifier--format = 3 */
USHORT
backtrackGlyphCount
;
/* Number of glyphs in the backtracking
USHORT
backtrackGlyphCount
;
/* Number of glyphs in the backtracking
* sequence */
* sequence */
Offset
backtrackCoverage
[];
/* Array of offsets to coverage tables
Offset
backtrackCoverage
[];
/* Array of offsets to coverage tables
...
@@ -651,7 +661,7 @@ struct ExtensionSubstFormat1 {
...
@@ -651,7 +661,7 @@ struct ExtensionSubstFormat1 {
inline
bool
substitute
(
LOOKUP_ARGS_DEF
)
const
;
inline
bool
substitute
(
LOOKUP_ARGS_DEF
)
const
;
private:
private:
USHORT
substFormat
;
/* Format identifier. Set to 1. */
USHORT
format
;
/* Format identifier. Set to 1. */
USHORT
extensionLookupType
;
/* Lookup type of subtable referenced
USHORT
extensionLookupType
;
/* Lookup type of subtable referenced
* by ExtensionOffset (i.e. the
* by ExtensionOffset (i.e. the
* extension subtable). */
* extension subtable). */
...
@@ -697,7 +707,7 @@ struct ReverseChainSingleSubstFormat1 {
...
@@ -697,7 +707,7 @@ struct ReverseChainSingleSubstFormat1 {
/* TODO */
/* TODO */
private:
private:
USHORT
substFormat
;
/* Format identifier--format = 1 */
USHORT
format
;
/* Format identifier--format = 1 */
Offset
coverage
;
/* Offset to Coverage table -- from
Offset
coverage
;
/* Offset to Coverage table -- from
* beginning of Substitution table */
* beginning of Substitution table */
USHORT
backtrackGlyphCount
;
/* Number of glyphs in the backtracking
USHORT
backtrackGlyphCount
;
/* Number of glyphs in the backtracking
...
@@ -740,17 +750,17 @@ struct SubstLookupSubTable {
...
@@ -740,17 +750,17 @@ struct SubstLookupSubTable {
unsigned
int
lookup_type
)
const
{
unsigned
int
lookup_type
)
const
{
switch
(
lookup_type
)
{
switch
(
lookup_type
)
{
case
GSUB_Single
:
return
u
.
single
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Single
:
return
u
.
single
->
substitute
(
LOOKUP_ARGS
);
case
GSUB_Multiple
:
return
u
.
multiple
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Multiple
:
return
u
.
multiple
->
substitute
(
LOOKUP_ARGS
);
case
GSUB_Alternate
:
return
u
.
alternate
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Alternate
:
return
u
.
alternate
->
substitute
(
LOOKUP_ARGS
);
case
GSUB_Ligature
:
return
u
.
ligature
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Ligature
:
return
u
.
ligature
->
substitute
(
LOOKUP_ARGS
);
case
GSUB_Context
:
return
u
.
context
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Context
:
return
u
.
context
->
substitute
(
LOOKUP_ARGS
);
/*
/*
case GSUB_ChainingContext: return u.chainingContext
.
substitute (LOOKUP_ARGS);
case GSUB_ChainingContext: return u.chainingContext
->
substitute (LOOKUP_ARGS);
*/
*/
case
GSUB_Extension
:
return
u
.
extension
.
substitute
(
LOOKUP_ARGS
);
case
GSUB_Extension
:
return
u
.
extension
->
substitute
(
LOOKUP_ARGS
);
/*
/*
case GSUB_ReverseChainingContextSingle: return u.reverseChainingContextSingle
.
substitute (LOOKUP_ARGS);
case GSUB_ReverseChainingContextSingle: return u.reverseChainingContextSingle
->
substitute (LOOKUP_ARGS);
*/
*/
default:
return
false
;
default:
return
false
;
}
}
...
@@ -758,21 +768,22 @@ struct SubstLookupSubTable {
...
@@ -758,21 +768,22 @@ struct SubstLookupSubTable {
private:
private:
union
{
union
{
USHORT
substF
ormat
;
USHORT
f
ormat
;
SingleSubst
single
;
SingleSubst
single
[]
;
MultipleSubst
multiple
;
MultipleSubst
multiple
[]
;
AlternateSubst
alternate
;
AlternateSubst
alternate
[]
;
LigatureSubst
ligature
;
LigatureSubst
ligature
[]
;
ContextSubst
context
;
ContextSubst
context
[]
;
/*
/*
ChainingContextSubst chainingContext;
ChainingContextSubst chainingContext
[]
;
*/
*/
ExtensionSubst
extension
;
ExtensionSubst
extension
[]
;
/*
/*
ReverseChainingContextSingleSubst reverseChainingContextSingle;
ReverseChainingContextSingleSubst reverseChainingContextSingle
[]
;
*/
*/
}
u
;
}
u
;
};
};
ASSERT_SIZE
(
SubstLookupSubTable
,
2
);
struct
SubstLookup
:
Lookup
{
struct
SubstLookup
:
Lookup
{
...
@@ -790,7 +801,7 @@ struct SubstLookup : Lookup {
...
@@ -790,7 +801,7 @@ struct SubstLookup : Lookup {
/* Return lookup type of first extension subtable.
/* Return lookup type of first extension subtable.
* The spec says all of them should have the same type.
* The spec says all of them should have the same type.
* XXX check for that somehow */
* XXX check for that somehow */
type
=
get_subtable
(
0
).
u
.
extension
.
get_type
();
type
=
get_subtable
(
0
).
u
.
extension
->
get_type
();
}
}
return
type
;
return
type
;
...
@@ -875,6 +886,7 @@ struct SubstLookup : Lookup {
...
@@ -875,6 +886,7 @@ struct SubstLookup : Lookup {
return
ret
;
return
ret
;
}
}
};
};
ASSERT_SIZE
(
SubstLookup
,
6
);
/*
/*
...
@@ -899,8 +911,7 @@ struct GSUB : GSUBGPOS {
...
@@ -899,8 +911,7 @@ struct GSUB : GSUBGPOS {
}
}
};
};
ASSERT_SIZE
(
GSUB
,
10
);
/* Out-of-class implementation for methods chaining */
/* Out-of-class implementation for methods chaining */
...
...
src/hb-ot-layout-gsubgpos-private.h
浏览文件 @
f45107fe
...
@@ -332,5 +332,35 @@ struct Context {
...
@@ -332,5 +332,35 @@ struct Context {
};
};
ASSERT_SIZE
(
Context
,
2
);
ASSERT_SIZE
(
Context
,
2
);
/*
* GSUB/GPOS Common
*/
struct
GSUBGPOS
{
static
const
hb_tag_t
GSUBTag
=
HB_TAG
(
'G'
,
'S'
,
'U'
,
'B'
);
static
const
hb_tag_t
GPOSTag
=
HB_TAG
(
'G'
,
'P'
,
'O'
,
'S'
);
STATIC_DEFINE_GET_FOR_DATA
(
GSUBGPOS
);
/* XXX check version here? */
DEFINE_TAG_LIST_INTERFACE
(
Script
,
script
);
/* get_script_count (), get_script (i), get_script_tag (i) */
DEFINE_TAG_LIST_INTERFACE
(
Feature
,
feature
);
/* get_feature_count(), get_feature(i), get_feature_tag(i) */
DEFINE_LIST_INTERFACE
(
Lookup
,
lookup
);
/* get_lookup_count (), get_lookup (i) */
// LONGTERMTODO bsearch
DEFINE_TAG_FIND_INTERFACE
(
Script
,
script
);
/* find_script_index (), get_script_by_tag (tag) */
DEFINE_TAG_FIND_INTERFACE
(
Feature
,
feature
);
/* find_feature_index(), get_feature_by_tag(tag) */
private:
Fixed_Version
version
;
/* Version of the GSUB/GPOS table--initially set
* to 0x00010000 */
OffsetTo
<
ScriptList
>
scriptList
;
/* ScriptList table */
OffsetTo
<
FeatureList
>
featureList
;
/* FeatureList table */
OffsetTo
<
LookupList
>
lookupList
;
/* LookupList table */
};
ASSERT_SIZE
(
GSUBGPOS
,
10
);
#endif
/* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_H */
#endif
/* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_H */
src/hb-ot-layout-open-private.h
浏览文件 @
f45107fe
...
@@ -908,45 +908,4 @@ struct Device {
...
@@ -908,45 +908,4 @@ struct Device {
};
};
ASSERT_SIZE
(
Device
,
6
);
ASSERT_SIZE
(
Device
,
6
);
/*
* GSUB/GPOS Common
*/
struct
GSUBGPOS
{
static
const
hb_tag_t
GSUBTag
=
HB_TAG
(
'G'
,
'S'
,
'U'
,
'B'
);
static
const
hb_tag_t
GPOSTag
=
HB_TAG
(
'G'
,
'P'
,
'O'
,
'S'
);
STATIC_DEFINE_GET_FOR_DATA
(
GSUBGPOS
);
/* XXX check version here? */
DEFINE_TAG_LIST_INTERFACE
(
Script
,
script
);
/* get_script_count (), get_script (i), get_script_tag (i) */
DEFINE_TAG_LIST_INTERFACE
(
Feature
,
feature
);
/* get_feature_count(), get_feature(i), get_feature_tag(i) */
DEFINE_LIST_INTERFACE
(
Lookup
,
lookup
);
/* get_lookup_count (), get_lookup (i) */
// LONGTERMTODO bsearch
DEFINE_TAG_FIND_INTERFACE
(
Script
,
script
);
/* find_script_index (), get_script_by_tag (tag) */
DEFINE_TAG_FIND_INTERFACE
(
Feature
,
feature
);
/* find_feature_index(), get_feature_by_tag(tag) */
private:
Fixed_Version
version
;
/* Version of the GSUB/GPOS table--initially set
* to 0x00010000 */
OffsetTo
<
ScriptList
>
scriptList
;
/* ScriptList table */
OffsetTo
<
FeatureList
>
featureList
;
/* FeatureList table */
OffsetTo
<
LookupList
>
lookupList
;
/* LookupList table */
};
ASSERT_SIZE
(
GSUBGPOS
,
10
);
/* XXX */
#include "harfbuzz-impl.h"
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph_ids
(
HB_Buffer
buffer
,
HB_UShort
num_in
,
HB_UShort
num_out
,
const
GlyphID
*
glyph_data
,
HB_UShort
component
,
HB_UShort
ligID
);
#endif
/* HB_OT_LAYOUT_OPEN_PRIVATE_H */
#endif
/* HB_OT_LAYOUT_OPEN_PRIVATE_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录