Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f24b0b97
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
f24b0b97
编写于
4月 12, 2018
作者:
E
Ebrahim Byagowi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update the links and revive the dead ones
上级
a02c3ee7
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
54 addition
and
55 deletion
+54
-55
src/hb-common.cc
src/hb-common.cc
+2
-2
src/hb-common.h
src/hb-common.h
+3
-3
src/hb-coretext.cc
src/hb-coretext.cc
+3
-3
src/hb-ft.cc
src/hb-ft.cc
+1
-1
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+6
-6
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+4
-4
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+1
-1
src/hb-ot-layout.h
src/hb-ot-layout.h
+1
-1
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+2
-2
src/hb-ot-shape-complex-indic-private.hh
src/hb-ot-shape-complex-indic-private.hh
+1
-1
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+2
-2
src/hb-ot-shape-complex-khmer.cc
src/hb-ot-shape-complex-khmer.cc
+1
-1
src/hb-ot-shape-complex-myanmar-private.hh
src/hb-ot-shape-complex-myanmar-private.hh
+1
-1
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-myanmar.cc
+1
-1
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape-complex-thai.cc
+1
-1
src/hb-ot-shape-complex-use-private.hh
src/hb-ot-shape-complex-use-private.hh
+1
-1
src/hb-ot-shape-complex-use.cc
src/hb-ot-shape-complex-use.cc
+1
-1
src/hb-ot-shape-fallback.cc
src/hb-ot-shape-fallback.cc
+1
-1
src/hb-ot-tag.cc
src/hb-ot-tag.cc
+4
-5
src/hb-private.hh
src/hb-private.hh
+2
-2
src/hb-string-array.hh
src/hb-string-array.hh
+1
-1
src/hb-unicode-private.hh
src/hb-unicode-private.hh
+9
-9
test/api/test-buffer.c
test/api/test-buffer.c
+1
-1
test/api/test-ot-tag.c
test/api/test-ot-tag.c
+3
-3
test/api/test-shape.c
test/api/test-shape.c
+1
-1
未找到文件。
src/hb-common.cc
浏览文件 @
f24b0b97
...
@@ -412,7 +412,7 @@ hb_script_from_iso15924_tag (hb_tag_t tag)
...
@@ -412,7 +412,7 @@ hb_script_from_iso15924_tag (hb_tag_t tag)
case
HB_TAG
(
'Q'
,
'a'
,
'a'
,
'i'
):
return
HB_SCRIPT_INHERITED
;
case
HB_TAG
(
'Q'
,
'a'
,
'a'
,
'i'
):
return
HB_SCRIPT_INHERITED
;
case
HB_TAG
(
'Q'
,
'a'
,
'a'
,
'c'
):
return
HB_SCRIPT_COPTIC
;
case
HB_TAG
(
'Q'
,
'a'
,
'a'
,
'c'
):
return
HB_SCRIPT_COPTIC
;
/* Script variants from http://unicode.org/iso15924/ */
/* Script variants from http
s
://unicode.org/iso15924/ */
case
HB_TAG
(
'C'
,
'y'
,
'r'
,
's'
):
return
HB_SCRIPT_CYRILLIC
;
case
HB_TAG
(
'C'
,
'y'
,
'r'
,
's'
):
return
HB_SCRIPT_CYRILLIC
;
case
HB_TAG
(
'L'
,
'a'
,
't'
,
'f'
):
return
HB_SCRIPT_LATIN
;
case
HB_TAG
(
'L'
,
'a'
,
't'
,
'f'
):
return
HB_SCRIPT_LATIN
;
case
HB_TAG
(
'L'
,
'a'
,
't'
,
'g'
):
return
HB_SCRIPT_LATIN
;
case
HB_TAG
(
'L'
,
'a'
,
't'
,
'g'
):
return
HB_SCRIPT_LATIN
;
...
@@ -480,7 +480,7 @@ hb_script_to_iso15924_tag (hb_script_t script)
...
@@ -480,7 +480,7 @@ hb_script_to_iso15924_tag (hb_script_t script)
hb_direction_t
hb_direction_t
hb_script_get_horizontal_direction
(
hb_script_t
script
)
hb_script_get_horizontal_direction
(
hb_script_t
script
)
{
{
/* http
://goo.gl/x9ilM
*/
/* http
s://docs.google.com/spreadsheets/d/1Y90M0Ie3MUJ6UVCRDOypOtijlMDLNNyyLk36T6iMu0o
*/
switch
((
hb_tag_t
)
script
)
switch
((
hb_tag_t
)
script
)
{
{
/* Unicode-1.1 additions */
/* Unicode-1.1 additions */
...
...
src/hb-common.h
浏览文件 @
f24b0b97
...
@@ -142,8 +142,8 @@ hb_language_get_default (void);
...
@@ -142,8 +142,8 @@ hb_language_get_default (void);
/* hb_script_t */
/* hb_script_t */
/* http://unicode.org/iso15924/ */
/* http
s
://unicode.org/iso15924/ */
/* http
://goo.gl/x9ilM
*/
/* http
s://docs.google.com/spreadsheets/d/1Y90M0Ie3MUJ6UVCRDOypOtijlMDLNNyyLk36T6iMu0o
*/
/* Unicode Character Database property: Script (sc) */
/* Unicode Character Database property: Script (sc) */
typedef
enum
typedef
enum
{
{
...
@@ -323,7 +323,7 @@ typedef enum
...
@@ -323,7 +323,7 @@ typedef enum
* since technically enums are int, and indeed, hb_script_t ends up being signed.
* since technically enums are int, and indeed, hb_script_t ends up being signed.
* See this thread for technicalities:
* See this thread for technicalities:
*
*
* http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
* http
s
://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
*/
*/
_HB_SCRIPT_MAX_VALUE
=
HB_TAG_MAX
,
/*< skip >*/
_HB_SCRIPT_MAX_VALUE
=
HB_TAG_MAX
,
/*< skip >*/
_HB_SCRIPT_MAX_VALUE_SIGNED
=
HB_TAG_MAX_SIGNED
/*< skip >*/
_HB_SCRIPT_MAX_VALUE_SIGNED
=
HB_TAG_MAX_SIGNED
/*< skip >*/
...
...
src/hb-coretext.cc
浏览文件 @
f24b0b97
...
@@ -1005,7 +1005,7 @@ resize_and_retry:
...
@@ -1005,7 +1005,7 @@ resize_and_retry:
/* For right-to-left runs, CoreText returns the glyphs positioned such that
/* For right-to-left runs, CoreText returns the glyphs positioned such that
* any trailing whitespace is to the left of (0,0). Adjust coordinate system
* any trailing whitespace is to the left of (0,0). Adjust coordinate system
* to fix for that. Test with any RTL string with trailing spaces.
* to fix for that. Test with any RTL string with trailing spaces.
* https://c
ode.google.com/p/chromium/issues/detail?id=
469028
* https://c
rbug.com/
469028
*/
*/
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
{
{
...
@@ -1058,7 +1058,7 @@ resize_and_retry:
...
@@ -1058,7 +1058,7 @@ resize_and_retry:
* However, even that wouldn't work if we were passed in the CGFont to
* However, even that wouldn't work if we were passed in the CGFont to
* construct a hb_face to begin with.
* construct a hb_face to begin with.
*
*
* See: http://github.com/harfbuzz/harfbuzz/pull/36
* See: http
s
://github.com/harfbuzz/harfbuzz/pull/36
*
*
* Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=597098
* Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=597098
*/
*/
...
@@ -1248,7 +1248,7 @@ resize_and_retry:
...
@@ -1248,7 +1248,7 @@ resize_and_retry:
* directions. As such, disable the assert... It wouldn't crash, but
* directions. As such, disable the assert... It wouldn't crash, but
* cursoring will be off...
* cursoring will be off...
*
*
* http://crbug.com/419769
* http
s
://crbug.com/419769
*/
*/
if
(
0
)
if
(
0
)
{
{
...
...
src/hb-ft.cc
浏览文件 @
f24b0b97
...
@@ -177,7 +177,7 @@ hb_ft_get_nominal_glyph (hb_font_t *font HB_UNUSED,
...
@@ -177,7 +177,7 @@ hb_ft_get_nominal_glyph (hb_font_t *font HB_UNUSED,
/* For symbol-encoded OpenType fonts, we duplicate the
/* For symbol-encoded OpenType fonts, we duplicate the
* U+F000..F0FF range at U+0000..U+00FF. That's what
* U+F000..F0FF range at U+0000..U+00FF. That's what
* Windows seems to do, and that's hinted about at:
* Windows seems to do, and that's hinted about at:
* http
://www.microsoft.com/typography/otspec/recom.ht
m
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/reco
m
* under "Non-Standard (Symbol) Fonts". */
* under "Non-Standard (Symbol) Fonts". */
g
=
FT_Get_Char_Index
(
ft_font
->
ft_face
,
0xF000u
+
unicode
);
g
=
FT_Get_Char_Index
(
ft_font
->
ft_face
,
0xF000u
+
unicode
);
if
(
!
g
)
if
(
!
g
)
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
f24b0b97
...
@@ -30,16 +30,16 @@
...
@@ -30,16 +30,16 @@
#include "hb-open-type-private.hh"
#include "hb-open-type-private.hh"
#include "hb-subset-plan.hh"
#include "hb-subset-plan.hh"
namespace
OT
{
/*
/*
* cmap -- Character To Glyph Index Mapping Table
* cmap -- Character to Glyph Index Mapping
* https://docs.microsoft.com/en-us/typography/opentype/spec/cmap
*/
*/
#define HB_OT_TAG_cmap HB_TAG('c','m','a','p')
#define HB_OT_TAG_cmap HB_TAG('c','m','a','p')
namespace
OT
{
struct
CmapSubtableFormat0
struct
CmapSubtableFormat0
{
{
inline
bool
get_glyph
(
hb_codepoint_t
codepoint
,
hb_codepoint_t
*
glyph
)
const
inline
bool
get_glyph
(
hb_codepoint_t
codepoint
,
hb_codepoint_t
*
glyph
)
const
...
@@ -738,7 +738,7 @@ struct cmap
...
@@ -738,7 +738,7 @@ struct cmap
/* For symbol-encoded OpenType fonts, we duplicate the
/* For symbol-encoded OpenType fonts, we duplicate the
* U+F000..F0FF range at U+0000..U+00FF. That's what
* U+F000..F0FF range at U+0000..U+00FF. That's what
* Windows seems to do, and that's hinted about at:
* Windows seems to do, and that's hinted about at:
* http
://www.microsoft.com/typography/otspec/recom.ht
m
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/reco
m
* under "Non-Standard (Symbol) Fonts". */
* under "Non-Standard (Symbol) Fonts". */
return
typed_obj
->
get_glyph
(
0xF000u
+
codepoint
,
glyph
);
return
typed_obj
->
get_glyph
(
0xF000u
+
codepoint
,
glyph
);
}
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
f24b0b97
...
@@ -270,7 +270,7 @@ struct Script
...
@@ -270,7 +270,7 @@ struct Script
typedef
RecordListOf
<
Script
>
ScriptList
;
typedef
RecordListOf
<
Script
>
ScriptList
;
/* http
://www.microsoft.com/typography/otspec/features_pt.htm
#size */
/* http
s://docs.microsoft.com/en-us/typography/opentype/spec/features_pt
#size */
struct
FeatureParamsSize
struct
FeatureParamsSize
{
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
@@ -292,7 +292,7 @@ struct FeatureParamsSize
...
@@ -292,7 +292,7 @@ struct FeatureParamsSize
*
*
* The specification for this feature tag is in the "OpenType Layout Tag
* The specification for this feature tag is in the "OpenType Layout Tag
* Registry". You can see a copy of this at:
* Registry". You can see a copy of this at:
* http
://partners.adobe.com/public/developer/opentype/index_tag8.html#
size
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-
size
*
*
* Here is one set of rules to determine if the 'size' feature is built
* Here is one set of rules to determine if the 'size' feature is built
* correctly, or as by the older versions of MakeOTF. You may be able to do
* correctly, or as by the older versions of MakeOTF. You may be able to do
...
@@ -382,7 +382,7 @@ struct FeatureParamsSize
...
@@ -382,7 +382,7 @@ struct FeatureParamsSize
DEFINE_SIZE_STATIC
(
10
);
DEFINE_SIZE_STATIC
(
10
);
};
};
/* http
://www.microsoft.com/typography/otspec/features_pt.htm
#ssxx */
/* http
s://docs.microsoft.com/en-us/typography/opentype/spec/features_pt
#ssxx */
struct
FeatureParamsStylisticSet
struct
FeatureParamsStylisticSet
{
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
@@ -416,7 +416,7 @@ struct FeatureParamsStylisticSet
...
@@ -416,7 +416,7 @@ struct FeatureParamsStylisticSet
DEFINE_SIZE_STATIC
(
4
);
DEFINE_SIZE_STATIC
(
4
);
};
};
/* http
://www.microsoft.com/typography/otspec/features_ae.htm
#cv01-cv99 */
/* http
s://docs.microsoft.com/en-us/typography/opentype/spec/features_ae
#cv01-cv99 */
struct
FeatureParamsCharacterVariants
struct
FeatureParamsCharacterVariants
{
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
src/hb-ot-layout-private.hh
浏览文件 @
f24b0b97
...
@@ -309,7 +309,7 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
...
@@ -309,7 +309,7 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
* processing on. */
* processing on. */
/* Only Mn and Mc can have non-zero ccc:
/* Only Mn and Mc can have non-zero ccc:
* http
://www.
unicode.org/policies/stability_policy.html#Property_Value
* http
s://
unicode.org/policies/stability_policy.html#Property_Value
* """
* """
* Canonical_Combining_Class, General_Category
* Canonical_Combining_Class, General_Category
* All characters other than those with General_Category property values
* All characters other than those with General_Category property values
...
...
src/hb-ot-layout.h
浏览文件 @
f24b0b97
...
@@ -307,7 +307,7 @@ Xhb_ot_layout_lookup_position (hb_font_t *font,
...
@@ -307,7 +307,7 @@ Xhb_ot_layout_lookup_position (hb_font_t *font,
#endif
#endif
/* Optical 'size' feature info. Returns true if found.
/* Optical 'size' feature info. Returns true if found.
* http
://www.microsoft.com/typography/otspec/features_pt.htm
#size */
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/features_pt
#size */
HB_EXTERN
hb_bool_t
HB_EXTERN
hb_bool_t
hb_ot_layout_get_size_params
(
hb_face_t
*
face
,
hb_ot_layout_get_size_params
(
hb_face_t
*
face
,
unsigned
int
*
design_size
,
/* OUT. May be NULL */
unsigned
int
*
design_size
,
/* OUT. May be NULL */
...
...
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
f24b0b97
...
@@ -421,7 +421,7 @@ retry:
...
@@ -421,7 +421,7 @@ retry:
/*
/*
* Stretch feature: "stch".
* Stretch feature: "stch".
* See example here:
* See example here:
* https://
www.microsoft.com/typography/OpenTypeDev/syriac/intro.htm
* https://
docs.microsoft.com/en-us/typography/script-development/syriac
* We implement this in a generic way, such that the Arabic subtending
* We implement this in a generic way, such that the Arabic subtending
* marks can use it as well.
* marks can use it as well.
*/
*/
...
@@ -611,7 +611,7 @@ postprocess_glyphs_arabic (const hb_ot_shape_plan_t *plan,
...
@@ -611,7 +611,7 @@ postprocess_glyphs_arabic (const hb_ot_shape_plan_t *plan,
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
}
}
/* http
://www.
unicode.org/reports/tr53/tr53-1.pdf */
/* http
s://
unicode.org/reports/tr53/tr53-1.pdf */
static
hb_codepoint_t
static
hb_codepoint_t
modifier_combining_marks
[]
=
modifier_combining_marks
[]
=
...
...
src/hb-ot-shape-complex-indic-private.hh
浏览文件 @
f24b0b97
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#define INDIC_TABLE_ELEMENT_TYPE uint16_t
#define INDIC_TABLE_ELEMENT_TYPE uint16_t
/* Cateories used in the OpenType spec:
/* Cateories used in the OpenType spec:
* https://
www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
* https://
docs.microsoft.com/en-us/typography/script-development/devanagari
*/
*/
/* Note: This enum is duplicated in the -machine.rl source file.
/* Note: This enum is duplicated in the -machine.rl source file.
* Not sure how to avoid duplication. */
* Not sure how to avoid duplication. */
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
f24b0b97
...
@@ -435,7 +435,7 @@ update_consonant_positions (const hb_ot_shape_plan_t *plan,
...
@@ -435,7 +435,7 @@ update_consonant_positions (const hb_ot_shape_plan_t *plan,
/* Rules from:
/* Rules from:
* https://
www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
*/
* https://
docs.microsqoft.com/en-us/typography/script-development/devanagari
*/
static
void
static
void
initial_reordering_consonant_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
initial_reordering_consonant_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
...
@@ -1512,7 +1512,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
...
@@ -1512,7 +1512,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
* The Uniscribe behavior is now documented in the newly published Sinhala
* The Uniscribe behavior is now documented in the newly published Sinhala
* spec in 2012:
* spec in 2012:
*
*
* http
://www.microsoft.com/typography/OpenTypeDev/sinhala/intro.htm
#shaping
* http
s://docs.microsoft.com/en-us/typography/script-development/sinhala
#shaping
*/
*/
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
c
->
plan
->
data
;
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
c
->
plan
->
data
;
...
...
src/hb-ot-shape-complex-khmer.cc
浏览文件 @
f24b0b97
...
@@ -275,7 +275,7 @@ compare_khmer_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
...
@@ -275,7 +275,7 @@ compare_khmer_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
/* Rules from:
/* Rules from:
* https://
www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
*/
* https://
docs.microsoft.com/en-us/typography/script-development/devanagari
*/
static
void
static
void
initial_reordering_consonant_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
initial_reordering_consonant_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
...
...
src/hb-ot-shape-complex-myanmar-private.hh
浏览文件 @
f24b0b97
...
@@ -68,7 +68,7 @@ set_myanmar_properties (hb_glyph_info_t &info)
...
@@ -68,7 +68,7 @@ set_myanmar_properties (hb_glyph_info_t &info)
indic_position_t
pos
=
(
indic_position_t
)
(
type
>>
8
);
indic_position_t
pos
=
(
indic_position_t
)
(
type
>>
8
);
/* Myanmar
/* Myanmar
* http
://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm
#analyze
* http
s://docs.microsoft.com/en-us/typography/script-development/myanmar
#analyze
*/
*/
if
(
unlikely
(
hb_in_range
<
hb_codepoint_t
>
(
u
,
0xFE00u
,
0xFE0Fu
)))
if
(
unlikely
(
hb_in_range
<
hb_codepoint_t
>
(
u
,
0xFE00u
,
0xFE0Fu
)))
cat
=
(
indic_category_t
)
OT_VS
;
cat
=
(
indic_category_t
)
OT_VS
;
...
...
src/hb-ot-shape-complex-myanmar.cc
浏览文件 @
f24b0b97
...
@@ -161,7 +161,7 @@ compare_myanmar_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
...
@@ -161,7 +161,7 @@ compare_myanmar_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
/* Rules from:
/* Rules from:
* http
://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm
*/
* http
s://docs.microsoft.com/en-us/typography/script-development/myanmar
*/
static
void
static
void
initial_reordering_consonant_syllable
(
hb_buffer_t
*
buffer
,
initial_reordering_consonant_syllable
(
hb_buffer_t
*
buffer
,
...
...
src/hb-ot-shape-complex-thai.cc
浏览文件 @
f24b0b97
...
@@ -260,7 +260,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
...
@@ -260,7 +260,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
{
{
/* This function implements the shaping logic documented here:
/* This function implements the shaping logic documented here:
*
*
* http://linux.thai.net/~thep/th-otf/shaping.html
* http
s
://linux.thai.net/~thep/th-otf/shaping.html
*
*
* The first shaping rule listed there is needed even if the font has Thai
* The first shaping rule listed there is needed even if the font has Thai
* OpenType tables. The rest do fallback positioning based on PUA codepoints.
* OpenType tables. The rest do fallback positioning based on PUA codepoints.
...
...
src/hb-ot-shape-complex-use-private.hh
浏览文件 @
f24b0b97
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#define USE_TABLE_ELEMENT_TYPE uint8_t
#define USE_TABLE_ELEMENT_TYPE uint8_t
/* Cateories used in the Universal Shaping Engine spec:
/* Cateories used in the Universal Shaping Engine spec:
* https://
www.microsoft.com/typography/OpenTypeDev/USE/intro.htm
* https://
docs.microsoft.com/en-us/typography/script-development/use
*/
*/
/* Note: This enum is duplicated in the -machine.rl source file.
/* Note: This enum is duplicated in the -machine.rl source file.
* Not sure how to avoid duplication. */
* Not sure how to avoid duplication. */
...
...
src/hb-ot-shape-complex-use.cc
浏览文件 @
f24b0b97
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
/*
/*
* Universal Shaping Engine.
* Universal Shaping Engine.
* https://
www.microsoft.com/typography/OpenTypeDev/USE/intro.htm
* https://
docs.microsoft.com/en-us/typography/script-development/use
*/
*/
static
const
hb_tag_t
static
const
hb_tag_t
...
...
src/hb-ot-shape-fallback.cc
浏览文件 @
f24b0b97
...
@@ -548,7 +548,7 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan,
...
@@ -548,7 +548,7 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan,
case
t
::
SPACE_NARROW
:
case
t
::
SPACE_NARROW
:
/* Half-space?
/* Half-space?
* Unicode doc http
://www.
unicode.org/charts/PDF/U2000.pdf says ~1/4 or 1/5 of EM.
* Unicode doc http
s://
unicode.org/charts/PDF/U2000.pdf says ~1/4 or 1/5 of EM.
* However, in my testing, many fonts have their regular space being about that
* However, in my testing, many fonts have their regular space being about that
* size. To me, a percentage of the space width makes more sense. Half is as
* size. To me, a percentage of the space width makes more sense. Half is as
* good as any. */
* good as any. */
...
...
src/hb-ot-tag.cc
浏览文件 @
f24b0b97
...
@@ -116,8 +116,7 @@ hb_ot_new_tag_to_script (hb_tag_t tag)
...
@@ -116,8 +116,7 @@ hb_ot_new_tag_to_script (hb_tag_t tag)
/*
/*
* Complete list at:
* Complete list at:
* https://www.microsoft.com/typography/otspec/scripttags.htm
* https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags
* https://www.microsoft.com/typography/otspec160/scripttagsProposed.htm
*
*
* Most of the script tags are the same as the ISO 15924 tag but lowercased.
* Most of the script tags are the same as the ISO 15924 tag but lowercased.
* So we just do that, and handle the exceptional cases in a switch.
* So we just do that, and handle the exceptional cases in a switch.
...
@@ -159,7 +158,7 @@ typedef struct {
...
@@ -159,7 +158,7 @@ typedef struct {
/*
/*
* Complete list at:
* Complete list at:
* http
://www.microsoft.com/typography/otspec/languagetags.htm
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
*
*
* Generated by intersecting the OpenType language tag list from
* Generated by intersecting the OpenType language tag list from
* Draft OpenType 1.5 spec, with with the ISO 639-3 codes from
* Draft OpenType 1.5 spec, with with the ISO 639-3 codes from
...
@@ -176,7 +175,7 @@ typedef struct {
...
@@ -176,7 +175,7 @@ typedef struct {
* Updated as of 2015-05-06: OT1.7 on MS website has some newer
* Updated as of 2015-05-06: OT1.7 on MS website has some newer
* items that we don't have here, eg. Zazaki. This is the new
* items that we don't have here, eg. Zazaki. This is the new
* items in OpenType 1.7 (red items), most of which we have:
* items in OpenType 1.7 (red items), most of which we have:
* http
://www.microsoft.com/typography/otspec170/languagetags.htm
* http
s://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
*/
*/
static
const
LangTag
ot_languages
[]
=
{
static
const
LangTag
ot_languages
[]
=
{
...
@@ -1010,7 +1009,7 @@ hb_ot_tag_from_language (hb_language_t language)
...
@@ -1010,7 +1009,7 @@ hb_ot_tag_from_language (hb_language_t language)
/**
/**
* hb_ot_tag_to_language:
* hb_ot_tag_to_language:
*
*
*
*
*
*
* Return value: (transfer none):
* Return value: (transfer none):
*
*
...
...
src/hb-private.hh
浏览文件 @
f24b0b97
...
@@ -221,8 +221,8 @@ static int errno = 0; /* Use something better? */
...
@@ -221,8 +221,8 @@ static int errno = 0; /* Use something better? */
# endif
# endif
# elif defined(_MSC_VER) || defined(__MINGW32__)
# elif defined(_MSC_VER) || defined(__MINGW32__)
/* For MSVC:
/* For MSVC:
* http
://msdn.microsoft.com/en-ca
/library/tze57ck3.aspx
* http
s://msdn.microsoft.com/en-us
/library/tze57ck3.aspx
* http
://msdn.microsoft.com/en-ca
/library/zk17ww08.aspx
* http
s://msdn.microsoft.com/en-us
/library/zk17ww08.aspx
* mingw32 headers say atexit is safe to use in shared libraries.
* mingw32 headers say atexit is safe to use in shared libraries.
*/
*/
# define HB_USE_ATEXIT 1
# define HB_USE_ATEXIT 1
...
...
src/hb-string-array.hh
浏览文件 @
f24b0b97
...
@@ -42,7 +42,7 @@ static const union HB_STRING_ARRAY_TYPE_NAME {
...
@@ -42,7 +42,7 @@ static const union HB_STRING_ARRAY_TYPE_NAME {
struct
{
struct
{
/* I like to avoid storing the nul-termination byte since we don't need it,
/* I like to avoid storing the nul-termination byte since we don't need it,
* but C++ does not allow that.
* but C++ does not allow that.
* https://stackoverflow.com/q
uestions/28433862/why-initializer-string-for-array-of-chars-is-too-long-compiles-fine-in-c-not
* https://stackoverflow.com/q
/28433862
*/
*/
#define _S(s) char HB_PASTE (str, __LINE__)[sizeof (s)];
#define _S(s) char HB_PASTE (str, __LINE__)[sizeof (s)];
#include HB_STRING_ARRAY_LIST
#include HB_STRING_ARRAY_LIST
...
...
src/hb-unicode-private.hh
浏览文件 @
f24b0b97
...
@@ -202,8 +202,8 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
...
@@ -202,8 +202,8 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
}
}
/* Space estimates based on:
/* Space estimates based on:
* http
://www.
unicode.org/charts/PDF/U2000.pdf
* http
s://
unicode.org/charts/PDF/U2000.pdf
* https://
www.microsoft.com/typography/developers/fdsspec/spaces.aspx
* https://
docs.microsoft.com/en-us/typography/develop/character-design-standards/whitespace
*/
*/
enum
space_t
{
enum
space_t
{
NOT_SPACE
=
0
,
NOT_SPACE
=
0
,
...
@@ -276,10 +276,10 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
...
@@ -276,10 +276,10 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
* We permute the "fixed-position" classes 10-26 into the order
* We permute the "fixed-position" classes 10-26 into the order
* described in the SBL Hebrew manual:
* described in the SBL Hebrew manual:
*
*
* http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
* http
s
://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
*
*
* (as recommended by:
* (as recommended by:
* http
://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering-t6751.0.html
)
* http
s://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering/msg22823/
)
*
*
* More details here:
* More details here:
* https://bugzilla.mozilla.org/show_bug.cgi?id=662055
* https://bugzilla.mozilla.org/show_bug.cgi?id=662055
...
@@ -306,8 +306,8 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
...
@@ -306,8 +306,8 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
* Arabic
* Arabic
*
*
* Modify to move Shadda (ccc=33) before other marks. See:
* Modify to move Shadda (ccc=33) before other marks. See:
* http://unicode.org/faq/normalization.html#8
* http
s
://unicode.org/faq/normalization.html#8
* http://unicode.org/faq/normalization.html#9
* http
s
://unicode.org/faq/normalization.html#9
*/
*/
#define HB_MODIFIED_COMBINING_CLASS_CCC27 28
/* fathatan */
#define HB_MODIFIED_COMBINING_CLASS_CCC27 28
/* fathatan */
#define HB_MODIFIED_COMBINING_CLASS_CCC28 29
/* dammatan */
#define HB_MODIFIED_COMBINING_CLASS_CCC28 29
/* dammatan */
...
@@ -346,9 +346,9 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
...
@@ -346,9 +346,9 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
#define HB_MODIFIED_COMBINING_CLASS_CCC122 122
/* mai * */
#define HB_MODIFIED_COMBINING_CLASS_CCC122 122
/* mai * */
/* Tibetan
/* Tibetan
*
*
* In case of multiple vowel-signs, use u first (but after achung)
* In case of multiple vowel-signs, use u first (but after achung)
* this allows Dzongkha multi-vowel shortcuts to render correctly
* this allows Dzongkha multi-vowel shortcuts to render correctly
*/
*/
#define HB_MODIFIED_COMBINING_CLASS_CCC129 129
/* sign aa */
#define HB_MODIFIED_COMBINING_CLASS_CCC129 129
/* sign aa */
#define HB_MODIFIED_COMBINING_CLASS_CCC130 132
/* sign i */
#define HB_MODIFIED_COMBINING_CLASS_CCC130 132
/* sign i */
...
...
test/api/test-buffer.c
浏览文件 @
f24b0b97
...
@@ -445,7 +445,7 @@ static const utf8_validity_test_t utf8_validity_tests[] = {
...
@@ -445,7 +445,7 @@ static const utf8_validity_test_t utf8_validity_tests[] = {
{
"
\xe2\x89\xa0\xe2\x89\xa0
"
,
5
,
3
,
FALSE
},
{
"
\xe2\x89\xa0\xe2\x89\xa0
"
,
5
,
3
,
FALSE
},
{
"
\xe2\x89\xa0\xe2\x89\xa0
"
,
6
,
6
,
TRUE
},
{
"
\xe2\x89\xa0\xe2\x89\xa0
"
,
6
,
6
,
TRUE
},
/* examples from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt */
/* examples from http
s
://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt */
/* greek 'kosme' */
/* greek 'kosme' */
{
"
\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5
"
,
-
1
,
11
,
TRUE
},
{
"
\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5
"
,
-
1
,
11
,
TRUE
},
/* first sequence of each length */
/* first sequence of each length */
...
...
test/api/test-ot-tag.c
浏览文件 @
f24b0b97
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
/* Unit tests for hb-ot-tag.h */
/* Unit tests for hb-ot-tag.h */
/* https://
www.microsoft.com/typography/otspec/scripttags.htm
*/
/* https://
docs.microsoft.com/en-us/typography/opentype/spec/scripttags
*/
static
void
static
void
test_simple_tags
(
const
char
*
s
,
hb_script_t
script
)
test_simple_tags
(
const
char
*
s
,
hb_script_t
script
)
...
@@ -112,7 +112,7 @@ test_ot_tag_script_simple (void)
...
@@ -112,7 +112,7 @@ test_ot_tag_script_simple (void)
/* Unicode-5.1 additions */
/* Unicode-5.1 additions */
test_simple_tags
(
"vai "
,
HB_SCRIPT_VAI
);
test_simple_tags
(
"vai "
,
HB_SCRIPT_VAI
);
/* https://
www.microsoft.com/typography/otspec160/scripttagsProposed.htm
*/
/* https://
docs.microsoft.com/en-us/typography/opentype/spec/scripttags
*/
/* Unicode-5.2 additions */
/* Unicode-5.2 additions */
test_simple_tags
(
"mtei"
,
HB_SCRIPT_MEETEI_MAYEK
);
test_simple_tags
(
"mtei"
,
HB_SCRIPT_MEETEI_MAYEK
);
...
@@ -137,7 +137,7 @@ test_ot_tag_script_indic (void)
...
@@ -137,7 +137,7 @@ test_ot_tag_script_indic (void)
/* https://
www.microsoft.com/typography/otspec/languagetags.htm
*/
/* https://
docs.microsoft.com/en-us/typography/opentype/spec/languagetags
*/
static
void
static
void
test_language_two_way
(
const
char
*
tag_s
,
const
char
*
lang_s
)
test_language_two_way
(
const
char
*
tag_s
,
const
char
*
lang_s
)
...
...
test/api/test-shape.c
浏览文件 @
f24b0b97
...
@@ -154,7 +154,7 @@ test_shape_clusters (void)
...
@@ -154,7 +154,7 @@ test_shape_clusters (void)
buffer
=
hb_buffer_create
();
buffer
=
hb_buffer_create
();
hb_buffer_set_direction
(
buffer
,
HB_DIRECTION_LTR
);
hb_buffer_set_direction
(
buffer
,
HB_DIRECTION_LTR
);
{
{
/* https://c
ode.google.com/p/chromium/issues/detail?id=
497578 */
/* https://c
rbug.com/
497578 */
hb_codepoint_t
test
[]
=
{
0xFFF1
,
0xF0B6
};
hb_codepoint_t
test
[]
=
{
0xFFF1
,
0xF0B6
};
hb_buffer_add_utf32
(
buffer
,
test
,
2
,
0
,
2
);
hb_buffer_add_utf32
(
buffer
,
test
,
2
,
0
,
2
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录