Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
31f18abe
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看板
提交
31f18abe
编写于
6月 15, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor compiler warning fixes
上级
e3693b72
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
48 addition
and
46 deletion
+48
-46
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+4
-4
src/hb-object-private.hh
src/hb-object-private.hh
+2
-2
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+3
-3
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+4
-4
src/hb-ot-map.cc
src/hb-ot-map.cc
+15
-13
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+1
-2
src/hb-view.cc
src/hb-view.cc
+6
-5
test/test-object.c
test/test-object.c
+11
-11
test/test-unicode.c
test/test-unicode.c
+2
-2
未找到文件。
src/hb-buffer-private.hh
浏览文件 @
31f18abe
...
...
@@ -128,13 +128,13 @@ struct _hb_buffer_t {
inline
void
reset_masks
(
hb_mask_t
mask
)
{
for
(
unsigned
int
i
=
0
;
i
<
len
;
i
++
)
info
[
i
].
mask
=
mask
;
for
(
unsigned
int
j
=
0
;
j
<
len
;
j
++
)
info
[
j
].
mask
=
mask
;
}
inline
void
add_masks
(
hb_mask_t
mask
)
{
for
(
unsigned
int
i
=
0
;
i
<
len
;
i
++
)
info
[
i
].
mask
|=
mask
;
for
(
unsigned
int
j
=
0
;
j
<
len
;
j
++
)
info
[
j
].
mask
|=
mask
;
}
inline
void
set_masks
(
hb_mask_t
value
,
hb_mask_t
mask
,
...
...
src/hb-object-private.hh
浏览文件 @
31f18abe
...
...
@@ -179,11 +179,11 @@ struct _hb_object_header_t {
inline
bool
set_user_data
(
hb_user_data_key_t
*
key
,
void
*
data
,
hb_destroy_func_t
destroy
)
{
hb_destroy_func_t
destroy
_func
)
{
if
(
unlikely
(
!
this
||
this
->
is_inert
()))
return
false
;
return
user_data
.
set
(
key
,
data
,
destroy
);
return
user_data
.
set
(
key
,
data
,
destroy
_func
);
}
inline
void
*
get_user_data
(
hb_user_data_key_t
*
key
)
{
...
...
src/hb-open-type-private.hh
浏览文件 @
31f18abe
...
...
@@ -151,7 +151,7 @@ ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
template
<
int
max_depth
>
struct
hb_trace_t
{
explicit
hb_trace_t
(
unsigned
int
*
pdepth
,
const
char
*
what
,
const
char
*
function
,
const
void
*
obj
)
:
pdepth
(
pdepth
)
{
explicit
hb_trace_t
(
unsigned
int
*
pdepth
_
,
const
char
*
what
,
const
char
*
function
,
const
void
*
obj
)
:
pdepth
(
pdepth_
)
{
(
void
)
(
*
pdepth
<
max_depth
&&
fprintf
(
stderr
,
"%s(%p) %-*d-> %s
\n
"
,
what
,
obj
,
*
pdepth
,
*
pdepth
,
function
));
if
(
max_depth
)
++*
pdepth
;
...
...
@@ -183,9 +183,9 @@ struct hb_trace_t<0> {
struct
hb_sanitize_context_t
{
inline
void
init
(
hb_blob_t
*
b
lob
)
inline
void
init
(
hb_blob_t
*
b
)
{
this
->
blob
=
hb_blob_reference
(
b
lob
);
this
->
blob
=
hb_blob_reference
(
b
);
this
->
writable
=
false
;
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
31f18abe
...
...
@@ -89,10 +89,10 @@ struct RecordArrayOf : SortedArrayOf<Record<Type> > {
hb_tag_t
*
record_tags
/* OUT */
)
const
{
if
(
record_count
)
{
const
Record
<
Type
>
*
arr
ay
=
this
->
sub_array
(
start_offset
,
record_count
);
const
Record
<
Type
>
*
arr
=
this
->
sub_array
(
start_offset
,
record_count
);
unsigned
int
count
=
*
record_count
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
record_tags
[
i
]
=
arr
ay
[
i
].
tag
;
record_tags
[
i
]
=
arr
[
i
].
tag
;
}
return
this
->
len
;
}
...
...
@@ -150,10 +150,10 @@ struct IndexArray : ArrayOf<Index>
unsigned
int
*
_indexes
/* OUT */
)
const
{
if
(
_count
)
{
const
USHORT
*
arr
ay
=
this
->
sub_array
(
start_offset
,
_count
);
const
USHORT
*
arr
=
this
->
sub_array
(
start_offset
,
_count
);
unsigned
int
count
=
*
_count
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
_indexes
[
i
]
=
arr
ay
[
i
];
_indexes
[
i
]
=
arr
[
i
];
}
return
this
->
len
;
}
...
...
src/hb-ot-map.cc
浏览文件 @
31f18abe
...
...
@@ -104,21 +104,23 @@ hb_ot_map_builder_t::compile (hb_face_t *face,
/* Sort features and merge duplicates */
feature_infos
.
sort
();
unsigned
int
j
=
0
;
for
(
unsigned
int
i
=
1
;
i
<
feature_infos
.
len
;
i
++
)
if
(
feature_infos
[
i
].
tag
!=
feature_infos
[
j
].
tag
)
feature_infos
[
++
j
]
=
feature_infos
[
i
];
else
{
if
(
feature_infos
[
i
].
global
)
feature_infos
[
j
]
=
feature_infos
[
i
];
{
feature_infos
.
sort
();
unsigned
int
j
=
0
;
for
(
unsigned
int
i
=
1
;
i
<
feature_infos
.
len
;
i
++
)
if
(
feature_infos
[
i
].
tag
!=
feature_infos
[
j
].
tag
)
feature_infos
[
++
j
]
=
feature_infos
[
i
];
else
{
feature_infos
[
j
].
global
=
false
;
feature_infos
[
j
].
max_value
=
MAX
(
feature_infos
[
j
].
max_value
,
feature_infos
[
i
].
max_value
);
/* Inherit default_value from j */
if
(
feature_infos
[
i
].
global
)
feature_infos
[
j
]
=
feature_infos
[
i
];
else
{
feature_infos
[
j
].
global
=
false
;
feature_infos
[
j
].
max_value
=
MAX
(
feature_infos
[
j
].
max_value
,
feature_infos
[
i
].
max_value
);
/* Inherit default_value from j */
}
}
}
feature_infos
.
shrink
(
j
+
1
);
feature_infos
.
shrink
(
j
+
1
);
}
/* Allocate bits now */
...
...
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
31f18abe
...
...
@@ -121,8 +121,7 @@ enum {
static
const
struct
arabic_state_table_entry
{
uint8_t
prev_action
;
uint8_t
curr_action
;
uint8_t
next_state
;
uint8_t
padding
;
uint16_t
next_state
;
}
arabic_state_table
[][
NUM_STATE_MACHINE_COLS
]
=
{
/* jt_U, jt_R, jt_D, jg_ALAPH, jg_DALATH_RISH */
...
...
src/hb-view.cc
浏览文件 @
31f18abe
...
...
@@ -72,8 +72,6 @@ static int height = 0;
static
cairo_surface_t
*
surface
=
NULL
;
static
cairo_pattern_t
*
fore_pattern
=
NULL
;
static
cairo_pattern_t
*
back_pattern
=
NULL
;
static
FT_Library
ft_library
;
static
FT_Face
ft_face
;
static
cairo_font_face_t
*
cairo_face
;
...
...
@@ -141,6 +139,7 @@ parse_opts (int argc, char **argv)
break
;
case
'm'
:
switch
(
sscanf
(
optarg
,
"%d %d %d %d"
,
&
margin_t
,
&
margin_r
,
&
margin_b
,
&
margin_l
))
{
default:
break
;
case
1
:
margin_r
=
margin_t
;
case
2
:
margin_b
=
margin_t
;
case
3
:
margin_l
=
margin_r
;
...
...
@@ -346,7 +345,7 @@ static void parse_features (char *s)
static
cairo_glyph_t
*
_hb_cr_text_glyphs
(
cairo_t
*
cr
,
const
char
*
text
,
int
len
,
const
char
*
utf8
,
int
len
,
unsigned
int
*
pnum_glyphs
)
{
cairo_scaled_font_t
*
scaled_font
=
cairo_get_scaled_font
(
cr
);
...
...
@@ -369,8 +368,8 @@ _hb_cr_text_glyphs (cairo_t *cr,
hb_buffer_set_language
(
hb_buffer
,
hb_language_from_string
(
language
));
if
(
len
<
0
)
len
=
strlen
(
text
);
hb_buffer_add_utf8
(
hb_buffer
,
text
,
len
,
0
,
len
);
len
=
strlen
(
utf8
);
hb_buffer_add_utf8
(
hb_buffer
,
utf8
,
len
,
0
,
len
);
hb_shape
(
hb_font
,
hb_buffer
,
features
,
num_features
);
...
...
@@ -526,6 +525,8 @@ draw (void)
int
main
(
int
argc
,
char
**
argv
)
{
static
FT_Library
ft_library
;
static
FT_Face
ft_face
;
cairo_status_t
status
;
setlocale
(
LC_ALL
,
""
);
...
...
test/test-object.c
浏览文件 @
31f18abe
...
...
@@ -231,7 +231,7 @@ test_object (void)
hb_user_data_key_t
key
[
2
];
{
unsigned
int
i
;
unsigned
int
j
;
data_t
data
[
2
]
=
{{
MAGIC0
,
FALSE
},
{
MAGIC1
,
FALSE
}};
deadlock_test_t
deadlock_test
;
...
...
@@ -282,16 +282,16 @@ test_object (void)
g_assert_cmpuint
(
global_data
,
==
,
1
);
global_data
=
0
;
for
(
i
=
2
;
i
<
1000
;
i
++
)
g_assert
(
o
->
set_user_data
(
obj
,
&
key
[
i
],
&
data
[
i
],
global_free_up
));
for
(
i
=
2
;
i
<
1000
;
i
++
)
g_assert
(
o
->
get_user_data
(
obj
,
&
key
[
i
])
==
&
data
[
i
]);
for
(
i
=
100
;
i
<
1000
;
i
++
)
g_assert
(
o
->
set_user_data
(
obj
,
&
key
[
i
],
NULL
,
NULL
));
for
(
i
=
2
;
i
<
100
;
i
++
)
g_assert
(
o
->
get_user_data
(
obj
,
&
key
[
i
])
==
&
data
[
i
]);
for
(
i
=
100
;
i
<
1000
;
i
++
)
g_assert
(
!
o
->
get_user_data
(
obj
,
&
key
[
i
]));
for
(
j
=
2
;
j
<
1000
;
j
++
)
g_assert
(
o
->
set_user_data
(
obj
,
&
key
[
j
],
&
data
[
j
],
global_free_up
));
for
(
j
=
2
;
j
<
1000
;
j
++
)
g_assert
(
o
->
get_user_data
(
obj
,
&
key
[
j
])
==
&
data
[
j
]);
for
(
j
=
100
;
j
<
1000
;
j
++
)
g_assert
(
o
->
set_user_data
(
obj
,
&
key
[
j
],
NULL
,
NULL
));
for
(
j
=
2
;
j
<
100
;
j
++
)
g_assert
(
o
->
get_user_data
(
obj
,
&
key
[
j
])
==
&
data
[
j
]);
for
(
j
=
100
;
j
<
1000
;
j
++
)
g_assert
(
!
o
->
get_user_data
(
obj
,
&
key
[
j
]));
g_assert_cmpuint
(
global_data
,
==
,
900
);
/* Test set_user_data where the destroy() func calls user_data functions.
...
...
test/test-unicode.c
浏览文件 @
31f18abe
...
...
@@ -511,9 +511,9 @@ test_unicode_properties (gconstpointer user_data)
}
static
hb_codepoint_t
default_value
(
hb_codepoint_t
default_value
,
hb_codepoint_t
unicode
)
default_value
(
hb_codepoint_t
_
default_value
,
hb_codepoint_t
unicode
)
{
return
default_value
==
RETURNS_UNICODE_ITSELF
?
unicode
:
default_value
;
return
_default_value
==
RETURNS_UNICODE_ITSELF
?
unicode
:
_
default_value
;
}
static
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录