14 Star 64 Fork 82

OpenHarmony / third_party_freetype

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
backport-freetype-2.12.1-enable-funcs.patch 7.80 KB
一键复制 编辑 原始数据 按行查看 历史
diff --git a/freetype-2.12.1/include/freetype/internal/ftgloadr.h b/freetype-2.12.1/include/freetype/internal/ftgloadr.h
index f73b663..d2f9a77 100644
--- a/include/freetype/internal/ftgloadr.h
+++ b/include/freetype/internal/ftgloadr.h
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
FT_GlyphLoader_Done( FT_GlyphLoader loader );
/* reset a glyph loader (frees everything int it) */
- FT_BASE( void )
+ FT_EXPORT( void )
FT_GlyphLoader_Reset( FT_GlyphLoader loader );
/* rewind a glyph loader */
diff --git a/freetype-2.12.1/include/freetype/internal/ftobjs.h b/freetype-2.12.1/include/freetype/internal/ftobjs.h
index 1c779ce..70942a7 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -696,7 +696,7 @@ FT_BEGIN_HEADER
/* Free the bitmap of a given glyphslot when needed (i.e., only when it */
/* was allocated with ft_glyphslot_alloc_bitmap). */
- FT_BASE( void )
+ FT_EXPORT( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
diff --git a/freetype-2.12.1/include/freetype/internal/ftstream.h b/freetype-2.12.1/include/freetype/internal/ftstream.h
index aa51fe5..f8760f4 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -357,13 +357,13 @@ FT_BEGIN_HEADER
/* create a new (input) stream from an FT_Open_Args structure */
- FT_BASE( FT_Error )
+ FT_EXPORT( FT_Error )
FT_Stream_New( FT_Library library,
const FT_Open_Args* args,
FT_Stream *astream );
/* free a stream */
- FT_BASE( void )
+ FT_EXPORT( void )
FT_Stream_Free( FT_Stream stream,
FT_Int external );
@@ -379,22 +379,22 @@ FT_BEGIN_HEADER
/* seek within a stream. position is relative to start of stream */
- FT_BASE( FT_Error )
+ FT_EXPORT( FT_Error )
FT_Stream_Seek( FT_Stream stream,
FT_ULong pos );
/* skip bytes in a stream */
- FT_BASE( FT_Error )
+ FT_EXPORT( FT_Error )
FT_Stream_Skip( FT_Stream stream,
FT_Long distance );
/* return current stream position */
- FT_BASE( FT_ULong )
+ FT_EXPORT( FT_ULong )
FT_Stream_Pos( FT_Stream stream );
/* read bytes from a stream into a user-allocated buffer, returns an */
/* error if not all bytes could be read. */
- FT_BASE( FT_Error )
+ FT_EXPORT( FT_Error )
FT_Stream_Read( FT_Stream stream,
FT_Byte* buffer,
FT_ULong count );
@@ -485,7 +485,7 @@ FT_BEGIN_HEADER
FT_Error* error );
/* read a 16-bit big-endian unsigned integer from a stream */
- FT_BASE( FT_UShort )
+ FT_EXPORT( FT_UShort )
FT_Stream_ReadUShort( FT_Stream stream,
FT_Error* error );
@@ -495,12 +495,12 @@ FT_BEGIN_HEADER
FT_Error* error );
/* read a 32-bit big-endian integer from a stream */
- FT_BASE( FT_ULong )
+ FT_EXPORT( FT_ULong )
FT_Stream_ReadULong( FT_Stream stream,
FT_Error* error );
/* read a 16-bit little-endian unsigned integer from a stream */
- FT_BASE( FT_UShort )
+ FT_EXPORT( FT_UShort )
FT_Stream_ReadUShortLE( FT_Stream stream,
FT_Error* error );
@@ -511,7 +511,7 @@ FT_BEGIN_HEADER
/* Read a structure from a stream. The structure must be described */
/* by an array of FT_Frame_Field records. */
- FT_BASE( FT_Error )
+ FT_EXPORT( FT_Error )
FT_Stream_ReadFields( FT_Stream stream,
const FT_Frame_Field* fields,
void* structure );
diff --git a/freetype-2.12.1/src/base/ftgloadr.c b/freetype-2.12.1/src/base/ftgloadr.c
index f05abde..1d99710 100644
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -101,7 +101,7 @@
/* reset glyph loader, free all allocated tables, */
/* and start from zero */
- FT_BASE_DEF( void )
+ FT_EXPORT_DEF( void )
FT_GlyphLoader_Reset( FT_GlyphLoader loader )
{
FT_Memory memory = loader->memory;
diff --git a/freetype-2.12.1/src/base/ftobjs.c b/freetype-2.12.1/src/base/ftobjs.c
index eeda69c..0d925f7 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -191,7 +191,7 @@
/* create a new input stream from an FT_Open_Args structure */
/* */
- FT_BASE_DEF( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Stream_New( FT_Library library,
const FT_Open_Args* args,
FT_Stream *astream )
@@ -267,7 +267,7 @@
}
- FT_BASE_DEF( void )
+ FT_EXPORT_DEF( void )
FT_Stream_Free( FT_Stream stream,
FT_Int external )
{
@@ -348,7 +348,7 @@
}
- FT_BASE_DEF( void )
+ FT_EXPORT_DEF( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot )
{
if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
diff --git a/freetype-2.12.1/src/base/ftstream.c b/freetype-2.12.1/src/base/ftstream.c
index cc92656..77a6283 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -52,7 +52,7 @@
}
- FT_BASE_DEF( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Stream_Seek( FT_Stream stream,
FT_ULong pos )
{
@@ -87,7 +87,7 @@
}
- FT_BASE_DEF( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Stream_Skip( FT_Stream stream,
FT_Long distance )
{
@@ -98,14 +98,14 @@
}
- FT_BASE_DEF( FT_ULong )
+ FT_EXPORT_DEF( FT_ULong )
FT_Stream_Pos( FT_Stream stream )
{
return stream->pos;
}
- FT_BASE_DEF( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Stream_Read( FT_Stream stream,
FT_Byte* buffer,
FT_ULong count )
@@ -493,7 +493,7 @@
}
- FT_BASE_DEF( FT_UShort )
+ FT_EXPORT_DEF( FT_UShort )
FT_Stream_ReadUShort( FT_Stream stream,
FT_Error* error )
{
@@ -538,7 +538,7 @@
}
- FT_BASE_DEF( FT_UShort )
+ FT_EXPORT_DEF( FT_UShort )
FT_Stream_ReadUShortLE( FT_Stream stream,
FT_Error* error )
{
@@ -628,7 +628,7 @@
}
- FT_BASE_DEF( FT_ULong )
+ FT_EXPORT_DEF( FT_ULong )
FT_Stream_ReadULong( FT_Stream stream,
FT_Error* error )
{
@@ -718,7 +718,7 @@
}
- FT_BASE_DEF( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Stream_ReadFields( FT_Stream stream,
const FT_Frame_Field* fields,
void* structure )
diff --git a/freetype-2.12.1/src/gzip/inflate.c b/freetype-2.12.1/src/gzip/inflate.c
index 5bf5b81..51399cd 100644
--- a/src/gzip/inflate.c
+++ b/src/gzip/inflate.c
@@ -769,9 +769,10 @@ int ZEXPORT inflate(
copy = state->length;
if (copy > have) copy = have;
if (copy) {
+ len = state->head->extra_len - state->length;
if (state->head != Z_NULL &&
- state->head->extra != Z_NULL) {
- len = state->head->extra_len - state->length;
+ state->head->extra != Z_NULL &&
+ len < state->head->extra_max) {
zmemcpy(state->head->extra + len, next,
len + copy > state->head->extra_max ?
state->head->extra_max - len : copy);
diff --git a/freetype-2.12.1/src/truetype/ttgxvar.c b/freetype-2.12.1/src/truetype/ttgxvar.c
index a1b816b..eff7219 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1141,7 +1141,7 @@
delta == 1 ? "" : "s",
vertical ? "VVAR" : "HVAR" ));
- *avalue = ADD_INT(*avalue, delta );
+ *avalue = ADD_INT( *avalue, delta );
Exit:
return error;
1
https://gitee.com/openharmony/third_party_freetype.git
git@gitee.com:openharmony/third_party_freetype.git
openharmony
third_party_freetype
third_party_freetype
master

搜索帮助