Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
2e96d2c6
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看板
提交
2e96d2c6
编写于
10月 17, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[otlayout] More shuffling
上级
46952469
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
130 addition
and
122 deletion
+130
-122
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+130
-122
未找到文件。
src/hb-ot-layout-private.hh
浏览文件 @
2e96d2c6
...
...
@@ -48,6 +48,131 @@
#define syllable() var1.u8[3]
/* GSUB/GPOS shaping boundaries */
/*
* GDEF
*/
typedef
enum
{
/* One bit available here... = 0x01u */
/* The following three match LookupFlags::Ignore* numbers. */
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
=
0x02u
,
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
=
0x04u
,
HB_OT_LAYOUT_GLYPH_PROPS_MARK
=
0x08u
}
hb_ot_layout_glyph_class_mask_t
;
/*
* GSUB/GPOS
*/
HB_INTERNAL
hb_bool_t
hb_ot_layout_lookup_would_substitute_fast
(
hb_face_t
*
face
,
unsigned
int
lookup_index
,
const
hb_codepoint_t
*
glyphs
,
unsigned
int
glyphs_length
,
hb_bool_t
zero_context
);
/* Should be called before all the substitute_lookup's are done. */
HB_INTERNAL
void
hb_ot_layout_substitute_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
struct
hb_ot_layout_lookup_accelerator_t
;
namespace
OT
{
struct
hb_apply_context_t
;
struct
SubstLookup
;
}
HB_INTERNAL
void
hb_ot_layout_substitute_lookup
(
OT
::
hb_apply_context_t
*
c
,
const
OT
::
SubstLookup
&
lookup
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
);
/* Should be called after all the substitute_lookup's are done */
HB_INTERNAL
void
hb_ot_layout_substitute_finish
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called before all the position_lookup's are done. Resets positions to zero. */
HB_INTERNAL
void
hb_ot_layout_position_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called after all the position_lookup's are done */
HB_INTERNAL
void
hb_ot_layout_position_finish
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/*
* hb_ot_layout_t
*/
namespace
OT
{
struct
GDEF
;
struct
GSUB
;
struct
GPOS
;
}
struct
hb_ot_layout_lookup_accelerator_t
{
template
<
typename
TLookup
>
inline
void
init
(
const
TLookup
&
lookup
)
{
digest
.
init
();
lookup
.
add_coverage
(
&
digest
);
}
template
<
typename
TLookup
>
inline
void
fini
(
const
TLookup
&
lookup
)
{
}
hb_set_digest_t
digest
;
};
struct
hb_ot_layout_t
{
hb_blob_t
*
gdef_blob
;
hb_blob_t
*
gsub_blob
;
hb_blob_t
*
gpos_blob
;
const
struct
OT
::
GDEF
*
gdef
;
const
struct
OT
::
GSUB
*
gsub
;
const
struct
OT
::
GPOS
*
gpos
;
unsigned
int
gsub_lookup_count
;
unsigned
int
gpos_lookup_count
;
hb_ot_layout_lookup_accelerator_t
*
gsub_accels
;
hb_ot_layout_lookup_accelerator_t
*
gpos_accels
;
};
HB_INTERNAL
hb_ot_layout_t
*
_hb_ot_layout_create
(
hb_face_t
*
face
);
HB_INTERNAL
void
_hb_ot_layout_destroy
(
hb_ot_layout_t
*
layout
);
#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
/*
* Buffer var routines.
*/
/* unicode_props */
enum
{
MASK0_ZWJ
=
0x20u
,
MASK0_ZWNJ
=
0x40u
,
...
...
@@ -113,27 +238,7 @@ _hb_glyph_info_flip_joiners (hb_glyph_info_t *info)
info
->
unicode_props0
()
^=
MASK0_ZWNJ
|
MASK0_ZWJ
;
}
/*
* GDEF
*/
typedef
enum
{
/* One bit available here... = 0x01u */
/* The following three match LookupFlags::Ignore* numbers. */
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
=
0x02u
,
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
=
0x04u
,
HB_OT_LAYOUT_GLYPH_PROPS_MARK
=
0x08u
}
hb_ot_layout_glyph_class_mask_t
;
/*
* GSUB/GPOS
*/
/* lig_id / lig_comp
/* lig_props: aka lig_id / lig_comp
*
* When a ligature is formed:
*
...
...
@@ -143,7 +248,9 @@ typedef enum {
* - The marks get lig_comp > 0, reflecting which component of the ligature
* they were applied to.
* - This is used in GPOS to attach marks to the right component of a ligature
* in MarkLigPos.
* in MarkLigPos,
* - Note that when marks are ligated together, much of the above is skipped
* and the current lig_id reused.
*
* When a multiple-substitution is done:
*
...
...
@@ -153,7 +260,7 @@ typedef enum {
* multiple substitution in MarkBasePos.
*
* The numbers are also used in GPOS to do mark-to-mark positioning only
* to marks that belong to the same component of
a ligature in MarkMarPos
.
* to marks that belong to the same component of
the same ligature
.
*/
#define IS_LIG_BASE 0x10
static
inline
void
...
...
@@ -207,104 +314,5 @@ static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
}
HB_INTERNAL
hb_bool_t
hb_ot_layout_lookup_would_substitute_fast
(
hb_face_t
*
face
,
unsigned
int
lookup_index
,
const
hb_codepoint_t
*
glyphs
,
unsigned
int
glyphs_length
,
hb_bool_t
zero_context
);
/* Should be called before all the substitute_lookup's are done. */
HB_INTERNAL
void
hb_ot_layout_substitute_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
struct
hb_ot_layout_lookup_accelerator_t
;
namespace
OT
{
struct
hb_apply_context_t
;
struct
SubstLookup
;
}
HB_INTERNAL
void
hb_ot_layout_substitute_lookup
(
OT
::
hb_apply_context_t
*
c
,
const
OT
::
SubstLookup
&
lookup
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
);
/* Should be called after all the substitute_lookup's are done */
HB_INTERNAL
void
hb_ot_layout_substitute_finish
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called before all the position_lookup's are done. Resets positions to zero. */
HB_INTERNAL
void
hb_ot_layout_position_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/* Should be called after all the position_lookup's are done */
HB_INTERNAL
void
hb_ot_layout_position_finish
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
/*
* hb_ot_layout_t
*/
namespace
OT
{
struct
GDEF
;
struct
GSUB
;
struct
GPOS
;
}
struct
hb_ot_layout_lookup_accelerator_t
{
template
<
typename
TLookup
>
inline
void
init
(
const
TLookup
&
lookup
)
{
digest
.
init
();
lookup
.
add_coverage
(
&
digest
);
}
template
<
typename
TLookup
>
inline
void
fini
(
const
TLookup
&
lookup
)
{
}
hb_set_digest_t
digest
;
};
struct
hb_ot_layout_t
{
hb_blob_t
*
gdef_blob
;
hb_blob_t
*
gsub_blob
;
hb_blob_t
*
gpos_blob
;
const
struct
OT
::
GDEF
*
gdef
;
const
struct
OT
::
GSUB
*
gsub
;
const
struct
OT
::
GPOS
*
gpos
;
unsigned
int
gsub_lookup_count
;
unsigned
int
gpos_lookup_count
;
hb_ot_layout_lookup_accelerator_t
*
gsub_accels
;
hb_ot_layout_lookup_accelerator_t
*
gpos_accels
;
};
HB_INTERNAL
hb_ot_layout_t
*
_hb_ot_layout_create
(
hb_face_t
*
face
);
HB_INTERNAL
void
_hb_ot_layout_destroy
(
hb_ot_layout_t
*
layout
);
#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
#endif
/* HB_OT_LAYOUT_PRIVATE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录