Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
46cc4a3a
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看板
提交
46cc4a3a
编写于
9月 27, 2016
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MATH] Rename hb_math_*_t types to hb_ot_math_*_t
With this, I believe MATH table API is not ready to be merged.
上级
db5ebcf1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
23 deletion
+23
-23
docs/harfbuzz-sections.txt
docs/harfbuzz-sections.txt
+3
-3
src/hb-ot-layout-math-table.hh
src/hb-ot-layout-math-table.hh
+6
-6
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+4
-4
src/hb-ot-math.h
src/hb-ot-math.h
+8
-8
test/api/test-ot-math.c
test/api/test-ot-math.c
+2
-2
未找到文件。
docs/harfbuzz-sections.txt
浏览文件 @
46cc4a3a
...
@@ -426,10 +426,10 @@ Xhb_ot_layout_lookup_substitute
...
@@ -426,10 +426,10 @@ Xhb_ot_layout_lookup_substitute
<FILE>hb-ot-math</FILE>
<FILE>hb-ot-math</FILE>
HB_OT_TAG_MATH
HB_OT_TAG_MATH
HB_OT_MATH_SCRIPT
HB_OT_MATH_SCRIPT
hb_math_glyph_part_flags_t
hb_math_glyph_part_t
hb_math_glyph_variant_t
hb_ot_math_constant_t
hb_ot_math_constant_t
hb_ot_math_glyph_part_flags_t
hb_ot_math_glyph_part_t
hb_ot_math_glyph_variant_t
hb_ot_math_get_constant
hb_ot_math_get_constant
hb_ot_math_get_glyph_assembly
hb_ot_math_get_glyph_assembly
hb_ot_math_get_glyph_italics_correction
hb_ot_math_get_glyph_italics_correction
...
...
src/hb-ot-layout-math-table.hh
浏览文件 @
46cc4a3a
...
@@ -453,7 +453,7 @@ struct MathGlyphPartRecord
...
@@ -453,7 +453,7 @@ struct MathGlyphPartRecord
return_trace
(
c
->
check_struct
(
this
));
return_trace
(
c
->
check_struct
(
this
));
}
}
inline
void
extract
(
hb_math_glyph_part_t
&
out
,
inline
void
extract
(
hb_
ot_
math_glyph_part_t
&
out
,
int
scale
,
int
scale
,
hb_font_t
*
font
)
const
hb_font_t
*
font
)
const
{
{
...
@@ -466,7 +466,7 @@ struct MathGlyphPartRecord
...
@@ -466,7 +466,7 @@ struct MathGlyphPartRecord
ASSERT_STATIC
((
unsigned
int
)
HB_MATH_GLYPH_PART_FLAG_EXTENDER
==
ASSERT_STATIC
((
unsigned
int
)
HB_MATH_GLYPH_PART_FLAG_EXTENDER
==
(
unsigned
int
)
PartFlags
::
Extender
);
(
unsigned
int
)
PartFlags
::
Extender
);
out
.
flags
=
(
hb_math_glyph_part_flags_t
)
out
.
flags
=
(
hb_
ot_
math_glyph_part_flags_t
)
(
unsigned
int
)
(
unsigned
int
)
(
partFlags
&
PartFlags
::
Defined
);
(
partFlags
&
PartFlags
::
Defined
);
}
}
...
@@ -504,7 +504,7 @@ struct MathGlyphAssembly
...
@@ -504,7 +504,7 @@ struct MathGlyphAssembly
hb_font_t
*
font
,
hb_font_t
*
font
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
parts_count
,
/* IN/OUT */
unsigned
int
*
parts_count
,
/* IN/OUT */
hb_math_glyph_part_t
*
parts
/* OUT */
,
hb_
ot_
math_glyph_part_t
*
parts
/* OUT */
,
hb_position_t
*
italics_correction
/* OUT */
)
const
hb_position_t
*
italics_correction
/* OUT */
)
const
{
{
if
(
parts_count
)
if
(
parts_count
)
...
@@ -552,7 +552,7 @@ struct MathGlyphConstruction
...
@@ -552,7 +552,7 @@ struct MathGlyphConstruction
hb_font_t
*
font
,
hb_font_t
*
font
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
variants_count
,
/* IN/OUT */
unsigned
int
*
variants_count
,
/* IN/OUT */
hb_math_glyph_variant_t
*
variants
/* OUT */
)
const
hb_
ot_
math_glyph_variant_t
*
variants
/* OUT */
)
const
{
{
if
(
variants_count
)
if
(
variants_count
)
{
{
...
@@ -613,7 +613,7 @@ struct MathVariants
...
@@ -613,7 +613,7 @@ struct MathVariants
hb_font_t
*
font
,
hb_font_t
*
font
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
variants_count
,
/* IN/OUT */
unsigned
int
*
variants_count
,
/* IN/OUT */
hb_math_glyph_variant_t
*
variants
/* OUT */
)
const
hb_
ot_
math_glyph_variant_t
*
variants
/* OUT */
)
const
{
return
get_glyph_construction
(
glyph
,
direction
,
font
)
{
return
get_glyph_construction
(
glyph
,
direction
,
font
)
.
get_variants
(
direction
,
font
,
start_offset
,
variants_count
,
variants
);
}
.
get_variants
(
direction
,
font
,
start_offset
,
variants_count
,
variants
);
}
...
@@ -622,7 +622,7 @@ struct MathVariants
...
@@ -622,7 +622,7 @@ struct MathVariants
hb_font_t
*
font
,
hb_font_t
*
font
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
parts_count
,
/* IN/OUT */
unsigned
int
*
parts_count
,
/* IN/OUT */
hb_math_glyph_part_t
*
parts
/* OUT */
,
hb_
ot_
math_glyph_part_t
*
parts
/* OUT */
,
hb_position_t
*
italics_correction
/* OUT */
)
const
hb_position_t
*
italics_correction
/* OUT */
)
const
{
return
get_glyph_construction
(
glyph
,
direction
,
font
)
{
return
get_glyph_construction
(
glyph
,
direction
,
font
)
.
get_assembly
()
.
get_assembly
()
...
...
src/hb-ot-layout.cc
浏览文件 @
46cc4a3a
...
@@ -1366,7 +1366,7 @@ hb_ot_math_get_glyph_kerning (hb_font_t *font,
...
@@ -1366,7 +1366,7 @@ hb_ot_math_get_glyph_kerning (hb_font_t *font,
* This function tries to retrieve the MathGlyphConstruction for the specified
* This function tries to retrieve the MathGlyphConstruction for the specified
* font, glyph and direction. Note that only the value of
* font, glyph and direction. Note that only the value of
* #HB_DIRECTION_IS_HORIZONTAL is considered. It provides the corresponding list
* #HB_DIRECTION_IS_HORIZONTAL is considered. It provides the corresponding list
* of size variants as an array of hb_math_glyph_variant_t structs.
* of size variants as an array of hb_
ot_
math_glyph_variant_t structs.
*
*
* Return value: the total number of size variants available or 0
* Return value: the total number of size variants available or 0
*
*
...
@@ -1378,7 +1378,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
...
@@ -1378,7 +1378,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
hb_direction_t
direction
,
hb_direction_t
direction
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
variants_count
,
/* IN/OUT */
unsigned
int
*
variants_count
,
/* IN/OUT */
hb_math_glyph_variant_t
*
variants
/* OUT */
)
hb_
ot_
math_glyph_variant_t
*
variants
/* OUT */
)
{
{
const
OT
::
MATH
&
math
=
_get_math
(
font
->
face
);
const
OT
::
MATH
&
math
=
_get_math
(
font
->
face
);
return
math
.
get_math_variants
().
get_glyph_variants
(
glyph
,
direction
,
font
,
return
math
.
get_math_variants
().
get_glyph_variants
(
glyph
,
direction
,
font
,
...
@@ -1425,7 +1425,7 @@ hb_ot_math_get_min_connector_overlap (hb_font_t *font,
...
@@ -1425,7 +1425,7 @@ hb_ot_math_get_min_connector_overlap (hb_font_t *font,
* This function tries to retrieve the GlyphAssembly for the specified font,
* This function tries to retrieve the GlyphAssembly for the specified font,
* glyph and direction. Note that only the value of #HB_DIRECTION_IS_HORIZONTAL
* glyph and direction. Note that only the value of #HB_DIRECTION_IS_HORIZONTAL
* is considered. It provides the information necessary to draw the glyph
* is considered. It provides the information necessary to draw the glyph
* assembly as an array of #hb_math_glyph_part_t.
* assembly as an array of #hb_
ot_
math_glyph_part_t.
*
*
* Return value: the total number of parts in the glyph assembly
* Return value: the total number of parts in the glyph assembly
*
*
...
@@ -1437,7 +1437,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
...
@@ -1437,7 +1437,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
hb_direction_t
direction
,
hb_direction_t
direction
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
parts_count
,
/* IN/OUT */
unsigned
int
*
parts_count
,
/* IN/OUT */
hb_math_glyph_part_t
*
parts
,
/* OUT */
hb_
ot_
math_glyph_part_t
*
parts
,
/* OUT */
hb_position_t
*
italics_correction
/* OUT */
)
hb_position_t
*
italics_correction
/* OUT */
)
{
{
const
OT
::
MATH
&
math
=
_get_math
(
font
->
face
);
const
OT
::
MATH
&
math
=
_get_math
(
font
->
face
);
...
...
src/hb-ot-math.h
浏览文件 @
46cc4a3a
...
@@ -113,22 +113,22 @@ typedef enum {
...
@@ -113,22 +113,22 @@ typedef enum {
HB_OT_MATH_KERN_BOTTOM_LEFT
=
3
HB_OT_MATH_KERN_BOTTOM_LEFT
=
3
}
hb_ot_math_kern_t
;
}
hb_ot_math_kern_t
;
typedef
struct
hb_math_glyph_variant_t
{
typedef
struct
hb_
ot_
math_glyph_variant_t
{
hb_codepoint_t
glyph
;
hb_codepoint_t
glyph
;
hb_position_t
advance
;
hb_position_t
advance
;
}
hb_math_glyph_variant_t
;
}
hb_
ot_
math_glyph_variant_t
;
typedef
enum
{
/*< flags >*/
typedef
enum
{
/*< flags >*/
HB_MATH_GLYPH_PART_FLAG_EXTENDER
=
0x00000001u
/* Extender glyph */
HB_MATH_GLYPH_PART_FLAG_EXTENDER
=
0x00000001u
/* Extender glyph */
}
hb_math_glyph_part_flags_t
;
}
hb_
ot_
math_glyph_part_flags_t
;
typedef
struct
hb_math_glyph_part_t
{
typedef
struct
hb_
ot_
math_glyph_part_t
{
hb_codepoint_t
glyph
;
hb_codepoint_t
glyph
;
hb_position_t
start_connector_length
;
hb_position_t
start_connector_length
;
hb_position_t
end_connector_length
;
hb_position_t
end_connector_length
;
hb_position_t
full_advance
;
hb_position_t
full_advance
;
hb_math_glyph_part_flags_t
flags
;
hb_
ot_
math_glyph_part_flags_t
flags
;
}
hb_math_glyph_part_t
;
}
hb_
ot_
math_glyph_part_t
;
/* Methods */
/* Methods */
...
@@ -163,7 +163,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
...
@@ -163,7 +163,7 @@ hb_ot_math_get_glyph_variants (hb_font_t *font,
hb_direction_t
direction
,
hb_direction_t
direction
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
variants_count
,
/* IN/OUT */
unsigned
int
*
variants_count
,
/* IN/OUT */
hb_math_glyph_variant_t
*
variants
/* OUT */
);
hb_
ot_
math_glyph_variant_t
*
variants
/* OUT */
);
HB_EXTERN
hb_position_t
HB_EXTERN
hb_position_t
hb_ot_math_get_min_connector_overlap
(
hb_font_t
*
font
,
hb_ot_math_get_min_connector_overlap
(
hb_font_t
*
font
,
...
@@ -175,7 +175,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
...
@@ -175,7 +175,7 @@ hb_ot_math_get_glyph_assembly (hb_font_t *font,
hb_direction_t
direction
,
hb_direction_t
direction
,
unsigned
int
start_offset
,
unsigned
int
start_offset
,
unsigned
int
*
parts_count
,
/* IN/OUT */
unsigned
int
*
parts_count
,
/* IN/OUT */
hb_math_glyph_part_t
*
parts
,
/* OUT */
hb_
ot_
math_glyph_part_t
*
parts
,
/* OUT */
hb_position_t
*
italics_correction
/* OUT */
);
hb_position_t
*
italics_correction
/* OUT */
);
...
...
test/api/test-ot-math.c
浏览文件 @
46cc4a3a
...
@@ -459,7 +459,7 @@ test_get_glyph_variants (void)
...
@@ -459,7 +459,7 @@ test_get_glyph_variants (void)
NULL
),
==
,
0
);
NULL
),
==
,
0
);
g_assert
(
hb_font_get_glyph_from_name
(
hb_font
,
"arrowleft"
,
-
1
,
&
glyph
));
g_assert
(
hb_font_get_glyph_from_name
(
hb_font
,
"arrowleft"
,
-
1
,
&
glyph
));
hb_math_glyph_variant_t
variants
[
20
];
hb_
ot_
math_glyph_variant_t
variants
[
20
];
unsigned
variantsSize
=
sizeof
(
variants
)
/
sizeof
(
variants
[
0
]);
unsigned
variantsSize
=
sizeof
(
variants
)
/
sizeof
(
variants
[
0
]);
unsigned
int
count
;
unsigned
int
count
;
unsigned
int
offset
=
0
;
unsigned
int
offset
=
0
;
...
@@ -586,7 +586,7 @@ test_get_glyph_assembly (void)
...
@@ -586,7 +586,7 @@ test_get_glyph_assembly (void)
NULL
),
==
,
0
);
NULL
),
==
,
0
);
g_assert
(
hb_font_get_glyph_from_name
(
hb_font
,
"arrowright"
,
-
1
,
&
glyph
));
g_assert
(
hb_font_get_glyph_from_name
(
hb_font
,
"arrowright"
,
-
1
,
&
glyph
));
hb_math_glyph_part_t
parts
[
20
];
hb_
ot_
math_glyph_part_t
parts
[
20
];
unsigned
partsSize
=
sizeof
(
parts
)
/
sizeof
(
parts
[
0
]);
unsigned
partsSize
=
sizeof
(
parts
)
/
sizeof
(
parts
[
0
]);
unsigned
int
count
;
unsigned
int
count
;
unsigned
int
offset
=
0
;
unsigned
int
offset
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录