Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7aad5365
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看板
提交
7aad5365
编写于
6月 26, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[config] Add HB_NO_OT_SHAPE / HB_NO_OT
Part of
https://github.com/harfbuzz/harfbuzz/issues/1652
上级
cee9f6e0
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
154 addition
and
0 deletion
+154
-0
CONFIG.md
CONFIG.md
+14
-0
src/gen-indic-table.py
src/gen-indic-table.py
+6
-0
src/gen-use-table.py
src/gen-use-table.py
+6
-0
src/gen-vowel-constraints.py
src/gen-vowel-constraints.py
+7
-0
src/hb-config.hh
src/hb-config.hh
+4
-0
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+6
-0
src/hb-ot-shape-complex-default.cc
src/hb-ot-shape-complex-default.cc
+7
-0
src/hb-ot-shape-complex-hangul.cc
src/hb-ot-shape-complex-hangul.cc
+7
-0
src/hb-ot-shape-complex-hebrew.cc
src/hb-ot-shape-complex-hebrew.cc
+7
-0
src/hb-ot-shape-complex-indic-table.cc
src/hb-ot-shape-complex-indic-table.cc
+6
-0
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+7
-0
src/hb-ot-shape-complex-khmer.cc
src/hb-ot-shape-complex-khmer.cc
+7
-0
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-myanmar.cc
+7
-0
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape-complex-thai.cc
+7
-0
src/hb-ot-shape-complex-use-table.cc
src/hb-ot-shape-complex-use-table.cc
+6
-0
src/hb-ot-shape-complex-use.cc
src/hb-ot-shape-complex-use.cc
+7
-0
src/hb-ot-shape-complex-vowel-constraints.cc
src/hb-ot-shape-complex-vowel-constraints.cc
+6
-0
src/hb-ot-shape-fallback.cc
src/hb-ot-shape-fallback.cc
+7
-0
src/hb-ot-shape-normalize.cc
src/hb-ot-shape-normalize.cc
+7
-0
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+7
-0
src/hb-shape-plan.cc
src/hb-shape-plan.cc
+10
-0
src/hb-shape-plan.hh
src/hb-shape-plan.hh
+4
-0
src/hb-shaper-list.hh
src/hb-shaper-list.hh
+2
-0
未找到文件。
CONFIG.md
浏览文件 @
7aad5365
...
...
@@ -86,6 +86,20 @@ In that case, or if you otherwise provide those functions by calling
without loss of functionality by defining
`HB_NO_OT_FONT`
.
## Shapers
Most HarfBuzz clients use it for the main shaper, called "ot". However, it
is legitimate to want to compile HarfBuzz with only another backend, eg.
CoreText, for example for an iOS app. For that, you want
`HB_NO_OT_SHAPE`
,
or more generally
`HB_NO_OT`
.
This is very rarely what you need. Make sure you understand exactly what you
are doing.
Defining
`HB_NO_FALLBACK_SHAPE`
however is pretty harmless. That removes the
(unused) "fallback" shaper.
## Thread-safety
By default HarfBuzz builds as a thread-safe library. The exception is that
...
...
src/gen-indic-table.py
浏览文件 @
7aad5365
...
...
@@ -98,6 +98,10 @@ for h in headers:
print
(
" * %s"
%
(
l
.
strip
()))
print
(
" */"
)
print
()
print
(
'#include "hb.hh"'
)
print
()
print
(
'#ifndef HB_NO_OT_SHAPE'
)
print
()
print
(
'#include "hb-ot-shape-complex-indic.hh"'
)
print
()
...
...
@@ -251,6 +255,8 @@ for i in range (2):
print
(
"#undef %s_%s"
%
(
what_short
[
i
],
short
[
i
][
v
]))
print
()
print
()
print
(
'#endif'
)
print
(
"/* == End of generated table == */"
)
# Maintain at least 30% occupancy in the table */
...
...
src/gen-use-table.py
浏览文件 @
7aad5365
...
...
@@ -419,6 +419,10 @@ for h in headers:
print
(
" * %s"
%
(
l
.
strip
()))
print
(
" */"
)
print
()
print
(
'#include "hb.hh"'
)
print
()
print
(
'#ifndef HB_NO_OT_SHAPE'
)
print
()
print
(
'#include "hb-ot-shape-complex-use.hh"'
)
print
()
...
...
@@ -533,6 +537,8 @@ for k,v in sorted(use_positions.items()):
tag
=
k
+
suf
print
(
"#undef %s"
%
tag
)
print
()
print
()
print
(
'#endif'
)
print
(
"/* == End of generated table == */"
)
# Maintain at least 50% occupancy in the table */
...
...
src/gen-vowel-constraints.py
浏览文件 @
7aad5365
...
...
@@ -157,6 +157,11 @@ print (' *')
for
line
in
scripts_header
:
print
(
' * %s'
%
line
.
strip
())
print
(
' */'
)
print
()
print
(
'#include "hb.hh"'
)
print
()
print
(
'#ifndef HB_NO_OT_SHAPE'
)
print
()
print
(
'#include "hb-ot-shape-complex-vowel-constraints.hh"'
)
print
()
...
...
@@ -223,4 +228,6 @@ print (' }')
print
(
'}'
)
print
()
print
()
print
(
'#endif'
)
print
(
'/* == End of generated functions == */'
)
src/hb-config.hh
浏览文件 @
7aad5365
...
...
@@ -121,6 +121,10 @@
#define HB_NO_OT_NAME_LANGUAGE
#endif
#ifdef HB_NO_OT
#define HB_NO_OT_SHAPE
#endif
#ifdef HB_NO_OT_SHAPE_FALLBACK
#define HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK
#define HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
...
...
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
7aad5365
...
...
@@ -25,6 +25,9 @@
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-arabic.hh"
#include "hb-ot-shape.hh"
...
...
@@ -710,3 +713,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE
,
true
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-default.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex.hh"
...
...
@@ -44,3 +48,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE
,
true
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-hangul.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex.hh"
...
...
@@ -430,3 +434,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hangul =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-hebrew.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex.hh"
...
...
@@ -176,3 +180,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE
,
true
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-indic-table.cc
浏览文件 @
7aad5365
...
...
@@ -14,6 +14,10 @@
* # Date: 2018-07-30, 19:40:00 GMT [KW]
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-indic.hh"
#pragma GCC diagnostic push
...
...
@@ -487,4 +491,6 @@ hb_indic_get_categories (hb_codepoint_t u)
#undef IMC_TR
#undef IMC_VOL
#endif
/* == End of generated table == */
src/hb-ot-shape-complex-indic.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-indic.hh"
#include "hb-ot-shape-complex-vowel-constraints.hh"
#include "hb-ot-layout.hh"
...
...
@@ -1648,3 +1652,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-khmer.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-khmer.hh"
#include "hb-ot-layout.hh"
...
...
@@ -502,3 +506,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_khmer =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-myanmar.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-myanmar.hh"
...
...
@@ -415,3 +419,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_zawgyi =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-thai.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex.hh"
...
...
@@ -385,3 +389,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-use-table.cc
浏览文件 @
7aad5365
...
...
@@ -15,6 +15,10 @@
* UnicodeData.txt does not have a header.
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-use.hh"
#pragma GCC diagnostic push
...
...
@@ -851,4 +855,6 @@ hb_use_get_category (hb_codepoint_t u)
#undef VMPst
#undef VMAbv
#endif
/* == End of generated table == */
src/hb-ot-shape-complex-use.cc
浏览文件 @
7aad5365
...
...
@@ -26,6 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-use.hh"
#include "hb-ot-shape-complex-arabic.hh"
#include "hb-ot-shape-complex-vowel-constraints.hh"
...
...
@@ -643,3 +647,6 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_use =
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY
,
false
,
/* fallback_position */
};
#endif
src/hb-ot-shape-complex-vowel-constraints.cc
浏览文件 @
7aad5365
...
...
@@ -13,6 +13,10 @@
* # Date: 2019-01-28, 22:16:47 GMT
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-complex-vowel-constraints.hh"
static
void
...
...
@@ -440,4 +444,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
}
#endif
/* == End of generated functions == */
src/hb-ot-shape-fallback.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-fallback.hh"
#include "hb-kern.hh"
...
...
@@ -587,3 +591,6 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan HB_UNUSED,
}
}
}
#endif
src/hb-ot-shape-normalize.cc
浏览文件 @
7aad5365
...
...
@@ -24,6 +24,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-ot-shape-normalize.hh"
#include "hb-ot-shape-complex.hh"
#include "hb-ot-shape.hh"
...
...
@@ -469,3 +473,6 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
buffer
->
swap_buffers
();
}
}
#endif
src/hb-ot-shape.cc
浏览文件 @
7aad5365
...
...
@@ -26,6 +26,10 @@
* Google Author(s): Behdad Esfahbod
*/
#include "hb.hh"
#ifndef HB_NO_OT_SHAPE
#include "hb-shaper-impl.hh"
#include "hb-ot-shape.hh"
...
...
@@ -1146,3 +1150,6 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
hb_shape_plan_destroy
(
shape_plan
);
}
#endif
src/hb-shape-plan.cc
浏览文件 @
7aad5365
...
...
@@ -79,7 +79,9 @@ hb_shape_plan_key_t::init (bool copy,
}
this
->
shaper_func
=
nullptr
;
this
->
shaper_name
=
nullptr
;
#ifndef HB_NO_OT_SHAPE
this
->
ot
.
init
(
face
,
coords
,
num_coords
);
#endif
/*
* Choose shaper.
...
...
@@ -148,7 +150,9 @@ hb_shape_plan_key_t::equal (const hb_shape_plan_key_t *other)
{
return
hb_segment_properties_equal
(
&
this
->
props
,
&
other
->
props
)
&&
this
->
user_features_match
(
other
)
&&
#ifndef HB_NO_OT_SHAPE
this
->
ot
.
equal
(
&
other
->
ot
)
&&
#endif
this
->
shaper_func
==
other
->
shaper_func
;
}
...
...
@@ -224,12 +228,16 @@ hb_shape_plan_create2 (hb_face_t *face,
num_coords
,
shaper_list
)))
goto
bail2
;
#ifndef HB_NO_OT_SHAPE
if
(
unlikely
(
!
shape_plan
->
ot
.
init0
(
face
,
&
shape_plan
->
key
)))
goto
bail3
;
#endif
return
shape_plan
;
#ifndef HB_NO_OT_SHAPE
bail3:
#endif
shape_plan
->
key
.
free
();
bail2:
free
(
shape_plan
);
...
...
@@ -281,7 +289,9 @@ hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
{
if
(
!
hb_object_destroy
(
shape_plan
))
return
;
#ifndef HB_NO_OT_SHAPE
shape_plan
->
ot
.
fini
();
#endif
shape_plan
->
key
.
free
();
free
(
shape_plan
);
}
...
...
src/hb-shape-plan.hh
浏览文件 @
7aad5365
...
...
@@ -39,7 +39,9 @@ struct hb_shape_plan_key_t
const
hb_feature_t
*
user_features
;
unsigned
int
num_user_features
;
#ifndef HB_NO_OT_SHAPE
hb_ot_shape_plan_key_t
ot
;
#endif
hb_shape_func_t
*
shaper_func
;
const
char
*
shaper_name
;
...
...
@@ -65,7 +67,9 @@ struct hb_shape_plan_t
hb_object_header_t
header
;
hb_face_t
*
face_unsafe
;
/* We don't carry a reference to face. */
hb_shape_plan_key_t
key
;
#ifndef HB_NO_OT_SHAPE
hb_ot_shape_plan_t
ot
;
#endif
};
...
...
src/hb-shaper-list.hh
浏览文件 @
7aad5365
...
...
@@ -35,7 +35,9 @@
HB_SHAPER_IMPLEMENT
(
graphite2
)
#endif
#ifndef HB_NO_OT_SHAPE
HB_SHAPER_IMPLEMENT
(
ot
)
/* <--- This is our main OpenType shaper. */
#endif
#ifdef HAVE_UNISCRIBE
HB_SHAPER_IMPLEMENT
(
uniscribe
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录