Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
47cf9a96
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看板
未验证
提交
47cf9a96
编写于
12月 08, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
12月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Apply non-controversial parts of ot-style (#1464)
Things to be used in
https://github.com/harfbuzz/harfbuzz/pull/1459
上级
4d809696
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
105 addition
and
22 deletion
+105
-22
src/hb-aat-fdsc-table.hh
src/hb-aat-fdsc-table.hh
+26
-3
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+1
-0
src/hb-ot-head-table.hh
src/hb-ot-head-table.hh
+13
-0
src/hb-ot-os2-table.hh
src/hb-ot-os2-table.hh
+46
-0
src/hb-ot-stat-table.hh
src/hb-ot-stat-table.hh
+19
-19
未找到文件。
src/hb-aat-fdsc-table.hh
浏览文件 @
47cf9a96
...
...
@@ -26,6 +26,7 @@
#define HB_AAT_FDSC_TABLE_HH
#include "hb-aat-layout-common.hh"
#include "hb-open-type.hh"
/*
* fdsc -- Font descriptors
...
...
@@ -37,17 +38,36 @@
namespace
AAT
{
struct
GX
FontDescriptor
struct
FontDescriptor
{
inline
bool
has_data
()
const
{
return
tag
;
}
inline
int
cmp
(
hb_tag_t
a
)
const
{
return
tag
.
cmp
(
a
);
}
inline
float
get_value
()
const
{
return
u
.
value
.
to_float
();
}
enum
non_alphabetic_value_t
{
Alphabetic
=
0
,
Dingbats
=
1
,
PiCharacters
=
2
,
Fleurons
=
3
,
DecorativeBorders
=
4
,
InternationalSymbols
=
5
,
MathSymbols
=
6
};
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
));
}
p
ublic
:
p
rotected
:
Tag
tag
;
/* The 4-byte table tag name. */
union
{
Fixed
value
;
/* The value for the descriptor tag. */
HBUINT32
nalfType
;
/* If the tag is `nalf`, see non_alphabetic_value_t */
}
u
;
public:
DEFINE_SIZE_STATIC
(
8
);
};
...
...
@@ -77,6 +97,9 @@ struct fdsc
* (default value: 0) */
};
inline
const
FontDescriptor
&
get_descriptor
(
hb_tag_t
style
)
const
{
return
descriptors
.
lsearch
(
style
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
...
...
@@ -87,7 +110,7 @@ struct fdsc
protected:
Fixed
version
;
/* Version number of the font descriptors
* table (0x00010000 for the current version). */
LArrayOf
<
GX
FontDescriptor
>
LArrayOf
<
FontDescriptor
>
descriptors
;
/* List of tagged-coordinate pairs style descriptors
* that will be included to characterize this font.
* Each descriptor consists of a <tag, value> pair.
...
...
src/hb-aat-layout-common.hh
浏览文件 @
47cf9a96
...
...
@@ -28,6 +28,7 @@
#define HB_AAT_LAYOUT_COMMON_HH
#include "hb-aat-layout.hh"
#include "hb-open-type.hh"
namespace
AAT
{
...
...
src/hb-ot-head-table.hh
浏览文件 @
47cf9a96
...
...
@@ -54,6 +54,19 @@ struct head
return
16
<=
upem
&&
upem
<=
16384
?
upem
:
1000
;
}
enum
mac_style_flag_t
{
BOLD
=
1u
<<
0
,
ITALIC
=
1u
<<
1
,
UNDERLINE
=
1u
<<
2
,
OUTLINE
=
1u
<<
3
,
SHADOW
=
1u
<<
4
,
CONDENSED
=
1u
<<
5
};
inline
bool
is_bold
(
void
)
const
{
return
macStyle
&
BOLD
;
}
inline
bool
is_italic
(
void
)
const
{
return
macStyle
&
ITALIC
;
}
inline
bool
is_condensed
(
void
)
const
{
return
macStyle
&
CONDENSED
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
...
...
src/hb-ot-os2-table.hh
浏览文件 @
47cf9a96
...
...
@@ -93,10 +93,56 @@ struct OS2
{
enum
{
tableTag
=
HB_OT_TAG_OS2
};
inline
bool
has_data
()
const
{
return
this
!=
&
Null
(
OS2
);
}
inline
const
OS2V1Tail
&
v1
(
void
)
const
{
return
version
>=
1
?
v1X
:
Null
(
OS2V1Tail
);
}
inline
const
OS2V2Tail
&
v2
(
void
)
const
{
return
version
>=
2
?
v2X
:
Null
(
OS2V2Tail
);
}
inline
const
OS2V5Tail
&
v5
(
void
)
const
{
return
version
>=
5
?
v5X
:
Null
(
OS2V5Tail
);
}
enum
fs_selection_flag_t
{
ITALIC
=
1u
<<
0
,
UNDERSCORE
=
1u
<<
1
,
NEGATIVE
=
1u
<<
2
,
OUTLINED
=
1u
<<
3
,
STRIKEOUT
=
1u
<<
4
,
BOLD
=
1u
<<
5
,
REGULAR
=
1u
<<
6
,
USE_TYPO_METRICS
=
1u
<<
7
,
WWS
=
1u
<<
8
,
OBLIQUE
=
1u
<<
9
};
inline
bool
is_italic
(
void
)
const
{
return
fsSelection
&
ITALIC
;
}
inline
bool
is_oblique
(
void
)
const
{
return
fsSelection
&
OBLIQUE
;
}
enum
us_width_class_t
{
FWIDTH_ULTRA_CONDENSED
=
1
,
/* 50% */
FWIDTH_EXTRA_CONDENSED
=
2
,
/* 62.5% */
FWIDTH_CONDENSED
=
3
,
/* 75% */
FWIDTH_SEMI_CONDENSED
=
4
,
/* 87.5% */
FWIDTH_NORMAL
=
5
,
/* 100% */
FWIDTH_SEMI_EXPANDED
=
6
,
/* 112.5% */
FWIDTH_EXPANDED
=
7
,
/* 125% */
FWIDTH_EXTRA_EXPANDED
=
8
,
/* 150% */
FWIDTH_ULTRA_EXPANDED
=
9
/* 200% */
};
inline
float
get_width
()
const
{
switch
(
usWidthClass
)
{
case
FWIDTH_ULTRA_CONDENSED
:
return
50.
f
;
case
FWIDTH_EXTRA_CONDENSED
:
return
62.5
f
;
case
FWIDTH_CONDENSED
:
return
75.
f
;
case
FWIDTH_SEMI_CONDENSED
:
return
87.5
f
;
default:
case
FWIDTH_NORMAL
:
return
100.
f
;
case
FWIDTH_SEMI_EXPANDED
:
return
112.5
f
;
case
FWIDTH_EXPANDED
:
return
125.
f
;
case
FWIDTH_EXTRA_EXPANDED
:
return
150.
f
;
case
FWIDTH_ULTRA_EXPANDED
:
return
200.
f
;
}
}
inline
bool
subset
(
hb_subset_plan_t
*
plan
)
const
{
hb_blob_t
*
os2_blob
=
hb_sanitize_context_t
().
reference_table
<
OS2
>
(
plan
->
source
);
...
...
src/hb-ot-stat-table.hh
浏览文件 @
47cf9a96
...
...
@@ -57,25 +57,6 @@ enum
// Reserved = 0xFFFC /* Reserved for future use — set to zero. */
};
struct
StatAxisRecord
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
likely
(
c
->
check_struct
(
this
)));
}
protected:
Tag
axisTag
;
/* A tag identifying the axis of design variation. */
NameID
axisNameID
;
/* The name ID for entries in the 'name' table that
* provide a display string for this axis. */
HBUINT16
axisOrdering
;
/* A value that applications can use to determine
* primary sorting of face names, or for ordering
* of descriptors when composing family or face names. */
public:
DEFINE_SIZE_STATIC
(
8
);
};
struct
AxisValueFormat1
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
@@ -223,6 +204,25 @@ struct AxisValue
DEFINE_SIZE_UNION
(
2
,
format
);
};
struct
StatAxisRecord
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
likely
(
c
->
check_struct
(
this
)));
}
protected:
Tag
tag
;
/* A tag identifying the axis of design variation. */
NameID
nameID
;
/* The name ID for entries in the 'name' table that
* provide a display string for this axis. */
HBUINT16
ordering
;
/* A value that applications can use to determine
* primary sorting of face names, or for ordering
* of descriptors when composing family or face names. */
public:
DEFINE_SIZE_STATIC
(
8
);
};
struct
STAT
{
enum
{
tableTag
=
HB_OT_TAG_STAT
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录