Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
43b65315
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,发现更多精彩内容 >>
提交
43b65315
编写于
11月 16, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Indic] Another try to unbreak Sinhala split matras
Just read the comments...
上级
977f1740
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
8 deletion
+40
-8
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+35
-8
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/MANIFEST
...s/in-tree/shaper-indic/indic/script-sinhala/misc/MANIFEST
+1
-0
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/split-matras.txt
...e/shaper-indic/indic/script-sinhala/misc/split-matras.txt
+4
-0
未找到文件。
src/hb-ot-shape-complex-indic.cc
浏览文件 @
43b65315
...
@@ -1317,15 +1317,42 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
...
@@ -1317,15 +1317,42 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
#endif
#endif
}
}
if
(
indic_options
().
uniscribe_bug_compatible
)
if
((
ab
==
0x0DDA
||
hb_in_range
<
hb_codepoint_t
>
(
ab
,
0x0DDC
,
0x0DDE
)))
switch
(
ab
)
{
{
/* These Sinhala ones have Unicode decompositions, but Uniscribe
/*
* decomposes them "Khmer-style". */
* Sinhala split matras... Let the fun begin.
case
0x0DDA
:
*
a
=
0x0DD9
;
*
b
=
0x0DDA
;
return
true
;
*
case
0x0DDC
:
*
a
=
0x0DD9
;
*
b
=
0x0DDC
;
return
true
;
* These four characters have Unicode decompositions. However, Uniscribe
case
0x0DDD
:
*
a
=
0x0DD9
;
*
b
=
0x0DDD
;
return
true
;
* decomposes them "Khmer-style", that is, it uses the character itself to
case
0x0DDE
:
*
a
=
0x0DD9
;
*
b
=
0x0DDE
;
return
true
;
* get the second half. The first half of all four decompositions is always
* U+0DD9.
*
* Now, there are buggy fonts, namely, the widely used lklug.ttf, that are
* broken with Uniscribe. But we need to support them. As such, we only
* do the Uniscribe-style decomposition if the character is transformed into
* its "sec.half" form by the 'pstf' feature. Otherwise, we fall back to
* Unicode decomposition.
*
* Note that we can't unconditionally use Unicode decomposition. That would
* break some other fonts, that are designed to work with Uniscribe, and
* don't have positioning features for the Unicode-style decomposition.
*
* Argh...
*/
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
c
->
plan
->
data
;
hb_codepoint_t
glyph
;
if
(
indic_options
().
uniscribe_bug_compatible
||
(
c
->
font
->
get_glyph
(
ab
,
0
,
&
glyph
)
&&
indic_plan
->
pstf
.
would_substitute
(
&
glyph
,
1
,
true
,
c
->
font
->
face
)))
{
/* Ok, safe to use Uniscribe-style decomposition. */
*
a
=
0x0DD9
;
*
b
=
ab
;
return
true
;
}
}
}
return
c
->
unicode
->
decompose
(
ab
,
a
,
b
);
return
c
->
unicode
->
decompose
(
ab
,
a
,
b
);
...
...
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/MANIFEST
浏览文件 @
43b65315
extensive.txt
extensive.txt
misc.txt
misc.txt
reph.txt
reph.txt
split-matras.txt
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/split-matras.txt
0 → 100644
浏览文件 @
43b65315
කේ
කො
කෝ
කෞ
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录