Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
70e0f2a7
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看板
提交
70e0f2a7
编写于
8月 03, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Make it all work again
上级
23c86aa0
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
44 addition
and
39 deletion
+44
-39
src/hb-font.cc
src/hb-font.cc
+13
-10
src/hb-ot-layout-private.h
src/hb-ot-layout-private.h
+6
-3
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+25
-26
未找到文件。
src/hb-font.cc
浏览文件 @
70e0f2a7
...
...
@@ -27,11 +27,11 @@
#include "hb-private.h"
#include "hb-font-private.h"
#include "hb-ot-layout-private.h"
#include "hb-open-file-private.hh"
#include "hb-blob.h"
/*
* hb_font_callbacks_t
*/
...
...
@@ -167,6 +167,8 @@ _hb_face_get_table (hb_tag_t tag, void *user_data)
hb_face_t
*
face
=
(
hb_face_t
*
)
user_data
;
const
char
*
data
=
hb_blob_lock
(
face
->
blob
);
/* XXX sanitize */
const
OpenTypeFontFile
&
ot_file
=
OpenTypeFontFile
::
get_for_data
(
data
);
const
OpenTypeFontFace
&
ot_face
=
ot_file
.
get_face
(
face
->
index
);
...
...
@@ -219,7 +221,7 @@ hb_face_create_for_tables (hb_get_table_func_t get_table,
face
->
destroy
=
destroy
;
face
->
user_data
=
user_data
;
_hb_ot_layout_init
(
&
face
->
ot_layout
,
face
);
_hb_ot_layout_init
(
face
);
return
face
;
}
...
...
@@ -230,14 +232,15 @@ hb_face_create_for_data (hb_blob_t *blob,
{
hb_face_t
*
face
;
face
=
hb_face_create_for_tables
(
_hb_face_get_table
,
NULL
,
NULL
);
if
(
!
HB_OBJECT_DO_CREATE
(
face
))
return
&
_hb_face_nil
;
if
(
!
HB_OBJECT_IS_INERT
(
face
))
{
face
->
blob
=
hb_blob_reference
(
blob
);
face
->
index
=
index
;
face
->
destroy
=
_hb_face_destroy_blob
,
face
->
get_table
=
_hb_face_get_table
;
face
->
user_data
=
face
;
}
_hb_ot_layout_init
(
face
);
return
face
;
}
...
...
@@ -259,7 +262,7 @@ hb_face_destroy (hb_face_t *face)
{
HB_OBJECT_DO_DESTROY
(
face
);
_hb_ot_layout_fini
(
&
face
->
ot_layout
);
_hb_ot_layout_fini
(
face
);
hb_blob_destroy
(
face
->
blob
);
...
...
src/hb-ot-layout-private.h
浏览文件 @
70e0f2a7
...
...
@@ -49,6 +49,10 @@ struct _hb_ot_layout_t
{
hb_face_t
*
face
;
/* XXX can do without this */
hb_blob_t
*
gdef_blob
;
hb_blob_t
*
gsub_blob
;
hb_blob_t
*
gpos_blob
;
const
struct
GDEF
*
gdef
;
const
struct
GSUB
*
gsub
;
const
struct
GPOS
*
gpos
;
...
...
@@ -79,11 +83,10 @@ struct _hb_ot_layout_context_t
void
_hb_ot_layout_init
(
hb_ot_layout_t
*
layout
,
hb_face_t
*
face
);
_hb_ot_layout_init
(
hb_face_t
*
face
);
void
_hb_ot_layout_fini
(
hb_
ot_layout_t
*
layout
);
_hb_ot_layout_fini
(
hb_
face_t
*
face
);
/*
...
...
src/hb-ot-layout.cc
浏览文件 @
70e0f2a7
...
...
@@ -40,53 +40,52 @@
void
_hb_ot_layout_init
(
hb_
ot_layout_t
*
layout
)
_hb_ot_layout_init
(
hb_
face_t
*
face
)
{
layout
->
gdef
=
NULL
;
layout
->
gsub
=
NULL
;
layout
->
gpos
=
NULL
;
hb_ot_layout_t
*
layout
=
&
face
->
ot_layout
;
/* XXX sanitize */
layout
->
gdef_blob
=
hb_face_get_table
(
face
,
HB_OT_TAG_GDEF
);
layout
->
gdef
=
&
GDEF
::
get_for_data
(
hb_blob_lock
(
layout
->
gdef_blob
));
layout
->
gsub_blob
=
hb_face_get_table
(
face
,
HB_OT_TAG_GSUB
);
layout
->
gsub
=
&
GSUB
::
get_for_data
(
hb_blob_lock
(
layout
->
gsub_blob
));
layout
->
gpos_blob
=
hb_face_get_table
(
face
,
HB_OT_TAG_GPOS
);
layout
->
gpos
=
&
GPOS
::
get_for_data
(
hb_blob_lock
(
layout
->
gpos_blob
));
}
void
_hb_ot_layout_fini
(
hb_
ot_layout_t
*
layout
)
_hb_ot_layout_fini
(
hb_
face_t
*
face
)
{
}
hb_ot_layout_t
*
layout
=
&
face
->
ot_layout
;
static
hb_ot_layout_t
*
_hb_ot_face_get_layout
(
hb_face_t
*
face
)
{
return
&
face
->
ot_layout
;
hb_blob_unlock
(
layout
->
gdef_blob
);
hb_blob_unlock
(
layout
->
gsub_blob
);
hb_blob_unlock
(
layout
->
gpos_blob
);
hb_blob_destroy
(
layout
->
gdef_blob
);
hb_blob_destroy
(
layout
->
gsub_blob
);
hb_blob_destroy
(
layout
->
gpos_blob
);
}
static
const
GDEF
&
_get_gdef
(
hb_face_t
*
face
)
{
#if 0
if (HB_UNLIKELY (!layout->face))
return Null(GDEF);
if (HB_UNLIKELY (!layout->gdef)) {
hb_blob_t *blob = hb_face_get_table (face, HB_OT_TAG_GDEF);
unsigned int length;
const char *data = hb_blob_get_data (blob,
layout->gdef = &GDEF::get_for_data (font.get_table_data (face.get_table_by_tag (GDEF::Tag)));
layout->gdef = &Null(GDEF);
}
return *layout->gdef;
#endif
return
HB_LIKELY
(
face
->
ot_layout
.
gdef
)
?
*
face
->
ot_layout
.
gdef
:
Null
(
GDEF
);
}
static
const
GSUB
&
_get_gsub
(
hb_face_t
*
face
)
{
return
Null
(
GSUB
);
return
HB_LIKELY
(
face
->
ot_layout
.
gsub
)
?
*
face
->
ot_layout
.
gsub
:
Null
(
GSUB
);
}
static
const
GPOS
&
_get_gpos
(
hb_face_t
*
face
)
{
return
Null
(
GPOS
);
return
HB_LIKELY
(
face
->
ot_layout
.
gpos
)
?
*
face
->
ot_layout
.
gpos
:
Null
(
GPOS
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录