Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bf94b3ad
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf94b3ad
编写于
10月 27, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move some more code around
上级
6334658f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
52 addition
and
52 deletion
+52
-52
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+21
-0
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+23
-4
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+8
-48
未找到文件。
src/hb-ot-layout-gdef-private.hh
浏览文件 @
bf94b3ad
...
@@ -374,6 +374,27 @@ struct GDEF
...
@@ -374,6 +374,27 @@ struct GDEF
&&
(
version
<
0x00010002
||
markGlyphSetsDef
[
0
].
sanitize
(
c
,
this
));
&&
(
version
<
0x00010002
||
markGlyphSetsDef
[
0
].
sanitize
(
c
,
this
));
}
}
/* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
* glyph class and other bits, and high 8-bit gthe mark attachment type (if any).
* Not to be confused with lookup_props which is very similar. */
inline
unsigned
int
get_glyph_props
(
hb_codepoint_t
glyph
)
const
{
unsigned
int
klass
=
get_glyph_class
(
glyph
);
switch
(
klass
)
{
default:
case
UnclassifiedGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
;
case
BaseGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
;
case
LigatureGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
;
case
ComponentGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
;
case
MarkGlyph
:
klass
=
get_mark_attachment_type
(
glyph
);
return
HB_OT_LAYOUT_GLYPH_CLASS_MARK
|
(
klass
<<
8
);
}
}
private:
private:
FixedVersion
version
;
/* Version of the GDEF table--currently
FixedVersion
version
;
/* Version of the GDEF table--currently
* 0x00010002 */
* 0x00010002 */
...
...
src/hb-ot-layout-private.hh
浏览文件 @
bf94b3ad
...
@@ -46,11 +46,11 @@ HB_BEGIN_DECLS
...
@@ -46,11 +46,11 @@ HB_BEGIN_DECLS
#define cursive_chain() var.i16[1]
/* character to which this connects, may be positive or negative */
#define cursive_chain() var.i16[1]
/* character to which this connects, may be positive or negative */
typedef
enum
{
typedef
enum
{
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
=
0x0001
,
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
=
0x0002
,
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
=
0x0002
,
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
=
0x0004
,
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
=
0x0004
,
HB_OT_LAYOUT_GLYPH_CLASS_MARK
=
0x0008
,
HB_OT_LAYOUT_GLYPH_CLASS_MARK
=
0x0008
,
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
=
0x0010
,
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
=
0x0010
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
=
0x0020
}
hb_ot_layout_glyph_class_t
;
}
hb_ot_layout_glyph_class_t
;
...
@@ -94,17 +94,36 @@ _hb_ot_layout_free (hb_ot_layout_t *layout);
...
@@ -94,17 +94,36 @@ _hb_ot_layout_free (hb_ot_layout_t *layout);
* GDEF
* GDEF
*/
*/
HB_INTERNAL
unsigned
int
_hb_ot_layout_get_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
info
);
HB_INTERNAL
hb_bool_t
HB_INTERNAL
hb_bool_t
_hb_ot_layout_check_glyph_property
(
hb_face_t
*
face
,
_hb_ot_layout_check_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_props
,
unsigned
int
lookup_props
,
unsigned
int
*
property
);
unsigned
int
*
property
);
HB_INTERNAL
hb_bool_t
static
inline
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_props
,
unsigned
int
lookup_props
,
unsigned
int
*
property
);
unsigned
int
*
property_out
)
{
unsigned
int
property
;
property
=
_hb_ot_layout_get_glyph_property
(
face
,
ginfo
);
if
(
property_out
)
*
property_out
=
property
;
/* If it's a mark, skip it we don't accept it. */
if
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
return
!
_hb_ot_layout_check_glyph_property
(
face
,
ginfo
,
lookup_props
,
NULL
);
/* If not a mark, don't skip. */
return
false
;
}
HB_END_DECLS
HB_END_DECLS
...
...
src/hb-ot-layout.cc
浏览文件 @
bf94b3ad
...
@@ -73,19 +73,19 @@ _hb_ot_layout_free (hb_ot_layout_t *layout)
...
@@ -73,19 +73,19 @@ _hb_ot_layout_free (hb_ot_layout_t *layout)
free
(
layout
);
free
(
layout
);
}
}
static
const
GDEF
&
static
inline
const
GDEF
&
_get_gdef
(
hb_face_t
*
face
)
_get_gdef
(
hb_face_t
*
face
)
{
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gdef
)
?
*
face
->
ot_layout
->
gdef
:
Null
(
GDEF
);
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gdef
)
?
*
face
->
ot_layout
->
gdef
:
Null
(
GDEF
);
}
}
static
const
GSUB
&
static
inline
const
GSUB
&
_get_gsub
(
hb_face_t
*
face
)
_get_gsub
(
hb_face_t
*
face
)
{
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gsub
)
?
*
face
->
ot_layout
->
gsub
:
Null
(
GSUB
);
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gsub
)
?
*
face
->
ot_layout
->
gsub
:
Null
(
GSUB
);
}
}
static
const
GPOS
&
static
inline
const
GPOS
&
_get_gpos
(
hb_face_t
*
face
)
_get_gpos
(
hb_face_t
*
face
)
{
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gpos
)
?
*
face
->
ot_layout
->
gpos
:
Null
(
GPOS
);
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gpos
)
?
*
face
->
ot_layout
->
gpos
:
Null
(
GPOS
);
...
@@ -102,35 +102,15 @@ hb_ot_layout_has_glyph_classes (hb_face_t *face)
...
@@ -102,35 +102,15 @@ hb_ot_layout_has_glyph_classes (hb_face_t *face)
return
_get_gdef
(
face
).
has_glyph_classes
();
return
_get_gdef
(
face
).
has_glyph_classes
();
}
}
static
unsigned
int
unsigned
int
_hb_ot_layout_get_glyph_property_from_gdef
(
hb_face_t
*
face
,
hb_glyph_info_t
*
info
)
{
hb_codepoint_t
glyph
=
info
->
codepoint
;
unsigned
int
klass
;
const
GDEF
&
gdef
=
_get_gdef
(
face
);
klass
=
gdef
.
get_glyph_class
(
glyph
);
switch
(
klass
)
{
default:
case
GDEF
::
UnclassifiedGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED
;
case
GDEF
::
BaseGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH
;
case
GDEF
::
LigatureGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE
;
case
GDEF
::
ComponentGlyph
:
return
HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT
;
case
GDEF
::
MarkGlyph
:
klass
=
gdef
.
get_mark_attachment_type
(
glyph
);
return
HB_OT_LAYOUT_GLYPH_CLASS_MARK
|
(
klass
<<
8
);
}
}
static
inline
unsigned
int
_hb_ot_layout_get_glyph_property
(
hb_face_t
*
face
,
_hb_ot_layout_get_glyph_property
(
hb_face_t
*
face
,
hb_glyph_info_t
*
info
)
hb_glyph_info_t
*
info
)
{
{
if
(
!
info
->
gproperty
())
if
(
!
info
->
gproperty
())
info
->
gproperty
()
=
_hb_ot_layout_get_glyph_property_from_gdef
(
face
,
info
);
{
const
GDEF
&
gdef
=
_get_gdef
(
face
);
info
->
gproperty
()
=
gdef
.
get_glyph_props
(
info
->
codepoint
);
}
return
info
->
gproperty
();
return
info
->
gproperty
();
}
}
...
@@ -172,26 +152,6 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face,
...
@@ -172,26 +152,6 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face,
return
true
;
return
true
;
}
}
hb_bool_t
_hb_ot_layout_skip_mark
(
hb_face_t
*
face
,
hb_glyph_info_t
*
ginfo
,
unsigned
int
lookup_props
,
unsigned
int
*
property_out
)
{
unsigned
int
property
;
property
=
_hb_ot_layout_get_glyph_property
(
face
,
ginfo
);
if
(
property_out
)
*
property_out
=
property
;
/* If it's a mark, skip it we don't accept it. */
if
(
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
return
!
_hb_ot_layout_check_glyph_property
(
face
,
ginfo
,
lookup_props
,
NULL
);
/* If not a mark, don't skip. */
return
false
;
}
unsigned
int
unsigned
int
hb_ot_layout_get_attach_points
(
hb_face_t
*
face
,
hb_ot_layout_get_attach_points
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
,
hb_codepoint_t
glyph
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录