Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3015c417
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
3015c417
编写于
5月 20, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Remove last dependence on the old code base!
上级
5c0adce1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
85 addition
and
89 deletion
+85
-89
src/hb-buffer-private.h
src/hb-buffer-private.h
+44
-44
src/hb-buffer.c
src/hb-buffer.c
+23
-24
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+4
-7
src/hb-ot-layout-gsub-private.h
src/hb-ot-layout-gsub-private.h
+6
-6
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+8
-8
未找到文件。
src/hb-buffer-private.h
浏览文件 @
3015c417
...
@@ -28,79 +28,79 @@
...
@@ -28,79 +28,79 @@
#ifndef HB_BUFFER_PRIVATE_H
#ifndef HB_BUFFER_PRIVATE_H
#define HB_BUFFER_PRIVATE_H
#define HB_BUFFER_PRIVATE_H
#include "h
arfbuzz-impl
.h"
#include "h
b-private
.h"
#include "hb-buffer.h"
#include "hb-buffer.h"
HB_BEGIN_
HEADER
HB_BEGIN_
DECLS
();
#define HB_GLYPH_PROPERTY_UNKNOWN 0xFFFF
#define HB_GLYPH_PROPERTY_UNKNOWN 0xFFFF
HB_INTERNAL
void
HB_INTERNAL
void
_hb_buffer_swap
(
HB_Buffer
buffer
);
_hb_buffer_swap
(
hb_buffer_t
*
buffer
);
HB_INTERNAL
void
HB_INTERNAL
void
_hb_buffer_clear_output
(
HB_Buffer
buffer
);
_hb_buffer_clear_output
(
hb_buffer_t
*
buffer
);
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_clear_positions
(
HB_Buffer
buffer
);
_hb_buffer_clear_positions
(
hb_buffer_t
*
buffer
);
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyphs
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyphs
(
hb_buffer_t
*
buffer
,
HB_UShort
num_in
,
unsigned
int
num_in
,
HB_UShort
num_out
,
unsigned
int
num_out
,
HB_US
hort
*
glyph_data
,
unsigned
s
hort
*
glyph_data
,
HB_UShort
component
,
unsigned
short
component
,
HB_UShort
ligID
);
unsigned
short
ligID
);
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyph
(
hb_buffer_t
*
buffer
,
HB_UInt
glyph_index
,
hb_codepoint_t
glyph_index
,
HB_US
hort
component
,
unsigned
s
hort
component
,
HB_UShort
ligID
);
unsigned
short
ligID
);
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_next_glyph
(
HB_Buffer
buffer
);
_hb_buffer_next_glyph
(
hb_buffer_t
*
buffer
);
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_replace_glyph
(
HB_Buffer
buffer
,
_hb_buffer_replace_glyph
(
hb_buffer_t
*
buffer
,
HB_UInt
glyph_index
);
hb_codepoint_t
glyph_index
);
HB_INTERNAL
HB_US
hort
HB_INTERNAL
unsigned
s
hort
_hb_buffer_allocate_ligid
(
HB_Buffer
buffer
);
_hb_buffer_allocate_ligid
(
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)].gindex)
#define IN_ITEM(
pos )
(&buffer->in_string[(pos)])
#define IN_ITEM(
pos)
(&buffer->in_string[(pos)])
#define IN_CURGLYPH()
(buffer->in_string[buffer->in_pos].gindex)
#define IN_CURGLYPH()
(buffer->in_string[buffer->in_pos].gindex)
#define IN_CURITEM()
(&buffer->in_string[buffer->in_pos])
#define IN_CURITEM()
(&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)].ligID)
#define IN_LIGID(
pos)
(buffer->in_string[(pos)].ligID)
#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)].gindex)
#define OUT_ITEM(
pos )
(&buffer->out_string[(pos)])
#define OUT_ITEM(
pos)
(&buffer->out_string[(pos)])
#define CHECK_Property
( layout, index, flags, properties
) \
#define CHECK_Property
(layout, index, flags, properties
) \
({unsigned int _p; error = _hb_ot_layout_check_glyph_property((layout), (index), (flags), (&_p)) \
({unsigned int _p; error = _hb_ot_layout_check_glyph_property((layout), (index), (flags), (&_p)) \
? HB_Err_Ok : HB_Err_Not_Covered, *(properties) = _p; error;})
? HB_Err_Ok : HB_Err_Not_Covered, *(properties) = _p; error;})
#define ADD_String
( buffer, num_in, num_out, glyph_data, component, ligID
) \
#define ADD_String
(buffer, num_in, num_out, glyph_data, component, ligID
) \
( ( error = _hb_buffer_add_output_glyphs(
(buffer), \
((error = _hb_buffer_add_output_glyphs (
(buffer), \
(num_in), (num_out), \
(num_in), (num_out), \
(glyph_data), (component), (ligID) \
(glyph_data), (component), (ligID) \
) ) != HB_Err_Ok
)
)) != HB_Err_Ok
)
#define ADD_Glyph
( buffer, glyph_index, component, ligID
) \
#define ADD_Glyph
(buffer, glyph_index, component, ligID
) \
( ( error = _hb_buffer_add_output_glyph(
(buffer), \
((error = _hb_buffer_add_output_glyph (
(buffer), \
(glyph_index), (component), (ligID) \
(glyph_index), (component), (ligID) \
) ) != HB_Err_Ok
)
)) != HB_Err_Ok
)
#define REPLACE_Glyph
( buffer, glyph_index
) \
#define REPLACE_Glyph
(buffer, glyph_index
) \
( ( error = _hb_buffer_replace_glyph( (buffer), (glyph_index) ) ) != HB_Err_Ok
)
((error = _hb_buffer_replace_glyph ((buffer), (glyph_index))) != HB_Err_Ok
)
#define COPY_Glyph
( buffer
) \
#define COPY_Glyph
(buffer
) \
( (error = _hb_buffer_next_glyph ( buffer ) ) != HB_Err_Ok
)
((error = _hb_buffer_next_glyph (buffer)) != HB_Err_Ok
)
HB_END_
HEADER
HB_END_
DECLS
();
#endif
/* HB_BUFFER_PRIVATE_H */
#endif
/* HB_BUFFER_PRIVATE_H */
src/hb-buffer.c
浏览文件 @
3015c417
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
* Red Hat Author(s): Owen Taylor, Behdad Esfahbod
* Red Hat Author(s): Owen Taylor, Behdad Esfahbod
*/
*/
#include "harfbuzz-impl.h"
#include "hb-buffer-private.h"
#include "hb-buffer-private.h"
/* Here is how the buffer works internally:
/* Here is how the buffer works internally:
...
@@ -61,7 +60,7 @@
...
@@ -61,7 +60,7 @@
hb_buffer_ensure
(
hb_buffer_t
*
buffer
,
hb_buffer_ensure
(
hb_buffer_t
*
buffer
,
unsigned
int
size
)
unsigned
int
size
)
{
{
HB_UI
nt
new_allocated
=
buffer
->
allocated
;
unsigned
i
nt
new_allocated
=
buffer
->
allocated
;
/* XXX err handling */
/* XXX err handling */
if
(
size
>
new_allocated
)
if
(
size
>
new_allocated
)
...
@@ -152,10 +151,10 @@ hb_buffer_clear (HB_Buffer buffer)
...
@@ -152,10 +151,10 @@ hb_buffer_clear (HB_Buffer buffer)
}
}
void
void
hb_buffer_add_glyph
(
HB_Buffer
buffer
,
hb_buffer_add_glyph
(
hb_buffer_t
*
buffer
,
HB_UInt
glyph_index
,
hb_codepoint_t
glyph_index
,
HB_UInt
properties
,
unsigned
int
properties
,
HB_UInt
cluster
)
unsigned
int
cluster
)
{
{
HB_Error
error
;
HB_Error
error
;
HB_GlyphItem
glyph
;
HB_GlyphItem
glyph
;
...
@@ -241,17 +240,17 @@ _hb_buffer_swap (HB_Buffer buffer)
...
@@ -241,17 +240,17 @@ _hb_buffer_swap (HB_Buffer buffer)
The cluster value for the glyph at position buffer->in_pos is used
The cluster value for the glyph at position buffer->in_pos is used
for all replacement glyphs */
for all replacement glyphs */
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyphs
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyphs
(
hb_buffer_t
*
buffer
,
HB_UShort
num_in
,
unsigned
int
num_in
,
HB_UShort
num_out
,
unsigned
int
num_out
,
HB_US
hort
*
glyph_data
,
unsigned
s
hort
*
glyph_data
,
HB_UShort
component
,
unsigned
short
component
,
HB_UShort
ligID
)
unsigned
short
ligID
)
{
{
HB_Error
error
;
HB_Error
error
;
HB_UShor
t
i
;
unsigned
in
t
i
;
HB_UI
nt
properties
;
unsigned
i
nt
properties
;
HB_UI
nt
cluster
;
unsigned
i
nt
cluster
;
hb_buffer_ensure
(
buffer
,
buffer
->
out_pos
+
num_out
);
hb_buffer_ensure
(
buffer
,
buffer
->
out_pos
+
num_out
);
...
@@ -290,12 +289,12 @@ _hb_buffer_add_output_glyphs (HB_Buffer buffer,
...
@@ -290,12 +289,12 @@ _hb_buffer_add_output_glyphs (HB_Buffer buffer,
}
}
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyph
(
hb_buffer_t
*
buffer
,
HB_UInt
glyph_index
,
hb_codepoint_t
glyph_index
,
HB_US
hort
component
,
unsigned
s
hort
component
,
HB_US
hort
ligID
)
unsigned
s
hort
ligID
)
{
{
HB_US
hort
glyph_data
=
glyph_index
;
unsigned
s
hort
glyph_data
=
glyph_index
;
return
_hb_buffer_add_output_glyphs
(
buffer
,
1
,
1
,
return
_hb_buffer_add_output_glyphs
(
buffer
,
1
,
1
,
&
glyph_data
,
component
,
ligID
);
&
glyph_data
,
component
,
ligID
);
...
@@ -321,8 +320,8 @@ _hb_buffer_next_glyph (HB_Buffer buffer)
...
@@ -321,8 +320,8 @@ _hb_buffer_next_glyph (HB_Buffer buffer)
}
}
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_replace_glyph
(
HB_Buffer
buffer
,
_hb_buffer_replace_glyph
(
hb_buffer_t
*
buffer
,
HB_UInt
glyph_index
)
hb_codepoint_t
glyph_index
)
{
{
if
(
!
buffer
->
separate_out
)
if
(
!
buffer
->
separate_out
)
{
{
...
@@ -340,8 +339,8 @@ _hb_buffer_replace_glyph (HB_Buffer buffer,
...
@@ -340,8 +339,8 @@ _hb_buffer_replace_glyph (HB_Buffer buffer,
return
HB_Err_Ok
;
return
HB_Err_Ok
;
}
}
HB_INTERNAL
HB_US
hort
HB_INTERNAL
unsigned
s
hort
_hb_buffer_allocate_ligid
(
HB_Buffer
buffer
)
_hb_buffer_allocate_ligid
(
hb_buffer_t
*
buffer
)
{
{
return
++
buffer
->
max_ligID
;
return
++
buffer
->
max_ligID
;
}
}
src/hb-ot-layout-gpos-private.h
浏览文件 @
3015c417
...
@@ -29,9 +29,6 @@
...
@@ -29,9 +29,6 @@
#include "hb-ot-layout-gsubgpos-private.h"
#include "hb-ot-layout-gsubgpos-private.h"
/* XXX */
#include "harfbuzz-impl.h"
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
...
@@ -670,7 +667,7 @@ struct CursivePosFormat1
...
@@ -670,7 +667,7 @@ struct CursivePosFormat1
struct
hb_ot_layout_t
::
gpos_info_t
*
gpi
=
&
layout
->
gpos_info
;
struct
hb_ot_layout_t
::
gpos_info_t
*
gpi
=
&
layout
->
gpos_info
;
hb_codepoint_t
last_pos
=
gpi
->
last
;
hb_codepoint_t
last_pos
=
gpi
->
last
;
gpi
->
last
=
0xFFFF
;
gpi
->
last
=
HB_OT_GPOS_NO_LAST
;
/* We don't handle mark glyphs here. */
/* We don't handle mark glyphs here. */
if
(
property
==
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
if
(
property
==
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
...
@@ -684,7 +681,7 @@ struct CursivePosFormat1
...
@@ -684,7 +681,7 @@ struct CursivePosFormat1
hb_position_t
entry_x
,
entry_y
,
exit_x
,
exit_y
;
hb_position_t
entry_x
,
entry_y
,
exit_x
,
exit_y
;
if
(
last_pos
==
0xFFFF
||
!
record
.
entryAnchor
)
if
(
last_pos
==
HB_OT_GPOS_NO_LAST
||
!
record
.
entryAnchor
)
goto
end
;
goto
end
;
(
this
+
record
.
entryAnchor
).
get_anchor
(
layout
,
IN_CURGLYPH
(),
&
entry_x
,
&
entry_y
);
(
this
+
record
.
entryAnchor
).
get_anchor
(
layout
,
IN_CURGLYPH
(),
&
entry_x
,
&
entry_y
);
...
@@ -1180,7 +1177,7 @@ struct PosLookup : Lookup
...
@@ -1180,7 +1177,7 @@ struct PosLookup : Lookup
if
(
HB_UNLIKELY
(
!
buffer
->
in_length
))
if
(
HB_UNLIKELY
(
!
buffer
->
in_length
))
return
false
;
return
false
;
layout
->
gpos_info
.
last
=
0xFFFF
;
/* no last valid glyph for cursive pos. */
layout
->
gpos_info
.
last
=
HB_OT_GPOS_NO_LAST
;
/* no last valid glyph for cursive pos. */
buffer
->
in_pos
=
0
;
buffer
->
in_pos
=
0
;
while
(
buffer
->
in_pos
<
buffer
->
in_length
)
while
(
buffer
->
in_pos
<
buffer
->
in_length
)
...
@@ -1196,7 +1193,7 @@ struct PosLookup : Lookup
...
@@ -1196,7 +1193,7 @@ struct PosLookup : Lookup
done
=
false
;
done
=
false
;
/* Contrary to properties defined in GDEF, user-defined properties
/* Contrary to properties defined in GDEF, user-defined properties
will always stop a possible cursive positioning. */
will always stop a possible cursive positioning. */
layout
->
gpos_info
.
last
=
0xFFFF
;
layout
->
gpos_info
.
last
=
HB_OT_GPOS_NO_LAST
;
}
}
if
(
!
done
)
if
(
!
done
)
...
...
src/hb-ot-layout-gsub-private.h
浏览文件 @
3015c417
...
@@ -30,14 +30,14 @@
...
@@ -30,14 +30,14 @@
#include "hb-ot-layout-gsubgpos-private.h"
#include "hb-ot-layout-gsubgpos-private.h"
/* XXX */
/* XXX */
#include "h
arfbuzz-impl
.h"
#include "h
b-buffer-private
.h"
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph_ids
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyph_ids
(
hb_buffer_t
*
buffer
,
HB_UShort
num_in
,
unsigned
int
num_in
,
HB_UShort
num_out
,
unsigned
int
num_out
,
const
GlyphID
*
glyph_data
,
const
GlyphID
*
glyph_data
,
HB_UShort
component
,
unsigned
short
component
,
HB_UShort
ligID
);
unsigned
short
ligID
);
struct
SingleSubstFormat1
struct
SingleSubstFormat1
...
...
src/hb-ot-layout.cc
浏览文件 @
3015c417
...
@@ -597,17 +597,17 @@ hb_buffer_duplicate_out_buffer( HB_Buffer buffer )
...
@@ -597,17 +597,17 @@ hb_buffer_duplicate_out_buffer( HB_Buffer buffer )
/* XXX */
/* XXX */
HB_INTERNAL
HB_Error
HB_INTERNAL
HB_Error
_hb_buffer_add_output_glyph_ids
(
HB_Buffer
buffer
,
_hb_buffer_add_output_glyph_ids
(
hb_buffer_t
*
buffer
,
HB_UShort
num_in
,
unsigned
int
num_in
,
HB_UShort
num_out
,
unsigned
int
num_out
,
const
GlyphID
*
glyph_data
,
const
GlyphID
*
glyph_data
,
HB_UShort
component
,
unsigned
short
component
,
HB_UShort
ligID
)
unsigned
short
ligID
)
{
{
HB_Error
error
;
HB_Error
error
;
HB_UShor
t
i
;
unsigned
in
t
i
;
HB_UI
nt
properties
;
unsigned
i
nt
properties
;
HB_UI
nt
cluster
;
unsigned
i
nt
cluster
;
hb_buffer_ensure
(
buffer
,
buffer
->
out_pos
+
num_out
);
hb_buffer_ensure
(
buffer
,
buffer
->
out_pos
+
num_out
);
/* XXX */
/* XXX */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录