Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7ee5c523
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看板
未验证
提交
7ee5c523
编写于
12月 12, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
12月 12, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor style fix, use void in methods on no argument
上级
a33f238f
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
211 addition
and
262 deletion
+211
-262
src/hb-aat-fdsc-table.hh
src/hb-aat-fdsc-table.hh
+2
-2
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+2
-4
src/hb-aat-layout-feat-table.hh
src/hb-aat-layout-feat-table.hh
+2
-2
src/hb-aat-layout-trak-table.hh
src/hb-aat-layout-trak-table.hh
+6
-12
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+3
-1
src/hb-buffer.cc
src/hb-buffer.cc
+24
-24
src/hb-directwrite.cc
src/hb-directwrite.cc
+141
-156
src/hb-dsalgs.hh
src/hb-dsalgs.hh
+2
-3
src/hb-map.hh
src/hb-map.hh
+5
-15
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+1
-1
src/hb-ot-color-cbdt-table.hh
src/hb-ot-color-cbdt-table.hh
+1
-1
src/hb-ot-color-cpal-table.hh
src/hb-ot-color-cpal-table.hh
+2
-2
src/hb-ot-color-sbix-table.hh
src/hb-ot-color-sbix-table.hh
+2
-8
src/hb-ot-color-svg-table.hh
src/hb-ot-color-svg-table.hh
+4
-11
src/hb-ot-glyf-table.hh
src/hb-ot-glyf-table.hh
+1
-1
src/hb-ot-hdmx-table.hh
src/hb-ot-hdmx-table.hh
+2
-4
src/hb-ot-layout-base-table.hh
src/hb-ot-layout-base-table.hh
+5
-6
src/hb-ot-os2-table.hh
src/hb-ot-os2-table.hh
+6
-9
未找到文件。
src/hb-aat-fdsc-table.hh
浏览文件 @
7ee5c523
...
...
@@ -40,11 +40,11 @@ namespace AAT {
struct
FontDescriptor
{
inline
bool
has_data
()
const
{
return
tag
;
}
inline
bool
has_data
(
void
)
const
{
return
tag
;
}
inline
int
cmp
(
hb_tag_t
a
)
const
{
return
tag
.
cmp
(
a
);
}
inline
float
get_value
()
const
{
return
u
.
value
.
to_float
();
}
inline
float
get_value
(
void
)
const
{
return
u
.
value
.
to_float
();
}
enum
non_alphabetic_value_t
{
Alphabetic
=
0
,
...
...
src/hb-aat-layout-common.hh
浏览文件 @
7ee5c523
...
...
@@ -513,10 +513,8 @@ struct StateTable
return
(
this
+
classTable
).
get_class
(
glyph_id
,
num_glyphs
,
1
);
}
inline
const
Entry
<
Extra
>
*
get_entries
()
const
{
return
(
this
+
entryTable
).
arrayZ
;
}
inline
const
Entry
<
Extra
>
*
get_entries
(
void
)
const
{
return
(
this
+
entryTable
).
arrayZ
;
}
inline
const
Entry
<
Extra
>
*
get_entryZ
(
int
state
,
unsigned
int
klass
)
const
{
...
...
src/hb-aat-layout-feat-table.hh
浏览文件 @
7ee5c523
...
...
@@ -125,10 +125,10 @@ struct FeatureName
return
settings_table
.
len
;
}
inline
hb_aat_layout_feature_type_t
get_feature_type
()
const
inline
hb_aat_layout_feature_type_t
get_feature_type
(
void
)
const
{
return
(
hb_aat_layout_feature_type_t
)
(
unsigned
int
)
feature
;
}
inline
hb_ot_name_id_t
get_feature_name_id
()
const
{
return
nameIndex
;
}
inline
hb_ot_name_id_t
get_feature_name_id
(
void
)
const
{
return
nameIndex
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
)
const
{
...
...
src/hb-aat-layout-trak-table.hh
浏览文件 @
7ee5c523
...
...
@@ -46,25 +46,19 @@ struct TrackTableEntry
{
friend
struct
TrackData
;
inline
float
get_track_value
()
const
{
return
track
.
to_float
();
}
inline
float
get_track_value
(
void
)
const
{
return
track
.
to_float
();
}
inline
int
get_value
(
const
void
*
base
,
unsigned
int
index
,
unsigned
int
nSizes
)
const
{
return
(
base
+
valuesZ
).
as_array
(
nSizes
)[
index
];
}
inline
int
get_value
(
const
void
*
base
,
unsigned
int
index
,
unsigned
int
table_size
)
const
{
return
(
base
+
valuesZ
).
as_array
(
table_size
)[
index
];
}
public:
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
unsigned
int
nSizes
)
const
unsigned
int
table_size
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
likely
(
c
->
check_struct
(
this
)
&&
(
valuesZ
.
sanitize
(
c
,
base
,
nSizes
))));
(
valuesZ
.
sanitize
(
c
,
base
,
table_size
))));
}
protected:
...
...
src/hb-aat-layout.cc
浏览文件 @
7ee5c523
...
...
@@ -361,7 +361,9 @@ hb_aat_layout_get_feature_types (hb_face_t *face,
hb_ot_name_id_t
hb_aat_layout_feature_type_get_name_id
(
hb_face_t
*
face
,
hb_aat_layout_feature_type_t
feature_type
)
{
return
face
->
table
.
feat
->
get_feature_name_id
(
feature_type
);
}
{
return
face
->
table
.
feat
->
get_feature_name_id
(
feature_type
);
}
/**
* hb_aat_layout_feature_type_get_selectors:
...
...
src/hb-buffer.cc
浏览文件 @
7ee5c523
...
...
@@ -574,7 +574,7 @@ hb_buffer_t::merge_out_clusters (unsigned int start,
set_cluster
(
out_info
[
i
],
cluster
);
}
void
hb_buffer_t
::
delete_glyph
()
hb_buffer_t
::
delete_glyph
(
void
)
{
/* The logic here is duplicated in hb_ot_hide_default_ignorables(). */
...
...
@@ -727,7 +727,7 @@ hb_buffer_create (void)
/**
* hb_buffer_get_empty:
*
*
*
*
* Return value: (transfer full):
*
...
...
@@ -785,14 +785,14 @@ hb_buffer_destroy (hb_buffer_t *buffer)
/**
* hb_buffer_set_user_data: (skip)
* @buffer: an #hb_buffer_t.
* @key:
* @data:
* @destroy:
* @replace:
* @key:
* @data:
* @destroy:
* @replace:
*
*
*
* Return value:
*
* Return value:
*
* Since: 0.9.2
**/
...
...
@@ -809,11 +809,11 @@ hb_buffer_set_user_data (hb_buffer_t *buffer,
/**
* hb_buffer_get_user_data: (skip)
* @buffer: an #hb_buffer_t.
* @key:
* @key:
*
*
*
* Return value:
*
* Return value:
*
* Since: 0.9.2
**/
...
...
@@ -863,9 +863,9 @@ hb_buffer_get_content_type (hb_buffer_t *buffer)
/**
* hb_buffer_set_unicode_funcs:
* @buffer: an #hb_buffer_t.
* @unicode_funcs:
* @unicode_funcs:
*
*
*
*
* Since: 0.9.2
**/
...
...
@@ -888,9 +888,9 @@ hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
* hb_buffer_get_unicode_funcs:
* @buffer: an #hb_buffer_t.
*
*
*
* Return value:
*
* Return value:
*
* Since: 0.9.2
**/
...
...
@@ -1094,7 +1094,7 @@ hb_buffer_set_flags (hb_buffer_t *buffer,
*
* See hb_buffer_set_flags().
*
* Return value:
* Return value:
* The @buffer flags.
*
* Since: 0.9.7
...
...
@@ -1108,9 +1108,9 @@ hb_buffer_get_flags (hb_buffer_t *buffer)
/**
* hb_buffer_set_cluster_level:
* @buffer: an #hb_buffer_t.
* @cluster_level:
* @cluster_level:
*
*
*
*
* Since: 0.9.42
**/
...
...
@@ -1128,9 +1128,9 @@ hb_buffer_set_cluster_level (hb_buffer_t *buffer,
* hb_buffer_get_cluster_level:
* @buffer: an #hb_buffer_t.
*
*
*
* Return value:
*
* Return value:
*
* Since: 0.9.42
**/
...
...
@@ -1169,7 +1169,7 @@ hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer,
*
* See hb_buffer_set_replacement_codepoint().
*
* Return value:
* Return value:
* The @buffer replacement #hb_codepoint_t.
*
* Since: 0.9.31
...
...
@@ -1209,7 +1209,7 @@ hb_buffer_set_invisible_glyph (hb_buffer_t *buffer,
*
* See hb_buffer_set_invisible_glyph().
*
* Return value:
* Return value:
* The @buffer invisible #hb_codepoint_t.
*
* Since: 2.0.0
...
...
@@ -1320,7 +1320,7 @@ hb_buffer_add (hb_buffer_t *buffer,
* Similar to hb_buffer_pre_allocate(), but clears any new items added at the
* end.
*
* Return value:
* Return value:
* %true if @buffer memory allocation succeeded, %false otherwise.
*
* Since: 0.9.2
...
...
@@ -2000,7 +2000,7 @@ hb_buffer_diff (hb_buffer_t *buffer,
* @user_data:
* @destroy:
*
*
*
*
* Since: 1.1.3
**/
...
...
src/hb-directwrite.cc
浏览文件 @
7ee5c523
此差异已折叠。
点击以展开。
src/hb-dsalgs.hh
浏览文件 @
7ee5c523
...
...
@@ -619,8 +619,7 @@ struct hb_array_t
return
not_found
;
}
template
<
typename
T
>
inline
const
Type
*
lsearch
(
const
T
&
x
,
const
Type
*
not_found
=
nullptr
)
const
inline
const
Type
*
lsearch
(
const
T
&
x
,
const
Type
*
not_found
=
nullptr
)
const
{
unsigned
int
count
=
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -799,7 +798,7 @@ struct hb_vector_size_t
{
return
process
<
HbOpAnd
>
(
o
);
}
inline
hb_vector_size_t
operator
^
(
const
hb_vector_size_t
&
o
)
const
{
return
process
<
HbOpXor
>
(
o
);
}
inline
hb_vector_size_t
operator
~
()
const
inline
hb_vector_size_t
operator
~
(
void
)
const
{
hb_vector_size_t
r
;
#if HB_VECTOR_SIZE && 0
...
...
src/hb-map.hh
浏览文件 @
7ee5c523
...
...
@@ -156,14 +156,10 @@ struct hb_map_t
return
items
[
i
].
key
==
key
?
items
[
i
].
value
:
INVALID
;
}
inline
void
del
(
hb_codepoint_t
key
)
{
set
(
key
,
INVALID
);
}
inline
void
del
(
hb_codepoint_t
key
)
{
set
(
key
,
INVALID
);
}
inline
bool
has
(
hb_codepoint_t
key
)
const
{
return
get
(
key
)
!=
INVALID
;
}
{
return
get
(
key
)
!=
INVALID
;
}
inline
hb_codepoint_t
operator
[]
(
unsigned
int
key
)
const
{
return
get
(
key
);
}
...
...
@@ -176,15 +172,9 @@ struct hb_map_t
population
=
occupancy
=
0
;
}
inline
bool
is_empty
(
void
)
const
{
return
population
==
0
;
}
inline
bool
is_empty
(
void
)
const
{
return
population
==
0
;
}
inline
unsigned
int
get_population
()
const
{
return
population
;
}
inline
unsigned
int
get_population
(
void
)
const
{
return
population
;
}
protected:
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
7ee5c523
...
...
@@ -847,7 +847,7 @@ struct cmap
struct
subset_plan
{
inline
size_t
final_size
()
const
inline
size_t
final_size
(
void
)
const
{
return
4
// header
+
8
*
3
// 3 EncodingRecord
...
...
src/hb-ot-color-cbdt-table.hh
浏览文件 @
7ee5c523
...
...
@@ -505,7 +505,7 @@ struct CBDT
return
hb_blob_get_empty
();
}
inline
bool
has_data
()
const
{
return
cbdt
.
get_length
();
}
inline
bool
has_data
(
void
)
const
{
return
cbdt
.
get_length
();
}
private:
hb_blob_ptr_t
<
CBLC
>
cblc
;
...
...
src/hb-ot-color-cpal-table.hh
浏览文件 @
7ee5c523
...
...
@@ -117,8 +117,8 @@ struct CPAL
inline
unsigned
int
get_size
(
void
)
const
{
return
min_size
+
numPalettes
*
sizeof
(
colorRecordIndicesZ
[
0
]);
}
inline
unsigned
int
get_palette_count
()
const
{
return
numPalettes
;
}
inline
unsigned
int
get_color_count
(
)
const
{
return
numColors
;
}
inline
unsigned
int
get_palette_count
(
void
)
const
{
return
numPalettes
;
}
inline
unsigned
int
get_color_count
(
void
)
const
{
return
numColors
;
}
inline
hb_ot_color_palette_flags_t
get_palette_flags
(
unsigned
int
palette_index
)
const
{
return
v1
().
get_palette_flags
(
this
,
palette_index
,
numPalettes
);
}
...
...
src/hb-ot-color-sbix-table.hh
浏览文件 @
7ee5c523
...
...
@@ -144,15 +144,9 @@ struct sbix
num_glyphs
=
face
->
get_num_glyphs
();
}
inline
void
fini
(
void
)
{
table
.
destroy
();
}
inline
void
fini
(
void
)
{
table
.
destroy
();
}
inline
bool
has_data
()
const
{
return
table
->
has_data
();
}
inline
bool
has_data
(
void
)
const
{
return
table
->
has_data
();
}
inline
bool
get_extents
(
hb_font_t
*
font
,
hb_codepoint_t
glyph
,
...
...
src/hb-ot-color-svg-table.hh
浏览文件 @
7ee5c523
...
...
@@ -80,14 +80,9 @@ struct SVG
struct
accelerator_t
{
inline
void
init
(
hb_face_t
*
face
)
{
table
=
hb_sanitize_context_t
().
reference_table
<
SVG
>
(
face
);
}
{
table
=
hb_sanitize_context_t
().
reference_table
<
SVG
>
(
face
);
}
inline
void
fini
(
void
)
{
table
.
destroy
();
}
inline
void
fini
(
void
)
{
table
.
destroy
();
}
inline
hb_blob_t
*
reference_blob_for_glyph
(
hb_codepoint_t
glyph_id
)
const
{
...
...
@@ -95,16 +90,14 @@ struct SVG
table
->
svgDocEntries
);
}
inline
bool
has_data
()
const
{
return
table
->
has_data
();
}
inline
bool
has_data
(
void
)
const
{
return
table
->
has_data
();
}
private:
hb_blob_ptr_t
<
SVG
>
table
;
};
inline
const
SVGDocumentIndexEntry
&
get_glyph_entry
(
hb_codepoint_t
glyph_id
)
const
{
return
(
this
+
svgDocEntries
).
bsearch
(
glyph_id
);
}
{
return
(
this
+
svgDocEntries
).
bsearch
(
glyph_id
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
...
...
src/hb-ot-glyf-table.hh
浏览文件 @
7ee5c523
...
...
@@ -177,7 +177,7 @@ struct glyf
const
char
*
glyph_end
;
const
CompositeGlyphHeader
*
current
;
inline
bool
move_to_next
()
inline
bool
move_to_next
(
void
)
{
if
(
current
->
flags
&
CompositeGlyphHeader
::
MORE_COMPONENTS
)
{
...
...
src/hb-ot-hdmx-table.hh
浏览文件 @
7ee5c523
...
...
@@ -56,10 +56,8 @@ struct DeviceRecord
this
->
subset_plan
=
subset_plan
;
}
inline
unsigned
int
len
()
const
{
return
this
->
subset_plan
->
glyphs
.
len
;
}
inline
unsigned
int
len
(
void
)
const
{
return
this
->
subset_plan
->
glyphs
.
len
;
}
inline
const
HBUINT8
*
operator
[]
(
unsigned
int
i
)
const
{
...
...
src/hb-ot-layout-base-table.hh
浏览文件 @
7ee5c523
...
...
@@ -44,7 +44,7 @@ namespace OT {
struct
BaseCoordFormat1
{
inline
hb_position_t
get_coord
()
const
{
return
coordinate
;
}
inline
hb_position_t
get_coord
(
void
)
const
{
return
coordinate
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
...
...
@@ -61,7 +61,7 @@ struct BaseCoordFormat1
struct
BaseCoordFormat2
{
inline
hb_position_t
get_coord
()
const
inline
hb_position_t
get_coord
(
void
)
const
{
/* TODO */
return
coordinate
;
...
...
@@ -280,7 +280,7 @@ struct BaseLangSysRecord
0
;
}
inline
const
MinMax
&
get_min_max
()
const
inline
const
MinMax
&
get_min_max
(
void
)
const
{
return
this
+
minMax
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
)
const
...
...
@@ -315,8 +315,7 @@ struct BaseScript
inline
const
BaseCoord
&
get_base_coord
(
int
baseline_tag_index
)
const
{
return
(
this
+
baseValues
).
get_base_coord
(
baseline_tag_index
);
}
inline
bool
is_empty
()
const
{
return
!
baseValues
;
}
inline
bool
is_empty
(
void
)
const
{
return
!
baseValues
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
...
...
@@ -470,7 +469,7 @@ struct BASE
inline
const
Axis
&
get_axis
(
hb_direction_t
direction
)
const
{
return
HB_DIRECTION_IS_VERTICAL
(
direction
)
?
this
+
vAxis
:
this
+
hAxis
;
}
inline
const
VariationStore
&
get_var_store
()
const
inline
const
VariationStore
&
get_var_store
(
void
)
const
{
return
version
.
to_int
()
<
0x00010001u
?
Null
(
VariationStore
)
:
this
+
varStore
;
}
inline
bool
get_baseline
(
hb_font_t
*
font
,
...
...
src/hb-ot-os2-table.hh
浏览文件 @
7ee5c523
/*
* Copyright © 2011,2012 Google, Inc.
* Copyright © 2018 Ebrahim Byagowi
*
* This is part of HarfBuzz, a text shaping library.
*
...
...
@@ -93,13 +94,13 @@ struct OS2
{
enum
{
tableTag
=
HB_OT_TAG_OS2
};
inline
bool
has_data
()
const
{
return
this
!=
&
Null
(
OS2
);
}
inline
bool
has_data
(
void
)
const
{
return
this
!=
&
Null
(
OS2
);
}
inline
const
OS2V1Tail
&
v1
(
void
)
const
{
return
version
>=
1
?
v1X
:
Null
(
OS2V1Tail
);
}
inline
const
OS2V2Tail
&
v2
(
void
)
const
{
return
version
>=
2
?
v2X
:
Null
(
OS2V2Tail
);
}
inline
const
OS2V5Tail
&
v5
(
void
)
const
{
return
version
>=
5
?
v5X
:
Null
(
OS2V5Tail
);
}
enum
fs_
selection_flag_t
{
enum
selection_flag_t
{
ITALIC
=
1u
<<
0
,
UNDERSCORE
=
1u
<<
1
,
NEGATIVE
=
1u
<<
2
,
...
...
@@ -128,7 +129,7 @@ struct OS2
FWIDTH_ULTRA_EXPANDED
=
9
/* 200% */
};
inline
float
get_width
()
const
inline
float
get_width
(
void
)
const
{
switch
(
usWidthClass
)
{
case
FWIDTH_ULTRA_CONDENSED
:
return
50.
f
;
...
...
@@ -214,12 +215,8 @@ struct OS2
};
// https://github.com/Microsoft/Font-Validator/blob/520aaae/OTFontFileVal/val_OS2.cs#L644-L681
inline
font_page_t
get_font_page
()
const
{
if
(
version
!=
0
)
return
(
font_page_t
)
0
;
return
(
font_page_t
)
(
fsSelection
&
0xFF00
);
}
inline
font_page_t
get_font_page
(
void
)
const
{
return
(
font_page_t
)
(
version
==
0
?
fsSelection
&
0xFF00
:
0
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录