Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f1322e52
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看板
提交
f1322e52
编写于
8月 01, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Cleanup public buffer structs
上级
6d5bb18e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
97 addition
and
66 deletion
+97
-66
src/hb-buffer-private.h
src/hb-buffer-private.h
+38
-8
src/hb-buffer.c
src/hb-buffer.c
+25
-24
src/hb-buffer.h
src/hb-buffer.h
+17
-18
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+4
-4
src/hb-ot-layout-private.h
src/hb-ot-layout-private.h
+3
-2
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+10
-10
未找到文件。
src/hb-buffer-private.h
浏览文件 @
f1322e52
...
@@ -36,6 +36,36 @@ HB_BEGIN_DECLS
...
@@ -36,6 +36,36 @@ HB_BEGIN_DECLS
#define HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
#define HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
typedef
struct
_hb_internal_glyph_info_t
{
hb_codepoint_t
codepoint
;
uint32_t
properties
;
uint32_t
cluster
;
uint16_t
component
;
uint16_t
lig_id
;
uint32_t
gproperty
;
}
hb_internal_glyph_info_t
;
typedef
struct
_hb_internal_glyph_position_t
{
hb_position_t
x_pos
;
hb_position_t
y_pos
;
hb_position_t
x_advance
;
hb_position_t
y_advance
;
hb_bool_t
new_advance
:
1
;
/* if set, the advance width values are
absolute, i.e., they won't be
added to the original glyph's value
but rather replace them */
unsigned
short
back
:
15
;
/* number of glyphs to go back
for drawing current glyph */
short
cursive_chain
:
16
;
/* character to which this connects,
may be positive or negative; used
only internally */
}
hb_internal_glyph_position_t
;
ASSERT_STATIC
(
sizeof
(
hb_glyph_info_t
)
==
sizeof
(
hb_internal_glyph_info_t
));
ASSERT_STATIC
(
sizeof
(
hb_glyph_position_t
)
==
sizeof
(
hb_internal_glyph_position_t
));
ASSERT_STATIC
(
sizeof
(
hb_glyph_info_t
)
==
sizeof
(
hb_glyph_position_t
));
struct
_hb_buffer_t
{
struct
_hb_buffer_t
{
hb_reference_count_t
ref_count
;
hb_reference_count_t
ref_count
;
...
@@ -46,10 +76,10 @@ struct _hb_buffer_t {
...
@@ -46,10 +76,10 @@ struct _hb_buffer_t {
unsigned
int
in_pos
;
unsigned
int
in_pos
;
unsigned
int
out_pos
;
unsigned
int
out_pos
;
hb_glyph_info_t
*
in_string
;
hb_
internal_
glyph_info_t
*
in_string
;
hb_glyph_info_t
*
out_string
;
hb_
internal_
glyph_info_t
*
out_string
;
hb_glyph_info_t
*
alt_string
;
hb_
internal_
glyph_info_t
*
alt_string
;
hb_glyph_position_t
*
positions
;
hb_
internal_
glyph_position_t
*
positions
;
hb_direction_t
direction
;
hb_direction_t
direction
;
unsigned
int
max_lig_id
;
unsigned
int
max_lig_id
;
...
@@ -88,16 +118,16 @@ _hb_buffer_allocate_lig_id (hb_buffer_t *buffer);
...
@@ -88,16 +118,16 @@ _hb_buffer_allocate_lig_id (hb_buffer_t *buffer);
/* convenience macros */
/* convenience macros */
#define IN_GLYPH(pos) (buffer->in_string[(pos)].
gindex
)
#define IN_GLYPH(pos) (buffer->in_string[(pos)].
codepoint
)
#define IN_INFO(pos) (&buffer->in_string[(pos)])
#define IN_INFO(pos) (&buffer->in_string[(pos)])
#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].
gindex
)
#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].
codepoint
)
#define IN_CURINFO() (&buffer->in_string[buffer->in_pos])
#define IN_CURINFO() (&buffer->in_string[buffer->in_pos])
#define IN_PROPERTIES(pos) (buffer->in_string[(pos)].properties)
#define IN_PROPERTIES(pos) (buffer->in_string[(pos)].properties)
#define IN_LIGID(pos) (buffer->in_string[(pos)].lig
ID
)
#define IN_LIGID(pos) (buffer->in_string[(pos)].lig
_id
)
#define IN_COMPONENT(pos) (buffer->in_string[(pos)].component)
#define IN_COMPONENT(pos) (buffer->in_string[(pos)].component)
#define POSITION(pos) (&buffer->positions[(pos)])
#define POSITION(pos) (&buffer->positions[(pos)])
#define CURPOSITION() (&buffer->positions[buffer->in_pos])
#define CURPOSITION() (&buffer->positions[buffer->in_pos])
#define OUT_GLYPH(pos) (buffer->out_string[(pos)].
gindex
)
#define OUT_GLYPH(pos) (buffer->out_string[(pos)].
codepoint
)
#define OUT_INFO(pos) (&buffer->out_string[(pos)])
#define OUT_INFO(pos) (&buffer->out_string[(pos)])
HB_END_DECLS
HB_END_DECLS
...
...
src/hb-buffer.c
浏览文件 @
f1322e52
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <string.h>
#include <string.h>
static
hb_buffer_t
_hb_buffer_nil
=
{
static
hb_buffer_t
_hb_buffer_nil
=
{
HB_REFERENCE_COUNT_INVALID
/* ref_count */
HB_REFERENCE_COUNT_INVALID
/* ref_count */
};
};
...
@@ -158,21 +159,21 @@ hb_buffer_ensure (hb_buffer_t *buffer, unsigned int size)
...
@@ -158,21 +159,21 @@ hb_buffer_ensure (hb_buffer_t *buffer, unsigned int size)
void
void
hb_buffer_add_glyph
(
hb_buffer_t
*
buffer
,
hb_buffer_add_glyph
(
hb_buffer_t
*
buffer
,
hb_codepoint_t
glyph_index
,
hb_codepoint_t
codepoint
,
unsigned
int
properties
,
unsigned
int
properties
,
unsigned
int
cluster
)
unsigned
int
cluster
)
{
{
hb_glyph_info_t
*
glyph
;
hb_
internal_
glyph_info_t
*
glyph
;
hb_buffer_ensure
(
buffer
,
buffer
->
in_length
+
1
);
hb_buffer_ensure
(
buffer
,
buffer
->
in_length
+
1
);
glyph
=
&
buffer
->
in_string
[
buffer
->
in_length
];
glyph
=
&
buffer
->
in_string
[
buffer
->
in_length
];
glyph
->
gindex
=
glyph_index
;
glyph
->
codepoint
=
codepoint
;
glyph
->
properties
=
properties
;
glyph
->
properties
=
properties
;
glyph
->
cluster
=
cluster
;
glyph
->
cluster
=
cluster
;
glyph
->
component
=
0
;
glyph
->
component
=
0
;
glyph
->
lig
ID
=
0
;
glyph
->
lig
_id
=
0
;
glyph
->
internal
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
glyph
->
gproperty
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
buffer
->
in_length
++
;
buffer
->
in_length
++
;
}
}
...
@@ -217,7 +218,7 @@ _hb_buffer_swap (hb_buffer_t *buffer)
...
@@ -217,7 +218,7 @@ _hb_buffer_swap (hb_buffer_t *buffer)
if
(
buffer
->
out_string
!=
buffer
->
in_string
)
if
(
buffer
->
out_string
!=
buffer
->
in_string
)
{
{
hb_glyph_info_t
*
tmp_string
;
hb_
internal_
glyph_info_t
*
tmp_string
;
tmp_string
=
buffer
->
in_string
;
tmp_string
=
buffer
->
in_string
;
buffer
->
in_string
=
buffer
->
out_string
;
buffer
->
in_string
=
buffer
->
out_string
;
buffer
->
out_string
=
tmp_string
;
buffer
->
out_string
=
tmp_string
;
...
@@ -243,9 +244,9 @@ _hb_buffer_swap (hb_buffer_t *buffer)
...
@@ -243,9 +244,9 @@ _hb_buffer_swap (hb_buffer_t *buffer)
will copied `num_out' times, otherwise `component' itself will
will copied `num_out' times, otherwise `component' itself will
be used to fill the `component' fields.
be used to fill the `component' fields.
If `lig
ID' is 0xFFFF, the ligID
value from buffer->in_pos
If `lig
_id' is 0xFFFF, the lig_id
value from buffer->in_pos
will copied `num_out' times, otherwise `lig
ID
' itself will
will copied `num_out' times, otherwise `lig
_id
' itself will
be used to fill the `lig
ID
' fields.
be used to fill the `lig
_id
' fields.
The properties for all replacement glyphs are taken
The properties for all replacement glyphs are taken
from the glyph at position `buffer->in_pos'.
from the glyph at position `buffer->in_pos'.
...
@@ -258,7 +259,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
...
@@ -258,7 +259,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
unsigned
int
num_out
,
unsigned
int
num_out
,
const
uint16_t
*
glyph_data_be
,
const
uint16_t
*
glyph_data_be
,
unsigned
short
component
,
unsigned
short
component
,
unsigned
short
lig
ID
)
unsigned
short
lig
_id
)
{
{
unsigned
int
i
;
unsigned
int
i
;
unsigned
int
properties
;
unsigned
int
properties
;
...
@@ -274,18 +275,18 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
...
@@ -274,18 +275,18 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
cluster
=
buffer
->
in_string
[
buffer
->
in_pos
].
cluster
;
cluster
=
buffer
->
in_string
[
buffer
->
in_pos
].
cluster
;
if
(
component
==
0xFFFF
)
if
(
component
==
0xFFFF
)
component
=
buffer
->
in_string
[
buffer
->
in_pos
].
component
;
component
=
buffer
->
in_string
[
buffer
->
in_pos
].
component
;
if
(
lig
ID
==
0xFFFF
)
if
(
lig
_id
==
0xFFFF
)
lig
ID
=
buffer
->
in_string
[
buffer
->
in_pos
].
ligID
;
lig
_id
=
buffer
->
in_string
[
buffer
->
in_pos
].
lig_id
;
for
(
i
=
0
;
i
<
num_out
;
i
++
)
for
(
i
=
0
;
i
<
num_out
;
i
++
)
{
{
hb_glyph_info_t
*
info
=
&
buffer
->
out_string
[
buffer
->
out_pos
+
i
];
hb_
internal_
glyph_info_t
*
info
=
&
buffer
->
out_string
[
buffer
->
out_pos
+
i
];
info
->
gindex
=
hb_be_uint16
(
glyph_data_be
[
i
]);
info
->
codepoint
=
hb_be_uint16
(
glyph_data_be
[
i
]);
info
->
properties
=
properties
;
info
->
properties
=
properties
;
info
->
cluster
=
cluster
;
info
->
cluster
=
cluster
;
info
->
component
=
component
;
info
->
component
=
component
;
info
->
lig
ID
=
ligID
;
info
->
lig
_id
=
lig_id
;
info
->
internal
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
info
->
gproperty
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
}
}
buffer
->
in_pos
+=
num_in
;
buffer
->
in_pos
+=
num_in
;
...
@@ -298,9 +299,9 @@ HB_INTERNAL void
...
@@ -298,9 +299,9 @@ HB_INTERNAL void
_hb_buffer_add_output_glyph
(
hb_buffer_t
*
buffer
,
_hb_buffer_add_output_glyph
(
hb_buffer_t
*
buffer
,
hb_codepoint_t
glyph_index
,
hb_codepoint_t
glyph_index
,
unsigned
short
component
,
unsigned
short
component
,
unsigned
short
lig
ID
)
unsigned
short
lig
_id
)
{
{
hb_glyph_info_t
*
info
;
hb_
internal_
glyph_info_t
*
info
;
if
(
buffer
->
out_string
!=
buffer
->
in_string
)
if
(
buffer
->
out_string
!=
buffer
->
in_string
)
{
{
...
@@ -311,12 +312,12 @@ _hb_buffer_add_output_glyph (hb_buffer_t *buffer,
...
@@ -311,12 +312,12 @@ _hb_buffer_add_output_glyph (hb_buffer_t *buffer,
buffer
->
out_string
[
buffer
->
out_pos
]
=
buffer
->
in_string
[
buffer
->
in_pos
];
buffer
->
out_string
[
buffer
->
out_pos
]
=
buffer
->
in_string
[
buffer
->
in_pos
];
info
=
&
buffer
->
out_string
[
buffer
->
out_pos
];
info
=
&
buffer
->
out_string
[
buffer
->
out_pos
];
info
->
gindex
=
glyph_index
;
info
->
codepoint
=
glyph_index
;
if
(
component
!=
0xFFFF
)
if
(
component
!=
0xFFFF
)
info
->
component
=
component
;
info
->
component
=
component
;
if
(
lig
ID
!=
0xFFFF
)
if
(
lig
_id
!=
0xFFFF
)
info
->
lig
ID
=
ligID
;
info
->
lig
_id
=
lig_id
;
info
->
internal
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
info
->
gproperty
=
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
;
buffer
->
in_pos
++
;
buffer
->
in_pos
++
;
buffer
->
out_pos
++
;
buffer
->
out_pos
++
;
...
@@ -363,7 +364,7 @@ hb_buffer_get_len (hb_buffer_t *buffer)
...
@@ -363,7 +364,7 @@ hb_buffer_get_len (hb_buffer_t *buffer)
hb_glyph_info_t
*
hb_glyph_info_t
*
hb_buffer_get_glyph_infos
(
hb_buffer_t
*
buffer
)
hb_buffer_get_glyph_infos
(
hb_buffer_t
*
buffer
)
{
{
return
buffer
->
in_string
;
return
(
hb_glyph_info_t
*
)
buffer
->
in_string
;
}
}
/* Return value valid as long as buffer not modified */
/* Return value valid as long as buffer not modified */
...
@@ -373,5 +374,5 @@ hb_buffer_get_glyph_positions (hb_buffer_t *buffer)
...
@@ -373,5 +374,5 @@ hb_buffer_get_glyph_positions (hb_buffer_t *buffer)
if
(
buffer
->
in_length
&&
!
buffer
->
positions
)
if
(
buffer
->
in_length
&&
!
buffer
->
positions
)
hb_buffer_clear_positions
(
buffer
);
hb_buffer_clear_positions
(
buffer
);
return
buffer
->
positions
;
return
(
hb_glyph_position_t
*
)
buffer
->
positions
;
}
}
src/hb-buffer.h
浏览文件 @
f1322e52
...
@@ -41,15 +41,13 @@ typedef enum _hb_direction_t {
...
@@ -41,15 +41,13 @@ typedef enum _hb_direction_t {
HB_DIRECTION_BTT
HB_DIRECTION_BTT
}
hb_direction_t
;
}
hb_direction_t
;
/* XXX these structs need review before we can commit to them */
typedef
struct
_hb_glyph_info_t
{
typedef
struct
_hb_glyph_info_t
{
hb_codepoint_t
gindex
;
hb_codepoint_t
codepoint
;
u
nsigned
int
properties
;
u
int32_t
properties
;
u
nsigned
int
cluster
;
u
int32_t
cluster
;
u
nsigned
short
component
;
u
int16_t
component
;
u
nsigned
short
ligID
;
u
int16_t
lig_id
;
u
nsigned
int
internal
;
u
int32_t
internal
;
}
hb_glyph_info_t
;
}
hb_glyph_info_t
;
typedef
struct
_hb_glyph_position_t
{
typedef
struct
_hb_glyph_position_t
{
...
@@ -57,15 +55,16 @@ typedef struct _hb_glyph_position_t {
...
@@ -57,15 +55,16 @@ typedef struct _hb_glyph_position_t {
hb_position_t
y_pos
;
hb_position_t
y_pos
;
hb_position_t
x_advance
;
hb_position_t
x_advance
;
hb_position_t
y_advance
;
hb_position_t
y_advance
;
unsigned
short
back
;
/* number of glyphs to go back
/* XXX these should all be replaced by "uint32_t internal" */
for drawing current glyph */
hb_bool_t
new_advance
:
1
;
/* if set, the advance width values are
hb_bool_t
new_advance
;
/* if set, the advance width values are
absolute, i.e., they won't be
absolute, i.e., they won't be
added to the original glyph's value
added to the original glyph's value
but rather replace them */
but rather replace them */
unsigned
short
back
:
15
;
/* number of glyphs to go back
short
cursive_chain
;
/* character to which this connects,
for drawing current glyph */
may be positive or negative; used
short
cursive_chain
:
16
;
/* character to which this connects,
only internally */
may be positive or negative; used
only internally */
}
hb_glyph_position_t
;
}
hb_glyph_position_t
;
...
@@ -103,7 +102,7 @@ hb_buffer_ensure (hb_buffer_t *buffer,
...
@@ -103,7 +102,7 @@ hb_buffer_ensure (hb_buffer_t *buffer,
void
void
hb_buffer_add_glyph
(
hb_buffer_t
*
buffer
,
hb_buffer_add_glyph
(
hb_buffer_t
*
buffer
,
hb_codepoint_t
glyph_index
,
hb_codepoint_t
codepoint
,
unsigned
int
properties
,
unsigned
int
properties
,
unsigned
int
cluster
);
unsigned
int
cluster
);
...
...
src/hb-ot-layout-gpos-private.h
浏览文件 @
f1322e52
...
@@ -58,7 +58,7 @@ struct ValueFormat : USHORT
...
@@ -58,7 +58,7 @@ struct ValueFormat : USHORT
const
void
apply_value
(
hb_ot_layout_t
*
layout
,
const
void
apply_value
(
hb_ot_layout_t
*
layout
,
const
char
*
base
,
const
char
*
base
,
const
Value
*
values
,
const
Value
*
values
,
hb_glyph_position_t
*
glyph_pos
)
const
hb_
internal_
glyph_position_t
*
glyph_pos
)
const
{
{
unsigned
int
x_ppem
,
y_ppem
;
unsigned
int
x_ppem
,
y_ppem
;
hb_16dot16_t
x_scale
,
y_scale
;
hb_16dot16_t
x_scale
,
y_scale
;
...
@@ -825,7 +825,7 @@ struct MarkBasePosFormat1
...
@@ -825,7 +825,7 @@ struct MarkBasePosFormat1
unsigned
int
index
=
base_index
*
classCount
+
mark_class
;
unsigned
int
index
=
base_index
*
classCount
+
mark_class
;
(
&
base_array
+
base_array
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
base_x
,
&
base_y
);
(
&
base_array
+
base_array
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
base_x
,
&
base_y
);
hb_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
hb_
internal_
glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
base_x
-
mark_x
;
o
->
x_pos
=
base_x
-
mark_x
;
o
->
y_pos
=
base_y
-
mark_y
;
o
->
y_pos
=
base_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
x_advance
=
0
;
...
@@ -962,7 +962,7 @@ struct MarkLigPosFormat1
...
@@ -962,7 +962,7 @@ struct MarkLigPosFormat1
unsigned
int
index
=
comp_index
*
classCount
+
mark_class
;
unsigned
int
index
=
comp_index
*
classCount
+
mark_class
;
(
&
lig_attach
+
lig_attach
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
lig_x
,
&
lig_y
);
(
&
lig_attach
+
lig_attach
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
lig_x
,
&
lig_y
);
hb_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
hb_
internal_
glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
lig_x
-
mark_x
;
o
->
x_pos
=
lig_x
-
mark_x
;
o
->
y_pos
=
lig_y
-
mark_y
;
o
->
y_pos
=
lig_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
x_advance
=
0
;
...
@@ -1077,7 +1077,7 @@ struct MarkMarkPosFormat1
...
@@ -1077,7 +1077,7 @@ struct MarkMarkPosFormat1
unsigned
int
index
=
mark2_index
*
classCount
+
mark1_class
;
unsigned
int
index
=
mark2_index
*
classCount
+
mark1_class
;
(
&
mark2_array
+
mark2_array
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
mark2_x
,
&
mark2_y
);
(
&
mark2_array
+
mark2_array
.
matrix
[
index
]).
get_anchor
(
layout
,
IN_GLYPH
(
j
),
&
mark2_x
,
&
mark2_y
);
hb_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
hb_
internal_
glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
mark2_x
-
mark1_x
;
o
->
x_pos
=
mark2_x
-
mark1_x
;
o
->
y_pos
=
mark2_y
-
mark1_y
;
o
->
y_pos
=
mark2_y
-
mark1_y
;
o
->
x_advance
=
0
;
o
->
x_advance
=
0
;
...
...
src/hb-ot-layout-private.h
浏览文件 @
f1322e52
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "hb-private.h"
#include "hb-private.h"
#include "hb-ot-layout.h"
#include "hb-ot-layout.h"
#include "hb-buffer-private.h"
typedef
unsigned
int
hb_ot_layout_class_t
;
typedef
unsigned
int
hb_ot_layout_class_t
;
...
@@ -78,13 +79,13 @@ _hb_ot_layout_set_glyph_property (hb_ot_layout_t *layout,
...
@@ -78,13 +79,13 @@ _hb_ot_layout_set_glyph_property (hb_ot_layout_t *layout,
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_ot_layout_t
*
layout
,
_hb_ot_layout_check_glyph_property
(
hb_ot_layout_t
*
layout
,
hb_glyph_info_t
*
ginfo
,
hb_
internal_
glyph_info_t
*
ginfo
,
unsigned
int
lookup_flags
,
unsigned
int
lookup_flags
,
unsigned
int
*
property
);
unsigned
int
*
property
);
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_ot_layout_t
*
layout
,
_hb_ot_layout_skip_mark
(
hb_ot_layout_t
*
layout
,
hb_glyph_info_t
*
ginfo
,
hb_
internal_
glyph_info_t
*
ginfo
,
unsigned
int
lookup_flags
,
unsigned
int
lookup_flags
,
unsigned
int
*
property
);
unsigned
int
*
property
);
...
...
src/hb-ot-layout.cc
浏览文件 @
f1322e52
...
@@ -176,15 +176,15 @@ _hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout,
...
@@ -176,15 +176,15 @@ _hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout,
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_ot_layout_t
*
layout
,
_hb_ot_layout_check_glyph_property
(
hb_ot_layout_t
*
layout
,
hb_glyph_info_t
*
ginfo
,
hb_
internal_
glyph_info_t
*
ginfo
,
unsigned
int
lookup_flags
,
unsigned
int
lookup_flags
,
unsigned
int
*
property_out
)
unsigned
int
*
property_out
)
{
{
unsigned
int
property
;
unsigned
int
property
;
if
(
ginfo
->
internal
==
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
)
if
(
ginfo
->
gproperty
==
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
)
ginfo
->
internal
=
_hb_ot_layout_get_glyph_property
(
layout
,
ginfo
->
gindex
);
ginfo
->
gproperty
=
_hb_ot_layout_get_glyph_property
(
layout
,
ginfo
->
codepoint
);
property
=
ginfo
->
internal
;
property
=
ginfo
->
gproperty
;
if
(
property_out
)
if
(
property_out
)
*
property_out
=
property
;
*
property_out
=
property
;
...
@@ -200,7 +200,7 @@ _hb_ot_layout_check_glyph_property (hb_ot_layout_t *layout,
...
@@ -200,7 +200,7 @@ _hb_ot_layout_check_glyph_property (hb_ot_layout_t *layout,
* lookup_flags has the set index.
* lookup_flags has the set index.
*/
*/
if
(
lookup_flags
&
LookupFlag
::
UseMarkFilteringSet
)
if
(
lookup_flags
&
LookupFlag
::
UseMarkFilteringSet
)
return
layout
->
gdef
->
mark_set_covers
(
lookup_flags
>>
16
,
ginfo
->
gindex
);
return
layout
->
gdef
->
mark_set_covers
(
lookup_flags
>>
16
,
ginfo
->
codepoint
);
/* The second byte of lookup_flags has the meaning
/* The second byte of lookup_flags has the meaning
* "ignore marks of attachment type different than
* "ignore marks of attachment type different than
...
@@ -215,15 +215,15 @@ _hb_ot_layout_check_glyph_property (hb_ot_layout_t *layout,
...
@@ -215,15 +215,15 @@ _hb_ot_layout_check_glyph_property (hb_ot_layout_t *layout,
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_ot_layout_t
*
layout
,
_hb_ot_layout_skip_mark
(
hb_ot_layout_t
*
layout
,
hb_glyph_info_t
*
ginfo
,
hb_
internal_
glyph_info_t
*
ginfo
,
unsigned
int
lookup_flags
,
unsigned
int
lookup_flags
,
unsigned
int
*
property_out
)
unsigned
int
*
property_out
)
{
{
unsigned
int
property
;
unsigned
int
property
;
if
(
ginfo
->
internal
==
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
)
if
(
ginfo
->
gproperty
==
HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN
)
ginfo
->
internal
=
_hb_ot_layout_get_glyph_property
(
layout
,
ginfo
->
gindex
);
ginfo
->
gproperty
=
_hb_ot_layout_get_glyph_property
(
layout
,
ginfo
->
codepoint
);
property
=
ginfo
->
internal
;
property
=
ginfo
->
gproperty
;
if
(
property_out
)
if
(
property_out
)
*
property_out
=
property
;
*
property_out
=
property
;
...
@@ -235,7 +235,7 @@ _hb_ot_layout_skip_mark (hb_ot_layout_t *layout,
...
@@ -235,7 +235,7 @@ _hb_ot_layout_skip_mark (hb_ot_layout_t *layout,
/* If using mark filtering sets, the high short of lookup_flags has the set index. */
/* If using mark filtering sets, the high short of lookup_flags has the set index. */
if
(
lookup_flags
&
LookupFlag
::
UseMarkFilteringSet
)
if
(
lookup_flags
&
LookupFlag
::
UseMarkFilteringSet
)
return
!
layout
->
gdef
->
mark_set_covers
(
lookup_flags
>>
16
,
ginfo
->
gindex
);
return
!
layout
->
gdef
->
mark_set_covers
(
lookup_flags
>>
16
,
ginfo
->
codepoint
);
/* The second byte of lookup_flags has the meaning "ignore marks of attachment type
/* The second byte of lookup_flags has the meaning "ignore marks of attachment type
* different than the attachment type specified." */
* different than the attachment type specified." */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录