Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7235f33f
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看板
提交
7235f33f
编写于
6月 10, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix misc warnings reported by cppcheck
https://bugs.freedesktop.org/show_bug.cgi?id=65544
上级
570bcccd
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
30 addition
and
20 deletion
+30
-20
src/hb-common.cc
src/hb-common.cc
+1
-1
src/hb-coretext.cc
src/hb-coretext.cc
+0
-3
src/hb-font-private.hh
src/hb-font-private.hh
+11
-6
src/hb-private.hh
src/hb-private.hh
+1
-1
src/hb-shape.cc
src/hb-shape.cc
+1
-1
test/api/test-font.c
test/api/test-font.c
+0
-1
util/ansi-print.cc
util/ansi-print.cc
+1
-0
util/hb-ot-shape-closure.cc
util/hb-ot-shape-closure.cc
+3
-2
util/hb-shape.cc
util/hb-shape.cc
+4
-1
util/shape-consumer.hh
util/shape-consumer.hh
+4
-2
util/view-cairo.hh
util/view-cairo.hh
+4
-2
未找到文件。
src/hb-common.cc
浏览文件 @
7235f33f
...
...
@@ -243,8 +243,8 @@ hb_language_from_string (const char *str, int len)
if
(
!
str
||
!
len
||
!*
str
)
return
HB_LANGUAGE_INVALID
;
char
strbuf
[
32
];
if
(
len
>=
0
)
{
char
strbuf
[
64
];
len
=
MIN
(
len
,
(
int
)
sizeof
(
strbuf
)
-
1
);
str
=
(
char
*
)
memcpy
(
strbuf
,
str
,
len
);
strbuf
[
len
]
=
'\0'
;
...
...
src/hb-coretext.cc
浏览文件 @
7235f33f
...
...
@@ -178,7 +178,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
unsigned
int
num_features
)
{
hb_face_t
*
face
=
font
->
face
;
hb_coretext_shaper_face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_coretext_shaper_font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
#define FAIL(...) \
...
...
@@ -232,7 +231,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
CFArrayRef
glyph_runs
=
CTLineGetGlyphRuns
(
line
);
unsigned
int
num_runs
=
CFArrayGetCount
(
glyph_runs
);
bool
success
=
true
;
buffer
->
len
=
0
;
const
CFRange
range_all
=
CFRangeMake
(
0
,
0
);
...
...
@@ -287,7 +285,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
double
advance
=
(
j
+
1
<
num_glyphs
?
positions
[
j
+
1
].
x
:
positions
[
0
].
x
+
run_width
)
-
positions
[
j
].
x
;
hb_glyph_info_t
*
info
=
&
buffer
->
info
[
buffer
->
len
];
hb_glyph_position_t
*
pos
=
&
buffer
->
pos
[
buffer
->
len
];
info
->
codepoint
=
glyphs
[
j
];
info
->
cluster
=
string_indices
[
j
];
...
...
src/hb-font-private.hh
浏览文件 @
7235f33f
...
...
@@ -336,16 +336,21 @@ struct hb_font_t {
hb_direction_t
direction
,
hb_position_t
*
x
,
hb_position_t
*
y
)
{
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
{
hb_bool_t
ret
=
get_glyph_h_origin
(
glyph
,
x
,
y
);
if
(
!
ret
&&
(
ret
=
get_glyph_v_origin
(
glyph
,
x
,
y
)))
{
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
{
if
(
!
get_glyph_h_origin
(
glyph
,
x
,
y
)
&&
get_glyph_v_origin
(
glyph
,
x
,
y
))
{
hb_position_t
dx
,
dy
;
guess_v_origin_minus_h_origin
(
glyph
,
&
dx
,
&
dy
);
*
x
-=
dx
;
*
y
-=
dy
;
}
}
else
{
hb_bool_t
ret
=
get_glyph_v_origin
(
glyph
,
x
,
y
);
if
(
!
ret
&&
(
ret
=
get_glyph_h_origin
(
glyph
,
x
,
y
)))
{
}
else
{
if
(
!
get_glyph_v_origin
(
glyph
,
x
,
y
)
&&
get_glyph_h_origin
(
glyph
,
x
,
y
))
{
hb_position_t
dx
,
dy
;
guess_v_origin_minus_h_origin
(
glyph
,
&
dx
,
&
dy
);
*
x
+=
dx
;
*
y
+=
dy
;
...
...
src/hb-private.hh
浏览文件 @
7235f33f
...
...
@@ -595,7 +595,7 @@ _hb_debug_msg_va (const char *what,
#define ULBAR "\342\225\257"
/* U+256F BOX DRAWINGS LIGHT ARC UP AND LEFT */
#define LBAR "\342\225\264"
/* U+2574 BOX DRAWINGS LIGHT LEFT */
static
const
char
bars
[]
=
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
VBAR
;
fprintf
(
stderr
,
"%2
d
%s"
VRBAR
"%s"
,
fprintf
(
stderr
,
"%2
u
%s"
VRBAR
"%s"
,
level
,
bars
+
sizeof
(
bars
)
-
1
-
MIN
((
unsigned
int
)
sizeof
(
bars
),
(
unsigned
int
)
(
sizeof
(
VBAR
)
-
1
)
*
level
),
level_dir
?
(
level_dir
>
0
?
DLBAR
:
ULBAR
)
:
LBAR
);
...
...
src/hb-shape.cc
浏览文件 @
7235f33f
...
...
@@ -197,7 +197,7 @@ hb_feature_to_string (hb_feature_t *feature,
assert
(
len
<
ARRAY_LENGTH
(
s
));
len
=
MIN
(
len
,
size
-
1
);
memcpy
(
buf
,
s
,
len
);
s
[
len
]
=
'\0'
;
buf
[
len
]
=
'\0'
;
}
...
...
test/api/test-font.c
浏览文件 @
7235f33f
...
...
@@ -136,7 +136,6 @@ _test_font_nil_funcs (hb_font_t *font)
g_assert
(
!
hb_font_get_glyph
(
font
,
17
,
2
,
&
glyph
));
g_assert_cmpint
(
glyph
,
==
,
0
);
x
=
13
;
x
=
hb_font_get_glyph_h_kerning
(
font
,
17
,
19
);
g_assert_cmpint
(
x
,
==
,
0
);
}
...
...
util/ansi-print.cc
浏览文件 @
7235f33f
...
...
@@ -157,6 +157,7 @@ struct biimage_t
biimage_t
(
unsigned
int
width
,
unsigned
int
height
)
:
width
(
width
),
height
(
height
),
bg
(
0
),
fg
(
0
),
unicolor
(
true
),
data
((
uint8_t
*
)
malloc
(
sizeof
(
data
[
0
])
*
width
*
height
))
{}
~
biimage_t
(
void
)
{
free
(
data
);
}
...
...
util/hb-ot-shape-closure.cc
浏览文件 @
7235f33f
...
...
@@ -79,8 +79,9 @@ struct shape_closure_consumer_t : option_group_t
first
=
false
;
else
printf
(
" "
);
char
glyph_name
[
32
];
if
(
show_glyph_names
)
{
if
(
show_glyph_names
)
{
char
glyph_name
[
64
];
hb_font_get_glyph_name
(
font
,
i
,
glyph_name
,
sizeof
(
glyph_name
));
printf
(
"%s"
,
glyph_name
);
}
else
...
...
util/hb-shape.cc
浏览文件 @
7235f33f
...
...
@@ -33,7 +33,10 @@ struct output_buffer_t
output_buffer_t
(
option_parser_t
*
parser
)
:
options
(
parser
,
g_strjoinv
(
"/"
,
(
gchar
**
)
hb_buffer_serialize_list_formats
())),
format
(
parser
)
{}
format
(
parser
),
gs
(
NULL
),
line_no
(
0
),
font
(
NULL
)
{}
void
init
(
const
font_options_t
*
font_opts
)
{
...
...
util/shape-consumer.hh
浏览文件 @
7235f33f
...
...
@@ -34,8 +34,10 @@ template <typename output_t>
struct
shape_consumer_t
{
shape_consumer_t
(
option_parser_t
*
parser
)
:
shaper
(
parser
),
output
(
parser
)
{}
:
failed
(
false
),
shaper
(
parser
),
output
(
parser
),
font
(
NULL
)
{}
void
init
(
const
font_options_t
*
font_opts
)
{
...
...
util/view-cairo.hh
浏览文件 @
7235f33f
...
...
@@ -31,10 +31,12 @@
#define VIEW_CAIRO_HH
struct
view_cairo_t
{
struct
view_cairo_t
{
view_cairo_t
(
option_parser_t
*
parser
)
:
output_options
(
parser
,
helper_cairo_supported_formats
),
view_options
(
parser
)
{}
view_options
(
parser
),
lines
(
0
),
scale
(
1.0
)
{}
~
view_cairo_t
(
void
)
{
if
(
debug
)
cairo_debug_reset_static_data
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录