Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
acd88e65
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看板
提交
acd88e65
编写于
4月 10, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
In Arabic fallback shaping, check that the font has glyph for new char
上级
7752aa73
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
13 deletion
+16
-13
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+7
-5
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+1
-1
src/hb-ot-shape-complex-misc.cc
src/hb-ot-shape-complex-misc.cc
+3
-3
src/hb-ot-shape-complex-private.hh
src/hb-ot-shape-complex-private.hh
+4
-3
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
未找到文件。
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
acd88e65
...
...
@@ -205,20 +205,22 @@ _hb_ot_shape_complex_normalization_preference_arabic (void)
static
void
arabic_fallback_shape
(
hb_buffer_t
*
buffer
)
arabic_fallback_shape
(
hb_
font_t
*
font
,
hb_
buffer_t
*
buffer
)
{
unsigned
int
count
=
buffer
->
len
;
hb_codepoint_t
glyph
;
/* Shape to presentation forms */
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
buffer
->
info
[
i
].
codepoint
=
get_arabic_shape
(
buffer
->
info
[
i
].
codepoint
,
buffer
->
info
[
i
].
arabic_shaping_action
());
if
(
hb_font_get_glyph
(
font
,
buffer
->
info
[
i
].
codepoint
,
0
,
&
glyph
))
buffer
->
info
[
i
].
codepoint
=
get_arabic_shape
(
buffer
->
info
[
i
].
codepoint
,
buffer
->
info
[
i
].
arabic_shaping_action
());
/* Mandatory ligatures */
buffer
->
clear_output
();
for
(
buffer
->
idx
=
0
;
buffer
->
idx
+
1
<
count
;)
{
uint16_t
ligature
=
get_ligature
(
buffer
->
info
[
buffer
->
idx
].
codepoint
,
buffer
->
info
[
buffer
->
idx
+
1
].
codepoint
);
if
(
likely
(
!
ligature
))
{
if
(
likely
(
!
ligature
)
||
!
(
hb_font_get_glyph
(
font
,
ligature
,
0
,
&
glyph
))
)
{
buffer
->
next_glyph
();
continue
;
}
...
...
@@ -234,7 +236,7 @@ arabic_fallback_shape (hb_buffer_t *buffer)
}
void
_hb_ot_shape_complex_setup_masks_arabic
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
_hb_ot_shape_complex_setup_masks_arabic
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
unsigned
int
count
=
buffer
->
len
;
unsigned
int
prev
=
0
,
state
=
0
;
...
...
@@ -281,7 +283,7 @@ _hb_ot_shape_complex_setup_masks_arabic (hb_ot_map_t *map, hb_buffer_t *buffer)
* Most probably it's safe to assume that init/medi/fina/isol
* still mean Arabic shaping, although they do not have to.
*/
arabic_fallback_shape
(
buffer
);
arabic_fallback_shape
(
font
,
buffer
);
}
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
acd88e65
...
...
@@ -378,7 +378,7 @@ _hb_ot_shape_complex_normalization_preference_indic (void)
void
_hb_ot_shape_complex_setup_masks_indic
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
_hb_ot_shape_complex_setup_masks_indic
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
HB_BUFFER_ALLOCATE_VAR
(
buffer
,
indic_category
);
HB_BUFFER_ALLOCATE_VAR
(
buffer
,
indic_position
);
...
...
src/hb-ot-shape-complex-misc.cc
浏览文件 @
acd88e65
...
...
@@ -48,7 +48,7 @@ _hb_ot_shape_complex_normalization_preference_default (void)
}
void
_hb_ot_shape_complex_setup_masks_default
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
_hb_ot_shape_complex_setup_masks_default
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
}
...
...
@@ -68,7 +68,7 @@ _hb_ot_shape_complex_normalization_preference_hangul (void)
}
void
_hb_ot_shape_complex_setup_masks_hangul
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
_hb_ot_shape_complex_setup_masks_hangul
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
}
...
...
@@ -88,7 +88,7 @@ _hb_ot_shape_complex_normalization_preference_thai (void)
}
void
_hb_ot_shape_complex_setup_masks_thai
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
_hb_ot_shape_complex_setup_masks_thai
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
/* The following is NOT specified in the MS OT Thai spec, however, it seems
* to be what Uniscribe and other engines implement. According to Eric Muller:
...
...
src/hb-ot-shape-complex-private.hh
浏览文件 @
acd88e65
...
...
@@ -280,7 +280,7 @@ hb_ot_shape_complex_normalization_preference (hb_ot_complex_shaper_t shaper)
* Shapers should use map to get feature masks and set on buffer.
*/
typedef
void
hb_ot_shape_complex_setup_masks_func_t
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
);
typedef
void
hb_ot_shape_complex_setup_masks_func_t
(
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
,
hb_font_t
*
font
);
#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
HB_INTERNAL hb_ot_shape_complex_setup_masks_func_t _hb_ot_shape_complex_setup_masks_##name;
HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
...
...
@@ -289,12 +289,13 @@ typedef void hb_ot_shape_complex_setup_masks_func_t (hb_ot_map_t *map, hb_buffer
static
inline
void
hb_ot_shape_complex_setup_masks
(
hb_ot_complex_shaper_t
shaper
,
hb_ot_map_t
*
map
,
hb_buffer_t
*
buffer
)
hb_buffer_t
*
buffer
,
hb_font_t
*
font
)
{
switch
(
shaper
)
{
default:
#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
case hb_ot_complex_shaper_##name: _hb_ot_shape_complex_setup_masks_##name (map, buffer); return;
case hb_ot_complex_shaper_##name: _hb_ot_shape_complex_setup_masks_##name (map, buffer
, font
); return;
HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
#undef HB_COMPLEX_SHAPER_IMPLEMENT
}
...
...
src/hb-ot-shape.cc
浏览文件 @
acd88e65
...
...
@@ -114,7 +114,7 @@ hb_ot_shape_setup_masks (hb_ot_shape_context_t *c)
hb_mask_t
global_mask
=
c
->
plan
->
map
.
get_global_mask
();
c
->
buffer
->
reset_masks
(
global_mask
);
hb_ot_shape_complex_setup_masks
(
c
->
plan
->
shaper
,
&
c
->
plan
->
map
,
c
->
buffer
);
hb_ot_shape_complex_setup_masks
(
c
->
plan
->
shaper
,
&
c
->
plan
->
map
,
c
->
buffer
,
c
->
font
);
for
(
unsigned
int
i
=
0
;
i
<
c
->
num_user_features
;
i
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录