Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5473ebfb
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看板
提交
5473ebfb
编写于
2月 24, 2016
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ot-font] Remove level of indirection in get_glyph_variant
上级
49fe6ecf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
16 deletion
+11
-16
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+2
-12
src/hb-ot-font.cc
src/hb-ot-font.cc
+9
-4
未找到文件。
src/hb-ot-cmap-table.hh
浏览文件 @
5473ebfb
...
@@ -388,7 +388,7 @@ struct CmapSubtableFormat14
...
@@ -388,7 +388,7 @@ struct CmapSubtableFormat14
}
}
protected:
protected:
USHORT
format
;
/* Format number is set to
0
. */
USHORT
format
;
/* Format number is set to
14
. */
ULONG
lengthZ
;
/* Byte length of this subtable. */
ULONG
lengthZ
;
/* Byte length of this subtable. */
SortedArrayOf
<
VariationSelectorRecord
,
ULONG
>
SortedArrayOf
<
VariationSelectorRecord
,
ULONG
>
record
;
/* Variation selector records; sorted
record
;
/* Variation selector records; sorted
...
@@ -416,16 +416,6 @@ struct CmapSubtable
...
@@ -416,16 +416,6 @@ struct CmapSubtable
}
}
}
}
inline
glyph_variant_t
get_glyph_variant
(
hb_codepoint_t
codepoint
,
hb_codepoint_t
variation_selector
,
hb_codepoint_t
*
glyph
)
const
{
switch
(
u
.
format
)
{
case
14
:
return
u
.
format14
.
get_glyph_variant
(
codepoint
,
variation_selector
,
glyph
);
default:
return
GLYPH_VARIANT_NOT_FOUND
;
}
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
...
@@ -442,7 +432,7 @@ struct CmapSubtable
...
@@ -442,7 +432,7 @@ struct CmapSubtable
}
}
}
}
p
rotected
:
p
ublic
:
union
{
union
{
USHORT
format
;
/* Format identifier */
USHORT
format
;
/* Format identifier */
CmapSubtableFormat0
format0
;
CmapSubtableFormat0
format0
;
...
...
src/hb-ot-font.cc
浏览文件 @
5473ebfb
...
@@ -204,7 +204,7 @@ struct hb_ot_face_glyf_accelerator_t
...
@@ -204,7 +204,7 @@ struct hb_ot_face_glyf_accelerator_t
struct
hb_ot_face_cmap_accelerator_t
struct
hb_ot_face_cmap_accelerator_t
{
{
const
OT
::
CmapSubtable
*
table
;
const
OT
::
CmapSubtable
*
table
;
const
OT
::
CmapSubtable
*
uvs_table
;
const
OT
::
CmapSubtable
Format14
*
uvs_table
;
hb_blob_t
*
blob
;
hb_blob_t
*
blob
;
inline
void
init
(
hb_face_t
*
face
)
inline
void
init
(
hb_face_t
*
face
)
...
@@ -212,7 +212,7 @@ struct hb_ot_face_cmap_accelerator_t
...
@@ -212,7 +212,7 @@ struct hb_ot_face_cmap_accelerator_t
this
->
blob
=
OT
::
Sanitizer
<
OT
::
cmap
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_cmap
));
this
->
blob
=
OT
::
Sanitizer
<
OT
::
cmap
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_cmap
));
const
OT
::
cmap
*
cmap
=
OT
::
Sanitizer
<
OT
::
cmap
>::
lock_instance
(
this
->
blob
);
const
OT
::
cmap
*
cmap
=
OT
::
Sanitizer
<
OT
::
cmap
>::
lock_instance
(
this
->
blob
);
const
OT
::
CmapSubtable
*
subtable
=
NULL
;
const
OT
::
CmapSubtable
*
subtable
=
NULL
;
const
OT
::
CmapSubtable
*
subtable_uvs
=
NULL
;
const
OT
::
CmapSubtable
Format14
*
subtable_uvs
=
NULL
;
/* 32-bit subtables. */
/* 32-bit subtables. */
if
(
!
subtable
)
subtable
=
cmap
->
find_subtable
(
3
,
10
);
if
(
!
subtable
)
subtable
=
cmap
->
find_subtable
(
3
,
10
);
...
@@ -229,9 +229,14 @@ struct hb_ot_face_cmap_accelerator_t
...
@@ -229,9 +229,14 @@ struct hb_ot_face_cmap_accelerator_t
if
(
!
subtable
)
subtable
=
&
OT
::
Null
(
OT
::
CmapSubtable
);
if
(
!
subtable
)
subtable
=
&
OT
::
Null
(
OT
::
CmapSubtable
);
/* UVS subtable. */
/* UVS subtable. */
if
(
!
subtable_uvs
)
subtable_uvs
=
cmap
->
find_subtable
(
0
,
5
);
if
(
!
subtable_uvs
)
{
const
OT
::
CmapSubtable
*
st
=
cmap
->
find_subtable
(
0
,
5
);
if
(
st
&&
st
->
u
.
format
==
14
)
subtable_uvs
=
&
st
->
u
.
format14
;
}
/* Meh. */
/* Meh. */
if
(
!
subtable_uvs
)
subtable_uvs
=
&
OT
::
Null
(
OT
::
CmapSubtable
);
if
(
!
subtable_uvs
)
subtable_uvs
=
&
OT
::
Null
(
OT
::
CmapSubtable
Format14
);
this
->
table
=
subtable
;
this
->
table
=
subtable
;
this
->
uvs_table
=
subtable_uvs
;
this
->
uvs_table
=
subtable_uvs
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录