Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3d22aefe
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d22aefe
编写于
8月 01, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename
上级
1a624c6e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
90 addition
and
90 deletion
+90
-90
src/hb-coretext.cc
src/hb-coretext.cc
+23
-23
src/hb-directwrite.cc
src/hb-directwrite.cc
+14
-14
src/hb-fallback-shape.cc
src/hb-fallback-shape.cc
+12
-12
src/hb-graphite2.cc
src/hb-graphite2.cc
+13
-13
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+10
-10
src/hb-shaper-private.hh
src/hb-shaper-private.hh
+1
-1
src/hb-uniscribe.cc
src/hb-uniscribe.cc
+17
-17
未找到文件。
src/hb-coretext.cc
浏览文件 @
3d22aefe
...
...
@@ -269,7 +269,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
return
ct_font
;
}
hb_coretext_
shaper_
face_data_t
*
hb_coretext_face_data_t
*
_hb_coretext_shaper_face_data_create
(
hb_face_t
*
face
)
{
CGFontRef
cg_font
=
create_cg_font
(
face
);
...
...
@@ -280,11 +280,11 @@ _hb_coretext_shaper_face_data_create (hb_face_t *face)
return
nullptr
;
}
return
(
hb_coretext_
shaper_
face_data_t
*
)
cg_font
;
return
(
hb_coretext_face_data_t
*
)
cg_font
;
}
void
_hb_coretext_shaper_face_data_destroy
(
hb_coretext_
shaper_
face_data_t
*
data
)
_hb_coretext_shaper_face_data_destroy
(
hb_coretext_face_data_t
*
data
)
{
CFRelease
((
CGFontRef
)
data
);
}
...
...
@@ -306,7 +306,7 @@ hb_coretext_face_get_cg_font (hb_face_t *face)
}
hb_coretext_
shaper_
font_data_t
*
hb_coretext_font_data_t
*
_hb_coretext_shaper_font_data_create
(
hb_font_t
*
font
)
{
hb_face_t
*
face
=
font
->
face
;
...
...
@@ -321,11 +321,11 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font)
return
nullptr
;
}
return
(
hb_coretext_
shaper_
font_data_t
*
)
ct_font
;
return
(
hb_coretext_font_data_t
*
)
ct_font
;
}
void
_hb_coretext_shaper_font_data_destroy
(
hb_coretext_
shaper_
font_data_t
*
data
)
_hb_coretext_shaper_font_data_destroy
(
hb_coretext_font_data_t
*
data
)
{
CFRelease
((
CTFontRef
)
data
);
}
...
...
@@ -348,7 +348,7 @@ hb_coretext_font_create (CTFontRef ct_font)
hb_font_set_ptem
(
font
,
coretext_font_size_to_ptem
(
CTFontGetSize
(
ct_font
)));
/* Let there be dragons here... */
HB_SHAPER_DATA_GET
(
font
)
=
(
hb_coretext_
shaper_
font_data_t
*
)
CFRetain
(
ct_font
);
HB_SHAPER_DATA_GET
(
font
)
=
(
hb_coretext_font_data_t
*
)
CFRetain
(
ct_font
);
return
font
;
}
...
...
@@ -366,20 +366,20 @@ hb_coretext_font_get_ct_font (hb_font_t *font)
* shaper shape_plan data
*/
struct
hb_coretext_shape
r_shape
_plan_data_t
{};
struct
hb_coretext_shape_plan_data_t
{};
hb_coretext_shape
r_shape
_plan_data_t
*
hb_coretext_shape_plan_data_t
*
_hb_coretext_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_coretext_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_coretext_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_coretext_shaper_shape_plan_data_destroy
(
hb_coretext_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_coretext_shaper_shape_plan_data_destroy
(
hb_coretext_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -1329,9 +1329,9 @@ HB_SHAPER_DATA_ENSURE_DEFINE(coretext_aat, font)
* shaper face data
*/
struct
hb_coretext_aat_
shaper_
face_data_t
{};
struct
hb_coretext_aat_face_data_t
{};
hb_coretext_aat_
shaper_
face_data_t
*
hb_coretext_aat_face_data_t
*
_hb_coretext_aat_shaper_face_data_create
(
hb_face_t
*
face
)
{
static
const
hb_tag_t
tags
[]
=
{
HB_CORETEXT_TAG_MORX
,
HB_CORETEXT_TAG_MORT
,
HB_CORETEXT_TAG_KERX
};
...
...
@@ -1342,7 +1342,7 @@ _hb_coretext_aat_shaper_face_data_create (hb_face_t *face)
if
(
hb_blob_get_length
(
blob
))
{
hb_blob_destroy
(
blob
);
return
hb_coretext_shaper_face_data_ensure
(
face
)
?
(
hb_coretext_aat_
shaper_
face_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
:
nullptr
;
return
hb_coretext_shaper_face_data_ensure
(
face
)
?
(
hb_coretext_aat_face_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
:
nullptr
;
}
hb_blob_destroy
(
blob
);
}
...
...
@@ -1351,7 +1351,7 @@ _hb_coretext_aat_shaper_face_data_create (hb_face_t *face)
}
void
_hb_coretext_aat_shaper_face_data_destroy
(
hb_coretext_aat_
shaper_
face_data_t
*
data
HB_UNUSED
)
_hb_coretext_aat_shaper_face_data_destroy
(
hb_coretext_aat_face_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -1360,16 +1360,16 @@ _hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_shaper_face_data_t *d
* shaper font data
*/
struct
hb_coretext_aat_
shaper_
font_data_t
{};
struct
hb_coretext_aat_font_data_t
{};
hb_coretext_aat_
shaper_
font_data_t
*
hb_coretext_aat_font_data_t
*
_hb_coretext_aat_shaper_font_data_create
(
hb_font_t
*
font
)
{
return
hb_coretext_shaper_font_data_ensure
(
font
)
?
(
hb_coretext_aat_
shaper_
font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
:
nullptr
;
return
hb_coretext_shaper_font_data_ensure
(
font
)
?
(
hb_coretext_aat_font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
:
nullptr
;
}
void
_hb_coretext_aat_shaper_font_data_destroy
(
hb_coretext_aat_
shaper_
font_data_t
*
data
HB_UNUSED
)
_hb_coretext_aat_shaper_font_data_destroy
(
hb_coretext_aat_font_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -1378,20 +1378,20 @@ _hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_shaper_font_data_t *d
* shaper shape_plan data
*/
struct
hb_coretext_aat_shape
r_shape
_plan_data_t
{};
struct
hb_coretext_aat_shape_plan_data_t
{};
hb_coretext_aat_shape
r_shape
_plan_data_t
*
hb_coretext_aat_shape_plan_data_t
*
_hb_coretext_aat_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_coretext_aat_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_coretext_aat_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_coretext_aat_shaper_shape_plan_data_destroy
(
hb_coretext_aat_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_coretext_aat_shaper_shape_plan_data_destroy
(
hb_coretext_aat_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
src/hb-directwrite.cc
浏览文件 @
3d22aefe
...
...
@@ -133,7 +133,7 @@ public:
* shaper face data
*/
struct
hb_directwrite_
shaper_
face_data_t
struct
hb_directwrite_face_data_t
{
IDWriteFactory
*
dwriteFactory
;
IDWriteFontFile
*
fontFile
;
...
...
@@ -143,10 +143,10 @@ struct hb_directwrite_shaper_face_data_t
hb_blob_t
*
faceBlob
;
};
hb_directwrite_
shaper_
face_data_t
*
hb_directwrite_face_data_t
*
_hb_directwrite_shaper_face_data_create
(
hb_face_t
*
face
)
{
hb_directwrite_
shaper_face_data_t
*
data
=
new
hb_directwrite_shaper
_face_data_t
;
hb_directwrite_
face_data_t
*
data
=
new
hb_directwrite
_face_data_t
;
if
(
unlikely
(
!
data
))
return
nullptr
;
...
...
@@ -206,7 +206,7 @@ _hb_directwrite_shaper_face_data_create (hb_face_t *face)
}
void
_hb_directwrite_shaper_face_data_destroy
(
hb_directwrite_
shaper_
face_data_t
*
data
)
_hb_directwrite_shaper_face_data_destroy
(
hb_directwrite_face_data_t
*
data
)
{
if
(
data
->
fontFace
)
data
->
fontFace
->
Release
();
...
...
@@ -233,16 +233,16 @@ _hb_directwrite_shaper_face_data_destroy (hb_directwrite_shaper_face_data_t *dat
* shaper font data
*/
struct
hb_directwrite_
shaper_
font_data_t
struct
hb_directwrite_font_data_t
{
};
hb_directwrite_
shaper_
font_data_t
*
hb_directwrite_font_data_t
*
_hb_directwrite_shaper_font_data_create
(
hb_font_t
*
font
)
{
if
(
unlikely
(
!
hb_directwrite_shaper_face_data_ensure
(
font
->
face
)))
return
nullptr
;
hb_directwrite_
shaper_font_data_t
*
data
=
new
hb_directwrite_shaper
_font_data_t
;
hb_directwrite_
font_data_t
*
data
=
new
hb_directwrite
_font_data_t
;
if
(
unlikely
(
!
data
))
return
nullptr
;
...
...
@@ -250,7 +250,7 @@ _hb_directwrite_shaper_font_data_create (hb_font_t *font)
}
void
_hb_directwrite_shaper_font_data_destroy
(
hb_directwrite_
shaper_
font_data_t
*
data
)
_hb_directwrite_shaper_font_data_destroy
(
hb_directwrite_font_data_t
*
data
)
{
delete
data
;
}
...
...
@@ -260,20 +260,20 @@ _hb_directwrite_shaper_font_data_destroy (hb_directwrite_shaper_font_data_t *dat
* shaper shape_plan data
*/
struct
hb_directwrite_shape
r_shape
_plan_data_t
{};
struct
hb_directwrite_shape_plan_data_t
{};
hb_directwrite_shape
r_shape
_plan_data_t
*
hb_directwrite_shape_plan_data_t
*
_hb_directwrite_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_directwrite_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_directwrite_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_directwrite_shaper_shape_plan_data_destroy
(
hb_directwrite_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_directwrite_shaper_shape_plan_data_destroy
(
hb_directwrite_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -555,8 +555,8 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
float
lineWidth
)
{
hb_face_t
*
face
=
font
->
face
;
hb_directwrite_
shaper_
face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_directwrite_
shaper_
font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
hb_directwrite_face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_directwrite_font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
IDWriteFactory
*
dwriteFactory
=
face_data
->
dwriteFactory
;
IDWriteFontFace
*
fontFace
=
face_data
->
fontFace
;
...
...
src/hb-fallback-shape.cc
浏览文件 @
3d22aefe
...
...
@@ -36,16 +36,16 @@ HB_SHAPER_DATA_ENSURE_DEFINE(fallback, font)
* shaper face data
*/
struct
hb_fallback_
shaper_
face_data_t
{};
struct
hb_fallback_face_data_t
{};
hb_fallback_
shaper_
face_data_t
*
hb_fallback_face_data_t
*
_hb_fallback_shaper_face_data_create
(
hb_face_t
*
face
HB_UNUSED
)
{
return
(
hb_fallback_
shaper_
face_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_fallback_face_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_fallback_shaper_face_data_destroy
(
hb_fallback_
shaper_
face_data_t
*
data
HB_UNUSED
)
_hb_fallback_shaper_face_data_destroy
(
hb_fallback_face_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -54,16 +54,16 @@ _hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_U
* shaper font data
*/
struct
hb_fallback_
shaper_
font_data_t
{};
struct
hb_fallback_font_data_t
{};
hb_fallback_
shaper_
font_data_t
*
hb_fallback_font_data_t
*
_hb_fallback_shaper_font_data_create
(
hb_font_t
*
font
HB_UNUSED
)
{
return
(
hb_fallback_
shaper_
font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_fallback_font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_fallback_shaper_font_data_destroy
(
hb_fallback_
shaper_
font_data_t
*
data
HB_UNUSED
)
_hb_fallback_shaper_font_data_destroy
(
hb_fallback_font_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -72,20 +72,20 @@ _hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data HB_U
* shaper shape_plan data
*/
struct
hb_fallback_shape
r_shape
_plan_data_t
{};
struct
hb_fallback_shape_plan_data_t
{};
hb_fallback_shape
r_shape
_plan_data_t
*
hb_fallback_shape_plan_data_t
*
_hb_fallback_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_fallback_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_fallback_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_fallback_shaper_shape_plan_data_destroy
(
hb_fallback_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_fallback_shaper_shape_plan_data_destroy
(
hb_fallback_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
src/hb-graphite2.cc
浏览文件 @
3d22aefe
...
...
@@ -48,7 +48,7 @@ typedef struct hb_graphite2_tablelist_t {
unsigned
int
tag
;
}
hb_graphite2_tablelist_t
;
struct
hb_graphite2_
shaper_
face_data_t
{
struct
hb_graphite2_face_data_t
{
hb_face_t
*
face
;
gr_face
*
grface
;
hb_graphite2_tablelist_t
*
tlist
;
...
...
@@ -56,7 +56,7 @@ struct hb_graphite2_shaper_face_data_t {
static
const
void
*
hb_graphite2_get_table
(
const
void
*
data
,
unsigned
int
tag
,
size_t
*
len
)
{
hb_graphite2_
shaper_face_data_t
*
face_data
=
(
hb_graphite2_shaper
_face_data_t
*
)
data
;
hb_graphite2_
face_data_t
*
face_data
=
(
hb_graphite2
_face_data_t
*
)
data
;
hb_graphite2_tablelist_t
*
tlist
=
face_data
->
tlist
;
hb_blob_t
*
blob
=
nullptr
;
...
...
@@ -93,7 +93,7 @@ retry:
return
d
;
}
hb_graphite2_
shaper_
face_data_t
*
hb_graphite2_face_data_t
*
_hb_graphite2_shaper_face_data_create
(
hb_face_t
*
face
)
{
hb_blob_t
*
silf_blob
=
face
->
reference_table
(
HB_GRAPHITE2_TAG_SILF
);
...
...
@@ -106,7 +106,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face)
}
hb_blob_destroy
(
silf_blob
);
hb_graphite2_
shaper_face_data_t
*
data
=
(
hb_graphite2_shaper
_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_graphite2_shaper_face_data_t
));
hb_graphite2_
face_data_t
*
data
=
(
hb_graphite2
_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_graphite2_shaper_face_data_t
));
if
(
unlikely
(
!
data
))
return
nullptr
;
...
...
@@ -122,7 +122,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face)
}
void
_hb_graphite2_shaper_face_data_destroy
(
hb_graphite2_
shaper_
face_data_t
*
data
)
_hb_graphite2_shaper_face_data_destroy
(
hb_graphite2_face_data_t
*
data
)
{
hb_graphite2_tablelist_t
*
tlist
=
data
->
tlist
;
...
...
@@ -154,16 +154,16 @@ hb_graphite2_face_get_gr_face (hb_face_t *face)
* shaper font data
*/
struct
hb_graphite2_
shaper_
font_data_t
{};
struct
hb_graphite2_font_data_t
{};
hb_graphite2_
shaper_
font_data_t
*
hb_graphite2_font_data_t
*
_hb_graphite2_shaper_font_data_create
(
hb_font_t
*
font
HB_UNUSED
)
{
return
(
hb_graphite2_
shaper_
font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_graphite2_font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_graphite2_shaper_font_data_destroy
(
hb_graphite2_
shaper_
font_data_t
*
data
HB_UNUSED
)
_hb_graphite2_shaper_font_data_destroy
(
hb_graphite2_font_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -181,20 +181,20 @@ hb_graphite2_font_get_gr_font (hb_font_t *font)
* shaper shape_plan data
*/
struct
hb_graphite2_shape
r_shape
_plan_data_t
{};
struct
hb_graphite2_shape_plan_data_t
{};
hb_graphite2_shape
r_shape
_plan_data_t
*
hb_graphite2_shape_plan_data_t
*
_hb_graphite2_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_graphite2_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_graphite2_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_graphite2_shaper_shape_plan_data_destroy
(
hb_graphite2_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_graphite2_shaper_shape_plan_data_destroy
(
hb_graphite2_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
src/hb-ot-shape.cc
浏览文件 @
3d22aefe
...
...
@@ -27,8 +27,8 @@
*/
#define HB_SHAPER ot
#define hb_ot_
shaper_
face_data_t hb_ot_layout_t
#define hb_ot_shape
r_shape
_plan_data_t hb_ot_shape_plan_t
#define hb_ot_face_data_t hb_ot_layout_t
#define hb_ot_shape_plan_data_t hb_ot_shape_plan_t
#include "hb-shaper-impl-private.hh"
#include "hb-ot-shape-private.hh"
...
...
@@ -132,14 +132,14 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
HB_SHAPER_DATA_ENSURE_DEFINE
(
ot
,
face
)
hb_ot_
shaper_
face_data_t
*
hb_ot_face_data_t
*
_hb_ot_shaper_face_data_create
(
hb_face_t
*
face
)
{
return
_hb_ot_layout_create
(
face
);
}
void
_hb_ot_shaper_face_data_destroy
(
hb_ot_
shaper_
face_data_t
*
data
)
_hb_ot_shaper_face_data_destroy
(
hb_ot_face_data_t
*
data
)
{
_hb_ot_layout_destroy
(
data
);
}
...
...
@@ -151,16 +151,16 @@ _hb_ot_shaper_face_data_destroy (hb_ot_shaper_face_data_t *data)
HB_SHAPER_DATA_ENSURE_DEFINE
(
ot
,
font
)
struct
hb_ot_
shaper_
font_data_t
{};
struct
hb_ot_font_data_t
{};
hb_ot_
shaper_
font_data_t
*
hb_ot_font_data_t
*
_hb_ot_shaper_font_data_create
(
hb_font_t
*
font
HB_UNUSED
)
{
return
(
hb_ot_
shaper_
font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_ot_font_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_ot_shaper_font_data_destroy
(
hb_ot_
shaper_
font_data_t
*
data
)
_hb_ot_shaper_font_data_destroy
(
hb_ot_font_data_t
*
data
)
{
}
...
...
@@ -169,7 +169,7 @@ _hb_ot_shaper_font_data_destroy (hb_ot_shaper_font_data_t *data)
* shaper shape_plan data
*/
hb_ot_shape
r_shape
_plan_data_t
*
hb_ot_shape_plan_data_t
*
_hb_ot_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
,
const
hb_feature_t
*
user_features
,
unsigned
int
num_user_features
,
...
...
@@ -204,7 +204,7 @@ _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan,
}
void
_hb_ot_shaper_shape_plan_data_destroy
(
hb_ot_shape
r_shape
_plan_data_t
*
plan
)
_hb_ot_shaper_shape_plan_data_destroy
(
hb_ot_shape_plan_data_t
*
plan
)
{
if
(
plan
->
shaper
->
data_destroy
)
plan
->
shaper
->
data_destroy
(
const_cast
<
void
*>
(
plan
->
data
));
...
...
src/hb-shaper-private.hh
浏览文件 @
3d22aefe
...
...
@@ -54,7 +54,7 @@ _hb_shapers_get (void);
/* Means: tried but failed to create. */
#define HB_SHAPER_DATA_INVALID ((void *) -1)
#define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_
shaper_
##object##_data_t
#define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_##object##_data_t
#define HB_SHAPER_DATA_TYPE(shaper, object) struct HB_SHAPER_DATA_TYPE_NAME(shaper, object)
#define HB_SHAPER_DATA_INSTANCE(shaper, object, instance) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(instance)->shaper_data.shaper)
#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE(shaper, object, object)
...
...
src/hb-uniscribe.cc
浏览文件 @
3d22aefe
...
...
@@ -309,7 +309,7 @@ HB_SHAPER_DATA_ENSURE_DEFINE(uniscribe, font)
* shaper face data
*/
struct
hb_uniscribe_
shaper_
face_data_t
{
struct
hb_uniscribe_face_data_t
{
HANDLE
fh
;
hb_uniscribe_shaper_funcs_t
*
funcs
;
wchar_t
face_name
[
LF_FACESIZE
];
...
...
@@ -439,10 +439,10 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
HB_MEMORY_MODE_WRITABLE
,
nullptr
,
free
);
}
hb_uniscribe_
shaper_
face_data_t
*
hb_uniscribe_face_data_t
*
_hb_uniscribe_shaper_face_data_create
(
hb_face_t
*
face
)
{
hb_uniscribe_
shaper_face_data_t
*
data
=
(
hb_uniscribe_shaper
_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_uniscribe_shaper_face_data_t
));
hb_uniscribe_
face_data_t
*
data
=
(
hb_uniscribe
_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_uniscribe_shaper_face_data_t
));
if
(
unlikely
(
!
data
))
return
nullptr
;
...
...
@@ -479,7 +479,7 @@ _hb_uniscribe_shaper_face_data_create (hb_face_t *face)
}
void
_hb_uniscribe_shaper_face_data_destroy
(
hb_uniscribe_
shaper_
face_data_t
*
data
)
_hb_uniscribe_shaper_face_data_destroy
(
hb_uniscribe_face_data_t
*
data
)
{
RemoveFontMemResourceEx
(
data
->
fh
);
free
(
data
);
...
...
@@ -490,7 +490,7 @@ _hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_shaper_face_data_t *data)
* shaper font data
*/
struct
hb_uniscribe_
shaper_
font_data_t
{
struct
hb_uniscribe_font_data_t
{
HDC
hdc
;
LOGFONTW
log_font
;
HFONT
hfont
;
...
...
@@ -508,19 +508,19 @@ populate_log_font (LOGFONTW *lf,
lf
->
lfCharSet
=
DEFAULT_CHARSET
;
hb_face_t
*
face
=
font
->
face
;
hb_uniscribe_
shaper_
face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_uniscribe_face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
memcpy
(
lf
->
lfFaceName
,
face_data
->
face_name
,
sizeof
(
lf
->
lfFaceName
));
return
true
;
}
hb_uniscribe_
shaper_
font_data_t
*
hb_uniscribe_font_data_t
*
_hb_uniscribe_shaper_font_data_create
(
hb_font_t
*
font
)
{
if
(
unlikely
(
!
hb_uniscribe_shaper_face_data_ensure
(
font
->
face
)))
return
nullptr
;
hb_uniscribe_
shaper_font_data_t
*
data
=
(
hb_uniscribe_shaper
_font_data_t
*
)
calloc
(
1
,
sizeof
(
hb_uniscribe_shaper_font_data_t
));
hb_uniscribe_
font_data_t
*
data
=
(
hb_uniscribe
_font_data_t
*
)
calloc
(
1
,
sizeof
(
hb_uniscribe_shaper_font_data_t
));
if
(
unlikely
(
!
data
))
return
nullptr
;
...
...
@@ -559,7 +559,7 @@ _hb_uniscribe_shaper_font_data_create (hb_font_t *font)
}
void
_hb_uniscribe_shaper_font_data_destroy
(
hb_uniscribe_
shaper_
font_data_t
*
data
)
_hb_uniscribe_shaper_font_data_destroy
(
hb_uniscribe_font_data_t
*
data
)
{
if
(
data
->
hdc
)
ReleaseDC
(
nullptr
,
data
->
hdc
);
...
...
@@ -574,7 +574,7 @@ LOGFONTW *
hb_uniscribe_font_get_logfontw
(
hb_font_t
*
font
)
{
if
(
unlikely
(
!
hb_uniscribe_shaper_font_data_ensure
(
font
)))
return
nullptr
;
hb_uniscribe_
shaper_
font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
hb_uniscribe_font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
return
&
font_data
->
log_font
;
}
...
...
@@ -582,7 +582,7 @@ HFONT
hb_uniscribe_font_get_hfont
(
hb_font_t
*
font
)
{
if
(
unlikely
(
!
hb_uniscribe_shaper_font_data_ensure
(
font
)))
return
nullptr
;
hb_uniscribe_
shaper_
font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
hb_uniscribe_font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
return
font_data
->
hfont
;
}
...
...
@@ -591,20 +591,20 @@ hb_uniscribe_font_get_hfont (hb_font_t *font)
* shaper shape_plan data
*/
struct
hb_uniscribe_shape
r_shape
_plan_data_t
{};
struct
hb_uniscribe_shape_plan_data_t
{};
hb_uniscribe_shape
r_shape
_plan_data_t
*
hb_uniscribe_shape_plan_data_t
*
_hb_uniscribe_shaper_shape_plan_data_create
(
hb_shape_plan_t
*
shape_plan
HB_UNUSED
,
const
hb_feature_t
*
user_features
HB_UNUSED
,
unsigned
int
num_user_features
HB_UNUSED
,
const
int
*
coords
HB_UNUSED
,
unsigned
int
num_coords
HB_UNUSED
)
{
return
(
hb_uniscribe_shape
r_shape
_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
(
hb_uniscribe_shape_plan_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
}
void
_hb_uniscribe_shaper_shape_plan_data_destroy
(
hb_uniscribe_shape
r_shape
_plan_data_t
*
data
HB_UNUSED
)
_hb_uniscribe_shaper_shape_plan_data_destroy
(
hb_uniscribe_shape_plan_data_t
*
data
HB_UNUSED
)
{
}
...
...
@@ -622,8 +622,8 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
unsigned
int
num_features
)
{
hb_face_t
*
face
=
font
->
face
;
hb_uniscribe_
shaper_
face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_uniscribe_
shaper_
font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
hb_uniscribe_face_data_t
*
face_data
=
HB_SHAPER_DATA_GET
(
face
);
hb_uniscribe_font_data_t
*
font_data
=
HB_SHAPER_DATA_GET
(
font
);
hb_uniscribe_shaper_funcs_t
*
funcs
=
face_data
->
funcs
;
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录