Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f8bb582b
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
f8bb582b
编写于
4月 11, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
4月 11, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ot-color] Cosmetic changes (#962)
上级
1e1e9086
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
46 addition
and
47 deletion
+46
-47
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+0
-1
src/hb-ot-color-cbdt-table.hh
src/hb-ot-color-cbdt-table.hh
+5
-5
src/hb-ot-color-cpal-table.hh
src/hb-ot-color-cpal-table.hh
+2
-2
src/hb-ot-color-sbix-table.hh
src/hb-ot-color-sbix-table.hh
+20
-21
src/hb-ot-color-svg-table.hh
src/hb-ot-color-svg-table.hh
+19
-18
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
f8bb582b
...
...
@@ -909,7 +909,6 @@ struct UnsizedArrayOf
return_trace
(
true
);
}
private:
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
c
,
unsigned
int
count
)
const
{
TRACE_SANITIZE
(
this
);
...
...
src/hb-ot-color-cbdt-table.hh
浏览文件 @
f8bb582b
...
...
@@ -301,23 +301,23 @@ struct BitmapSizeTable
struct
GlyphBitmapDataFormat17
{
SmallGlyphMetrics
glyphMetrics
;
ArrayOf
<
HBUINT8
,
HBUINT32
>
data
;
SmallGlyphMetrics
glyphMetrics
;
LArrayOf
<
HBUINT8
>
data
;
public:
DEFINE_SIZE_ARRAY
(
9
,
data
);
};
struct
GlyphBitmapDataFormat18
{
BigGlyphMetrics
glyphMetrics
;
ArrayOf
<
HBUINT8
,
HBUINT32
>
data
;
BigGlyphMetrics
glyphMetrics
;
LArrayOf
<
HBUINT8
>
data
;
public:
DEFINE_SIZE_ARRAY
(
12
,
data
);
};
struct
GlyphBitmapDataFormat19
{
ArrayOf
<
HBUINT8
,
HBUINT32
>
data
;
LArrayOf
<
HBUINT8
>
data
;
public:
DEFINE_SIZE_ARRAY
(
4
,
data
);
};
...
...
src/hb-ot-color-cpal-table.hh
浏览文件 @
f8bb582b
...
...
@@ -144,13 +144,13 @@ struct CPAL
{
TRACE_SANITIZE
(
this
);
if
(
!
(
c
->
check_struct
(
this
)
&&
// it checks colorRecordIndices also, see #get_size
(
this
+
colorRecordsZ
).
sanitize
(
c
,
numColorRecords
)))
(
this
+
colorRecordsZ
).
sanitize
(
c
,
numColorRecords
)))
return_trace
(
false
);
// Check for indices sanity so no need for doing it runtime
for
(
unsigned
int
i
=
0
;
i
<
numPalettes
;
++
i
)
if
(
colorRecordIndicesZ
[
i
]
+
numPaletteEntries
>
numColorRecords
)
return_trace
(
false
);
return_trace
(
false
);
// If version is zero, we are done here; otherwise we need to check tail also
if
(
version
==
0
)
...
...
src/hb-ot-color-sbix-table.hh
浏览文件 @
f8bb582b
...
...
@@ -45,7 +45,8 @@ struct SBIXGlyph
Tag
graphicType
;
/* Indicates the format of the embedded graphic
* data: one of 'jpg ', 'png ' or 'tiff', or the
* special format 'dupe'. */
HBUINT8
data
[
VAR
];
/* The actual embedded graphic data. The total
UnsizedArrayOf
<
HBUINT8
>
data
;
/* The actual embedded graphic data. The total
* length is inferred from sequential entries in
* the glyphDataOffsets array and the fixed size
* (8 bytes) of the preceding fields. */
...
...
@@ -61,18 +62,16 @@ struct SBIXStrike
{
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
c
->
check_array
(
imageOffsetsZ
,
sizeof
(
HBUINT32
),
1
+
c
->
num_glyphs
));
imageOffsetsZ
.
sanitize_shallow
(
c
,
c
->
num_glyphs
+
1
));
}
HBUINT16
ppem
;
/* The PPEM size for which this strike was designed. */
HBUINT16
resolution
;
/* The device pixel density (in PPI) for which this
* strike was designed. (E.g., 96 PPI, 192 PPI.) */
protected:
LOffsetTo
<
SBIXGlyph
>
imageOffsetsZ
[
VAR
];
// VAR=maxp.numGlyphs + 1
/* Offset from the beginning of the strike data header
* to bitmap data for an individual glyph ID. */
HBUINT16
ppem
;
/* The PPEM size for which this strike was designed. */
HBUINT16
resolution
;
/* The device pixel density (in PPI) for which this
* strike was designed. (E.g., 96 PPI, 192 PPI.) */
UnsizedArrayOf
<
LOffsetTo
<
SBIXGlyph
>
>
imageOffsetsZ
;
/* Offset from the beginning of the strike data header
* to bitmap data for an individual glyph ID. */
public:
DEFINE_SIZE_STATIC
(
8
);
};
...
...
@@ -112,19 +111,19 @@ struct sbix
}
inline
void
dump
(
void
(
*
callback
)
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
group
,
unsigned
int
gid
))
const
unsigned
int
group
,
unsigned
int
gid
))
const
{
for
(
unsigned
group
=
0
;
group
<
sbix_table
->
strikes
.
len
;
++
group
)
{
const
SBIXStrike
&
strike
=
sbix_table
->
strikes
[
group
](
sbix_table
);
for
(
unsigned
int
glyph
=
0
;
glyph
<
num_glyphs
;
++
glyph
)
if
(
strike
.
imageOffsetsZ
[
glyph
+
1
]
-
strike
.
imageOffsetsZ
[
glyph
]
>
0
)
{
const
SBIXGlyph
&
sbixGlyph
=
strike
.
imageOffsetsZ
[
glyph
]((
const
void
*
)
&
strike
);
callback
((
const
uint8_t
*
)
sbixGlyph
.
data
,
strike
.
imageOffsetsZ
[
glyph
+
1
]
-
strike
.
imageOffsetsZ
[
glyph
]
-
8
,
group
,
glyph
);
}
const
SBIXStrike
&
strike
=
sbix_table
->
strikes
[
group
](
sbix_table
);
for
(
unsigned
int
glyph
=
0
;
glyph
<
num_glyphs
;
++
glyph
)
if
(
strike
.
imageOffsetsZ
[
glyph
+
1
]
-
strike
.
imageOffsetsZ
[
glyph
]
>
0
)
{
const
SBIXGlyph
&
sbixGlyph
=
strike
.
imageOffsetsZ
[
glyph
]((
const
void
*
)
&
strike
);
callback
((
const
uint8_t
*
)
&
sbixGlyph
.
data
,
strike
.
imageOffsetsZ
[
glyph
+
1
]
-
strike
.
imageOffsetsZ
[
glyph
]
-
8
,
group
,
glyph
);
}
}
}
...
...
@@ -141,7 +140,7 @@ struct sbix
HBUINT16
version
;
/* Table version number — set to 1 */
HBUINT16
flags
;
/* Bit 0: Set to 1. Bit 1: Draw outlines.
* Bits 2 to 15: reserved (set to 0). */
ArrayOf
<
LOffsetTo
<
SBIXStrike
>
,
HBUINT32
>
LArrayOf
<
LOffsetTo
<
SBIXStrike
>
>
strikes
;
/* Offsets from the beginning of the 'sbix'
* table to data for each individual bitmap strike. */
public:
...
...
src/hb-ot-color-svg-table.hh
浏览文件 @
f8bb582b
...
...
@@ -45,19 +45,19 @@ struct SVGDocumentIndexEntry
{
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
c
->
check_range
(
&
svgDoc
(
base
)
,
svgDocLength
));
(
base
+
svgDoc
).
sanitize
(
c
,
svgDocLength
));
}
protected:
HBUINT16
startGlyphID
;
/* The first glyph ID in the range described by
* this index entry. */
HBUINT16
endGlyphID
;
/* The last glyph ID in the range described by
* this index entry. Must be >= startGlyphID. */
LOffsetTo
<
const
uint8_t
*
>
svgDoc
;
/* Offset from the beginning of the SVG Document Index
* to an SVG document. Must be non-zero. */
HBUINT16
startGlyphID
;
/* The first glyph ID in the range described by
* this index entry. */
HBUINT16
endGlyphID
;
/* The last glyph ID in the range described by
* this index entry. Must be >= startGlyphID. */
LOffsetTo
<
UnsizedArrayOf
<
HBUINT8
>
>
svgDoc
;
/* Offset from the beginning of the SVG Document Index
* to an SVG document. Must be non-zero. */
HBUINT32
svgDocLength
;
/* Length of the SVG document.
* Must be non-zero. */
* Must be non-zero. */
public:
DEFINE_SIZE_STATIC
(
12
);
};
...
...
@@ -75,7 +75,7 @@ struct SVGDocumentIndex
protected:
ArrayOf
<
SVGDocumentIndexEntry
>
entries
;
/* Array of SVG Document Index Entries. */
entries
;
/* Array of SVG Document Index Entries. */
public:
DEFINE_SIZE_ARRAY
(
2
,
entries
);
};
...
...
@@ -88,7 +88,7 @@ struct SVG
{
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
svgDocIndex
(
this
).
sanitize
(
c
));
(
this
+
svgDocIndex
).
sanitize
(
c
));
}
struct
accelerator_t
...
...
@@ -107,16 +107,17 @@ struct SVG
hb_blob_destroy
(
svg_blob
);
}
inline
void
dump
(
void
(
*
callback
)
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
start_glyph
,
unsigned
int
end_glyph
))
const
inline
void
dump
(
void
(
*
callback
)
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
start_glyph
,
unsigned
int
end_glyph
))
const
{
const
SVGDocumentIndex
&
index
=
svg
->
svgDocIndex
(
svg
)
;
const
SVGDocumentIndex
&
index
=
svg
+
svg
->
svgDocIndex
;
const
ArrayOf
<
SVGDocumentIndexEntry
>
&
entries
=
index
.
entries
;
for
(
unsigned
int
i
=
0
;
i
<
entries
.
len
;
++
i
)
{
const
SVGDocumentIndexEntry
&
entry
=
entries
[
i
];
callback
((
const
uint8_t
*
)
&
entry
.
svgDoc
(
&
index
),
entry
.
svgDocLength
,
entry
.
startGlyphID
,
entry
.
endGlyphID
);
const
SVGDocumentIndexEntry
&
entry
=
entries
[
i
];
callback
((
const
uint8_t
*
)
&
entry
.
svgDoc
(
&
index
),
entry
.
svgDocLength
,
entry
.
startGlyphID
,
entry
.
endGlyphID
);
}
}
...
...
@@ -130,7 +131,7 @@ struct SVG
protected:
HBUINT16
version
;
/* Table version (starting at 0). */
LOffsetTo
<
SVGDocumentIndex
>
svgDocIndex
;
/* Offset (relative to the start of the SVG table) to the
svgDocIndex
;
/* Offset (relative to the start of the SVG table) to the
* SVG Documents Index. Must be non-zero. */
HBUINT32
reserved
;
/* Set to 0. */
public:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录