Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
574d888c
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看板
提交
574d888c
编写于
11月 25, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[aat] Ignore GSUB table of Muthu Foundry if they have morx table
Fixes
https://github.com/harfbuzz/harfbuzz/issues/1410
上级
4151c284
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
1 deletion
+46
-1
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+3
-0
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+3
-0
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+5
-0
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+35
-1
未找到文件。
src/hb-ot-layout-gpos-table.hh
浏览文件 @
574d888c
...
...
@@ -1643,6 +1643,9 @@ struct GPOS : GSUBGPOS
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
return
GSUBGPOS
::
sanitize
<
PosLookup
>
(
c
);
}
HB_INTERNAL
bool
is_blacklisted
(
hb_blob_t
*
blob
,
hb_face_t
*
face
)
const
;
typedef
GSUBGPOS
::
accelerator_t
<
GPOS
>
accelerator_t
;
};
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
574d888c
...
...
@@ -1486,6 +1486,9 @@ struct GSUB : GSUBGPOS
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
return
GSUBGPOS
::
sanitize
<
SubstLookup
>
(
c
);
}
HB_INTERNAL
bool
is_blacklisted
(
hb_blob_t
*
blob
,
hb_face_t
*
face
)
const
;
typedef
GSUBGPOS
::
accelerator_t
<
GSUB
>
accelerator_t
;
};
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
574d888c
...
...
@@ -2753,6 +2753,11 @@ struct GSUBGPOS
inline
void
init
(
hb_face_t
*
face
)
{
this
->
table
=
hb_sanitize_context_t
().
reference_table
<
T
>
(
face
);
if
(
unlikely
(
this
->
table
->
is_blacklisted
(
this
->
table
.
get_blob
(),
face
)))
{
hb_blob_destroy
(
this
->
table
.
get_blob
());
this
->
table
=
hb_blob_get_empty
();
}
this
->
lookup_count
=
table
->
get_lookup_count
();
...
...
src/hb-ot-layout.cc
浏览文件 @
574d888c
...
...
@@ -34,15 +34,17 @@
#include "hb-ot-map.hh"
#include "hb-map.hh"
#include "hb-ot-kern-table.hh"
#include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gsub-table.hh"
#include "hb-ot-layout-gpos-table.hh"
#include "hb-ot-layout-base-table.hh" // Just so we compile it; unused otherwise
#include "hb-ot-layout-jstf-table.hh" // Just so we compile it; unused otherwise
#include "hb-ot-kern-table.hh"
#include "hb-ot-name-table.hh"
#include "hb-ot-os2-table.hh"
#include "hb-aat-layout-lcar-table.hh"
#include "hb-aat-layout-morx-table.hh"
/**
...
...
@@ -284,6 +286,38 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font,
* GSUB/GPOS
*/
bool
OT
::
GSUB
::
is_blacklisted
(
hb_blob_t
*
blob
HB_UNUSED
,
hb_face_t
*
face
)
const
{
/* Mac OS X prefers morx over GSUB. It also ships with various Indic fonts,
* all by 'MUTF' foundry (Tamil MN, Tamil Sangam MN, etc.), that have broken
* GSUB/GPOS tables. Some have GSUB with zero scripts, those are ignored by
* our morx/GSUB preference code. But if GSUB has non-zero scripts, we tend
* to prefer it over morx because we want to be consistent with other OpenType
* shapers.
*
* To work around broken Indic Mac system fonts, we ignore GSUB table if
* OS/2 VendorId is 'MUTF' and font has morx table as well.
*
* https://github.com/harfbuzz/harfbuzz/issues/1410
* https://github.com/harfbuzz/harfbuzz/issues/1348
* https://github.com/harfbuzz/harfbuzz/issues/1391
*/
if
(
unlikely
(
face
->
table
.
OS2
->
achVendID
==
HB_TAG
(
'M'
,
'U'
,
'T'
,
'F'
)
&&
face
->
table
.
morx
->
has_data
()))
return
true
;
return
false
;
}
bool
OT
::
GPOS
::
is_blacklisted
(
hb_blob_t
*
blob
HB_UNUSED
,
hb_face_t
*
face
HB_UNUSED
)
const
{
return
false
;
}
static
const
OT
::
GSUBGPOS
&
get_gsubgpos_table
(
hb_face_t
*
face
,
hb_tag_t
table_tag
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录