Update to 2.10.0
This commit is contained in:
parent
ae38c61803
commit
4166969e12
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,3 +21,4 @@ freetype-doc-2.3.11.tar.gz
|
||||
/freetype-2.7.1.tar.bz2
|
||||
/freetype-2.8.tar.bz2
|
||||
/freetype-2.9.1.tar.bz2
|
||||
/freetype-2.10.0.tar.bz2
|
||||
|
292
0001-pcf-Fix-handling-of-undefined-glyph-56067.patch
Normal file
292
0001-pcf-Fix-handling-of-undefined-glyph-56067.patch
Normal file
@ -0,0 +1,292 @@
|
||||
diff -rupN --no-dereference freetype-2.10.0/src/pcf/pcfdrivr.c freetype-2.10.0-new/src/pcf/pcfdrivr.c
|
||||
--- freetype-2.10.0/src/pcf/pcfdrivr.c 2019-02-23 09:39:04.000000000 +0100
|
||||
+++ freetype-2.10.0-new/src/pcf/pcfdrivr.c 2019-08-30 00:39:51.634521511 +0200
|
||||
@@ -122,9 +122,9 @@ THE SOFTWARE.
|
||||
charcodeCol > enc->lastCol )
|
||||
return 0;
|
||||
|
||||
- return (FT_UInt)enc->offset[ ( charcodeRow - enc->firstRow ) *
|
||||
- ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
- charcodeCol - enc->firstCol ];
|
||||
+ return (FT_UInt)enc->offset[( charcodeRow - enc->firstRow ) *
|
||||
+ ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
+ charcodeCol - enc->firstCol];
|
||||
}
|
||||
|
||||
|
||||
@@ -160,9 +160,9 @@ THE SOFTWARE.
|
||||
|
||||
charcode = (FT_UInt32)( charcodeRow * 256 + charcodeCol );
|
||||
|
||||
- result = (FT_UInt)enc->offset[ ( charcodeRow - enc->firstRow ) *
|
||||
- ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
- charcodeCol - enc->firstCol ];
|
||||
+ result = (FT_UInt)enc->offset[( charcodeRow - enc->firstRow ) *
|
||||
+ ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
+ charcodeCol - enc->firstCol];
|
||||
if ( result != 0xFFFFU )
|
||||
break;
|
||||
}
|
||||
diff -rupN --no-dereference freetype-2.10.0/src/pcf/pcf.h freetype-2.10.0-new/src/pcf/pcf.h
|
||||
--- freetype-2.10.0/src/pcf/pcf.h 2019-02-23 09:39:04.000000000 +0100
|
||||
+++ freetype-2.10.0-new/src/pcf/pcf.h 2019-08-30 00:39:51.634521511 +0200
|
||||
@@ -99,7 +99,8 @@ FT_BEGIN_HEADER
|
||||
FT_Short ascent;
|
||||
FT_Short descent;
|
||||
FT_Short attributes;
|
||||
- FT_ULong bits;
|
||||
+
|
||||
+ FT_ULong bits; /* offset into the PCF_BITMAPS table */
|
||||
|
||||
} PCF_MetricRec, *PCF_Metric;
|
||||
|
||||
diff -rupN --no-dereference freetype-2.10.0/src/pcf/pcfread.c freetype-2.10.0-new/src/pcf/pcfread.c
|
||||
--- freetype-2.10.0/src/pcf/pcfread.c 2019-02-23 09:39:04.000000000 +0100
|
||||
+++ freetype-2.10.0-new/src/pcf/pcfread.c 2019-08-30 00:39:51.635521511 +0200
|
||||
@@ -743,33 +743,39 @@ THE SOFTWARE.
|
||||
if ( !orig_nmetrics )
|
||||
return FT_THROW( Invalid_Table );
|
||||
|
||||
- /* PCF is a format from ancient times; Unicode was in its */
|
||||
- /* infancy, and widely used two-byte character sets for CJK */
|
||||
- /* scripts (Big 5, GB 2312, JIS X 0208, etc.) did have at most */
|
||||
- /* 15000 characters. Even the more exotic CNS 11643 and CCCII */
|
||||
- /* standards, which were essentially three-byte character sets, */
|
||||
- /* provided less then 65536 assigned characters. */
|
||||
- /* */
|
||||
- /* While technically possible to have a larger number of glyphs */
|
||||
- /* in PCF files, we thus limit the number to 65536. */
|
||||
- if ( orig_nmetrics > 65536 )
|
||||
+ /*
|
||||
+ * PCF is a format from ancient times; Unicode was in its infancy, and
|
||||
+ * widely used two-byte character sets for CJK scripts (Big 5, GB 2312,
|
||||
+ * JIS X 0208, etc.) did have at most 15000 characters. Even the more
|
||||
+ * exotic CNS 11643 and CCCII standards, which were essentially
|
||||
+ * three-byte character sets, provided less then 65536 assigned
|
||||
+ * characters.
|
||||
+ *
|
||||
+ * While technically possible to have a larger number of glyphs in PCF
|
||||
+ * files, we thus limit the number to 65535, taking into account that we
|
||||
+ * synthesize the metrics of glyph 0 to be a copy of the `default
|
||||
+ * character', and that 0xFFFF in the encodings array indicates a
|
||||
+ * missing glyph.
|
||||
+ */
|
||||
+ if ( orig_nmetrics > 65534 )
|
||||
{
|
||||
FT_TRACE0(( "pcf_get_metrics:"
|
||||
- " only loading first 65536 metrics\n" ));
|
||||
- nmetrics = 65536;
|
||||
+ " only loading first 65534 metrics\n" ));
|
||||
+ nmetrics = 65534;
|
||||
}
|
||||
else
|
||||
nmetrics = orig_nmetrics;
|
||||
|
||||
- face->nmetrics = nmetrics;
|
||||
+ face->nmetrics = nmetrics + 1;
|
||||
|
||||
- if ( FT_NEW_ARRAY( face->metrics, nmetrics ) )
|
||||
+ if ( FT_NEW_ARRAY( face->metrics, face->nmetrics ) )
|
||||
return error;
|
||||
|
||||
- metrics = face->metrics;
|
||||
+ /* we handle glyph index 0 later on */
|
||||
+ metrics = face->metrics + 1;
|
||||
|
||||
FT_TRACE4(( "\n" ));
|
||||
- for ( i = 0; i < nmetrics; i++, metrics++ )
|
||||
+ for ( i = 1; i < face->nmetrics; i++, metrics++ )
|
||||
{
|
||||
FT_TRACE5(( " idx %ld:", i ));
|
||||
error = pcf_get_metric( stream, format, metrics );
|
||||
@@ -808,12 +814,10 @@ THE SOFTWARE.
|
||||
pcf_get_bitmaps( FT_Stream stream,
|
||||
PCF_Face face )
|
||||
{
|
||||
- FT_Error error;
|
||||
- FT_Memory memory = FT_FACE( face )->memory;
|
||||
- FT_ULong* offsets = NULL;
|
||||
- FT_ULong bitmapSizes[GLYPHPADOPTIONS];
|
||||
- FT_ULong format, size;
|
||||
- FT_ULong nbitmaps, orig_nbitmaps, i, sizebitmaps = 0;
|
||||
+ FT_Error error;
|
||||
+ FT_ULong bitmapSizes[GLYPHPADOPTIONS];
|
||||
+ FT_ULong format, size, pos;
|
||||
+ FT_ULong nbitmaps, orig_nbitmaps, i, sizebitmaps = 0;
|
||||
|
||||
|
||||
error = pcf_seek_to_table_type( stream,
|
||||
@@ -859,31 +863,46 @@ THE SOFTWARE.
|
||||
FT_TRACE4(( " number of bitmaps: %ld\n", orig_nbitmaps ));
|
||||
|
||||
/* see comment in `pcf_get_metrics' */
|
||||
- if ( orig_nbitmaps > 65536 )
|
||||
+ if ( orig_nbitmaps > 65534 )
|
||||
{
|
||||
FT_TRACE0(( "pcf_get_bitmaps:"
|
||||
- " only loading first 65536 bitmaps\n" ));
|
||||
- nbitmaps = 65536;
|
||||
+ " only loading first 65534 bitmaps\n" ));
|
||||
+ nbitmaps = 65534;
|
||||
}
|
||||
else
|
||||
nbitmaps = orig_nbitmaps;
|
||||
|
||||
- if ( nbitmaps != face->nmetrics )
|
||||
+ /* no extra bitmap for glyph 0 */
|
||||
+ if ( nbitmaps != face->nmetrics - 1 )
|
||||
return FT_THROW( Invalid_File_Format );
|
||||
|
||||
- if ( FT_NEW_ARRAY( offsets, nbitmaps ) )
|
||||
- return error;
|
||||
+ /* start position of bitmap data */
|
||||
+ pos = stream->pos + nbitmaps * 4 + 4 * 4;
|
||||
|
||||
FT_TRACE5(( "\n" ));
|
||||
- for ( i = 0; i < nbitmaps; i++ )
|
||||
+ for ( i = 1; i <= nbitmaps; i++ )
|
||||
{
|
||||
+ FT_ULong offset;
|
||||
+
|
||||
+
|
||||
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
|
||||
- (void)FT_READ_ULONG( offsets[i] );
|
||||
+ (void)FT_READ_ULONG( offset );
|
||||
else
|
||||
- (void)FT_READ_ULONG_LE( offsets[i] );
|
||||
+ (void)FT_READ_ULONG_LE( offset );
|
||||
|
||||
FT_TRACE5(( " bitmap %lu: offset %lu (0x%lX)\n",
|
||||
- i, offsets[i], offsets[i] ));
|
||||
+ i, offset, offset ));
|
||||
+
|
||||
+ /* right now, we only check the offset with a rough estimate; */
|
||||
+ /* actual bitmaps are only loaded on demand */
|
||||
+ if ( offset > size )
|
||||
+ {
|
||||
+ FT_TRACE0(( "pcf_get_bitmaps:"
|
||||
+ " invalid offset to bitmap data of glyph %lu\n", i ));
|
||||
+ face->metrics[i].bits = pos;
|
||||
+ }
|
||||
+ else
|
||||
+ face->metrics[i].bits = pos + offset;
|
||||
}
|
||||
if ( error )
|
||||
goto Bail;
|
||||
@@ -910,24 +929,9 @@ THE SOFTWARE.
|
||||
|
||||
FT_UNUSED( sizebitmaps ); /* only used for debugging */
|
||||
|
||||
- /* right now, we only check the bitmap offsets; */
|
||||
- /* actual bitmaps are only loaded on demand */
|
||||
- for ( i = 0; i < nbitmaps; i++ )
|
||||
- {
|
||||
- /* rough estimate */
|
||||
- if ( offsets[i] > size )
|
||||
- {
|
||||
- FT_TRACE0(( "pcf_get_bitmaps:"
|
||||
- " invalid offset to bitmap data of glyph %lu\n", i ));
|
||||
- }
|
||||
- else
|
||||
- face->metrics[i].bits = stream->pos + offsets[i];
|
||||
- }
|
||||
-
|
||||
face->bitmapsFormat = format;
|
||||
|
||||
Bail:
|
||||
- FT_FREE( offsets );
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -1062,41 +1066,52 @@ THE SOFTWARE.
|
||||
defaultCharCol = enc->firstCol;
|
||||
}
|
||||
|
||||
- /* FreeType mandates that glyph index 0 is the `undefined glyph', */
|
||||
- /* which PCF calls the `default character'. For this reason, we */
|
||||
- /* swap the positions of glyph index 0 and the index corresponding */
|
||||
- /* to `defaultChar' in case they are different. */
|
||||
-
|
||||
- /* `stream->cursor' still points at the beginning of the frame; */
|
||||
- /* we can thus easily get the offset to the default character */
|
||||
+ /*
|
||||
+ * FreeType mandates that glyph index 0 is the `undefined glyph', which
|
||||
+ * PCF calls the `default character'. However, FreeType needs glyph
|
||||
+ * index 0 to be used for the undefined glyph only, which is is not the
|
||||
+ * case for PCF. For this reason, we add one slot for glyph index 0 and
|
||||
+ * simply copy the default character to it.
|
||||
+ *
|
||||
+ * `stream->cursor' still points to the beginning of the frame; we can
|
||||
+ * thus easily get the offset to the default character.
|
||||
+ */
|
||||
pos = stream->cursor +
|
||||
2 * ( ( defaultCharRow - enc->firstRow ) *
|
||||
- ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
- defaultCharCol - enc->firstCol );
|
||||
+ ( enc->lastCol - enc->firstCol + 1 ) +
|
||||
+ defaultCharCol - enc->firstCol );
|
||||
|
||||
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
|
||||
defaultCharEncodingOffset = FT_PEEK_USHORT( pos );
|
||||
else
|
||||
defaultCharEncodingOffset = FT_PEEK_USHORT_LE( pos );
|
||||
|
||||
- if ( defaultCharEncodingOffset >= face->nmetrics )
|
||||
+ if ( defaultCharEncodingOffset == 0xFFFF )
|
||||
{
|
||||
FT_TRACE0(( "pcf_get_encodings:"
|
||||
- " Invalid glyph index for default character,"
|
||||
- " setting to zero\n" ));
|
||||
- defaultCharEncodingOffset = 0;
|
||||
+ " No glyph for default character,\n"
|
||||
+ " "
|
||||
+ " setting it to the first glyph of the font\n" ));
|
||||
+ defaultCharEncodingOffset = 1;
|
||||
}
|
||||
-
|
||||
- if ( defaultCharEncodingOffset )
|
||||
+ else
|
||||
{
|
||||
- /* do the swapping */
|
||||
- PCF_MetricRec tmp = face->metrics[defaultCharEncodingOffset];
|
||||
-
|
||||
+ defaultCharEncodingOffset++;
|
||||
|
||||
- face->metrics[defaultCharEncodingOffset] = face->metrics[0];
|
||||
- face->metrics[0] = tmp;
|
||||
+ if ( defaultCharEncodingOffset >= face->nmetrics )
|
||||
+ {
|
||||
+ FT_TRACE0(( "pcf_get_encodings:"
|
||||
+ " Invalid glyph index for default character,\n"
|
||||
+ " "
|
||||
+ " setting it to the first glyph of the font\n" ));
|
||||
+ defaultCharEncodingOffset = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ /* copy metrics of default character to index 0 */
|
||||
+ face->metrics[0] = face->metrics[defaultCharEncodingOffset];
|
||||
+
|
||||
+ /* now loop over all values */
|
||||
offset = enc->offset;
|
||||
for ( i = enc->firstRow; i <= enc->lastRow; i++ )
|
||||
{
|
||||
@@ -1111,15 +1126,9 @@ THE SOFTWARE.
|
||||
else
|
||||
encodingOffset = FT_GET_USHORT_LE();
|
||||
|
||||
- if ( encodingOffset != 0xFFFFU )
|
||||
- {
|
||||
- if ( encodingOffset == defaultCharEncodingOffset )
|
||||
- encodingOffset = 0;
|
||||
- else if ( encodingOffset == 0 )
|
||||
- encodingOffset = defaultCharEncodingOffset;
|
||||
- }
|
||||
-
|
||||
- *offset++ = encodingOffset;
|
||||
+ /* everything is off by 1 due to the artificial glyph 0 */
|
||||
+ *offset++ = encodingOffset == 0xFFFF ? 0xFFFF
|
||||
+ : encodingOffset + 1;
|
||||
}
|
||||
}
|
||||
FT_Stream_ExitFrame( stream );
|
@ -1,67 +0,0 @@
|
||||
From 55bbb98f5c5a89230127d6b998a6e23e634b5d0e Mon Sep 17 00:00:00 2001
|
||||
From: Behdad Esfahbod <behdad@behdad.org>
|
||||
Date: Tue, 1 Aug 2017 09:17:02 +0200
|
||||
Subject: [PATCH 077/132] [truetype] Fix loading of named instances.
|
||||
|
||||
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position
|
||||
while loading the `avar' table.
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
include/freetype/ftmm.h | 2 +-
|
||||
src/truetype/ttgxvar.c | 11 ++++++++++-
|
||||
3 files changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h
|
||||
index c41b80ea6..1f48a4945 100644
|
||||
--- a/include/freetype/ftmm.h
|
||||
+++ b/include/freetype/ftmm.h
|
||||
@@ -178,7 +178,7 @@ FT_BEGIN_HEADER
|
||||
/* strid :: The entry in `name' table identifying this instance. */
|
||||
/* */
|
||||
/* psid :: The entry in `name' table identifying a PostScript name */
|
||||
- /* for this instance. */
|
||||
+ /* for this instance. Value 0 indicates a missing entry. */
|
||||
/* */
|
||||
typedef struct FT_Var_Named_Style_
|
||||
{
|
||||
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
|
||||
index 68458362e..df42b3bfd 100644
|
||||
--- a/src/truetype/ttgxvar.c
|
||||
+++ b/src/truetype/ttgxvar.c
|
||||
@@ -2139,8 +2139,16 @@
|
||||
goto Exit;
|
||||
|
||||
if ( fvar_head.instanceCount && !face->blend->avar_loaded )
|
||||
+ {
|
||||
+ FT_ULong offset = FT_STREAM_POS();
|
||||
+
|
||||
+
|
||||
ft_var_load_avar( face );
|
||||
|
||||
+ if ( FT_STREAM_SEEK( offset ) )
|
||||
+ goto Exit;
|
||||
+ }
|
||||
+
|
||||
ns = mmvar->namedstyle;
|
||||
nsc = face->blend->normalized_stylecoords;
|
||||
for ( i = 0; i < fvar_head.instanceCount; i++, ns++ )
|
||||
@@ -2157,6 +2165,7 @@
|
||||
for ( j = 0; j < fvar_head.axisCount; j++, c++ )
|
||||
*c = FT_GET_LONG();
|
||||
|
||||
+ /* valid psid values are 6 and [256;32767] */
|
||||
if ( usePsName )
|
||||
ns->psid = FT_GET_USHORT();
|
||||
|
||||
@@ -2174,7 +2183,7 @@
|
||||
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
|
||||
|
||||
FT_Int found, dummy1, dummy2;
|
||||
- FT_UInt strid = 0xFFFFFFFFUL;
|
||||
+ FT_UInt strid = ~0U;
|
||||
|
||||
|
||||
/* the default instance is missing in array the */
|
||||
--
|
||||
2.13.5
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 7e50824288fac5a36c2938fdb3e1c949ea53f982 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Tue, 1 Aug 2017 12:44:35 +0200
|
||||
Subject: [PATCH 079/132] * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
|
||||
|
||||
---
|
||||
ChangeLog | 4 ++++
|
||||
include/freetype/ftmm.h | 3 ++-
|
||||
src/truetype/ttgxvar.c | 4 +++-
|
||||
3 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h
|
||||
index 1f48a4945..b1bc1ed82 100644
|
||||
--- a/include/freetype/ftmm.h
|
||||
+++ b/include/freetype/ftmm.h
|
||||
@@ -178,7 +178,8 @@ FT_BEGIN_HEADER
|
||||
/* strid :: The entry in `name' table identifying this instance. */
|
||||
/* */
|
||||
/* psid :: The entry in `name' table identifying a PostScript name */
|
||||
- /* for this instance. Value 0 indicates a missing entry. */
|
||||
+ /* for this instance. Value 0xFFFF indicates a missing */
|
||||
+ /* entry. */
|
||||
/* */
|
||||
typedef struct FT_Var_Named_Style_
|
||||
{
|
||||
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
|
||||
index df42b3bfd..5a87df139 100644
|
||||
--- a/src/truetype/ttgxvar.c
|
||||
+++ b/src/truetype/ttgxvar.c
|
||||
@@ -2165,9 +2165,11 @@
|
||||
for ( j = 0; j < fvar_head.axisCount; j++, c++ )
|
||||
*c = FT_GET_LONG();
|
||||
|
||||
- /* valid psid values are 6 and [256;32767] */
|
||||
+ /* valid psid values are 6, [256;32767], and 0xFFFF */
|
||||
if ( usePsName )
|
||||
ns->psid = FT_GET_USHORT();
|
||||
+ else
|
||||
+ ns->psid = 0xFFFF;
|
||||
|
||||
ft_var_to_normalized( face,
|
||||
fvar_head.axisCount,
|
||||
--
|
||||
2.13.5
|
||||
|
74
freetype-2.10.0-internal-outline.patch
Normal file
74
freetype-2.10.0-internal-outline.patch
Normal file
@ -0,0 +1,74 @@
|
||||
diff -rupN --no-dereference freetype-2.10.0/include/freetype/ftoutln.h freetype-2.10.0-new/include/freetype/ftoutln.h
|
||||
--- freetype-2.10.0/include/freetype/ftoutln.h 2019-02-23 10:06:06.000000000 +0100
|
||||
+++ freetype-2.10.0-new/include/freetype/ftoutln.h 2019-08-30 00:39:51.523521567 +0200
|
||||
@@ -165,6 +165,15 @@ FT_BEGIN_HEADER
|
||||
FT_Int numContours,
|
||||
FT_Outline *anoutline );
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT( FT_Error )
|
||||
+ FT_Outline_New_Internal( FT_Memory memory,
|
||||
+ FT_UInt numPoints,
|
||||
+ FT_Int numContours,
|
||||
+ FT_Outline *anoutline );
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@@ -192,6 +201,13 @@ FT_BEGIN_HEADER
|
||||
FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline );
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT( FT_Error )
|
||||
+ FT_Outline_Done_Internal( FT_Memory memory,
|
||||
+ FT_Outline* outline );
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
diff -rupN --no-dereference freetype-2.10.0/src/base/ftoutln.c freetype-2.10.0-new/src/base/ftoutln.c
|
||||
--- freetype-2.10.0/src/base/ftoutln.c 2019-02-23 10:06:07.000000000 +0100
|
||||
+++ freetype-2.10.0-new/src/base/ftoutln.c 2019-08-30 00:39:51.524521566 +0200
|
||||
@@ -291,6 +291,19 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT_DEF( FT_Error )
|
||||
+ FT_Outline_New_Internal( FT_Memory memory,
|
||||
+ FT_UInt numPoints,
|
||||
+ FT_Int numContours,
|
||||
+ FT_Outline *anoutline )
|
||||
+ {
|
||||
+ return FT_THROW( Unimplemented_Feature );
|
||||
+ }
|
||||
+
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Outline_New( FT_Library library,
|
||||
FT_UInt numPoints,
|
||||
@@ -423,6 +436,17 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT_DEF( FT_Error )
|
||||
+ FT_Outline_Done_Internal( FT_Memory memory,
|
||||
+ FT_Outline* outline )
|
||||
+ {
|
||||
+ return FT_THROW( Unimplemented_Feature );
|
||||
+ }
|
||||
+
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline )
|
@ -1,18 +1,19 @@
|
||||
--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
|
||||
+++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
|
||||
@@ -110,7 +110,7 @@
|
||||
diff -rupN --no-dereference freetype-2.10.0/modules.cfg freetype-2.10.0-new/modules.cfg
|
||||
--- freetype-2.10.0/modules.cfg 2019-02-23 10:06:07.000000000 +0100
|
||||
+++ freetype-2.10.0-new/modules.cfg 2019-08-30 00:39:51.416521620 +0200
|
||||
@@ -111,7 +111,7 @@ AUX_MODULES += cache
|
||||
|
||||
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
|
||||
#
|
||||
# No FT_CONFIG_OPTION_PIC support.
|
||||
-# AUX_MODULES += gxvalid
|
||||
+AUX_MODULES += gxvalid
|
||||
|
||||
# Support for streams compressed with gzip (files with suffix .gz).
|
||||
#
|
||||
@@ -124,7 +124,7 @@
|
||||
@@ -130,7 +130,7 @@ AUX_MODULES += bzip2
|
||||
|
||||
# OpenType table validation. Needs `ftotval.c' below.
|
||||
#
|
||||
# No FT_CONFIG_OPTION_PIC support.
|
||||
-# AUX_MODULES += otvalid
|
||||
+AUX_MODULES += otvalid
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500
|
||||
+++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500
|
||||
@@ -92,7 +92,7 @@
|
||||
/* rendering technology that produces excellent output without LCD */
|
||||
/* filtering. */
|
||||
/* */
|
||||
diff -rupN --no-dereference freetype-2.10.0/include/freetype/config/ftoption.h freetype-2.10.0-new/include/freetype/config/ftoption.h
|
||||
--- freetype-2.10.0/include/freetype/config/ftoption.h 2019-02-23 10:09:06.000000000 +0100
|
||||
+++ freetype-2.10.0-new/include/freetype/config/ftoption.h 2019-08-30 00:39:51.308521674 +0200
|
||||
@@ -126,7 +126,7 @@ FT_BEGIN_HEADER
|
||||
* macro is not defined, FreeType offers alternative LCD rendering
|
||||
* technology that produces excellent output without LCD filtering.
|
||||
*/
|
||||
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/**************************************************************************
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- ft2demos-2.5.2/Makefile
|
||||
+++ ft2demos-2.5.2/Makefile
|
||||
@@ -296,10 +296,10 @@ else
|
||||
# The following programs are not compiled automatically; either comment
|
||||
# out the affected line or use the program name as a Makefile target.
|
||||
#
|
||||
- # EXES += ftchkwd
|
||||
- # EXES += ftmemchk
|
||||
- # EXES += ftpatchk
|
||||
- # EXES += fttimer
|
||||
+ EXES += ftchkwd
|
||||
+ EXES += ftmemchk
|
||||
+ EXES += ftpatchk
|
||||
+ EXES += fttimer
|
||||
# EXES += testname
|
||||
|
||||
exes: $(EXES:%=$(BIN_DIR_2)/%$E)
|
@ -1,11 +0,0 @@
|
||||
--- freetype-2.8/builds/unix/freetype-config.in.orig 2017-03-30 12:20:23.000000001 +0200
|
||||
+++ freetype-2.8/builds/unix/freetype-config.in 2017-05-16 13:25:39.223041128 +0200
|
||||
@@ -205,7 +205,7 @@ if test "$echo_libs" = "yes" ; then
|
||||
fi
|
||||
|
||||
if test "$echo_libtool" = "yes" ; then
|
||||
- echo ${SYSROOT}$libdir/libfreetype.la
|
||||
+ echo ""
|
||||
fi
|
||||
|
||||
# EOF
|
@ -1,36 +0,0 @@
|
||||
From 8d435c463d22f6de35015b244d6f9bb433beb7e6 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Thu, 1 Jun 2017 07:09:44 +0200
|
||||
Subject: [PATCH] * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter
|
||||
again.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Problem reported by Marek Kašík <mkasik@redhat.com>.
|
||||
|
||||
The problematic font that exceeds the old limit is Padauk-Bold,
|
||||
version 3.002, containing bytecode generated by a buggy version of
|
||||
ttfautohint.
|
||||
---
|
||||
ChangeLog | 10 ++++++++++
|
||||
src/truetype/ttinterp.c | 3 +--
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
|
||||
index 0c48c256..775d1104 100644
|
||||
--- a/src/truetype/ttinterp.c
|
||||
+++ b/src/truetype/ttinterp.c
|
||||
@@ -7649,8 +7649,7 @@
|
||||
FT_MAX( 50,
|
||||
exc->cvtSize / 10 );
|
||||
else
|
||||
- exc->loopcall_counter_max = FT_MAX( 100,
|
||||
- 10 * exc->cvtSize );
|
||||
+ exc->loopcall_counter_max = 300 + 8 * exc->cvtSize;
|
||||
|
||||
/* as a protection against an unreasonable number of CVT entries */
|
||||
/* we assume at most 100 control values per glyph for the counter */
|
||||
--
|
||||
2.13.0
|
||||
|
@ -1,65 +0,0 @@
|
||||
--- freetype-2.9/builds/unix/freetype-config.in
|
||||
+++ freetype-2.9/builds/unix/freetype-config.in
|
||||
@@ -13,45 +13,25 @@ LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
|
||||
-# if `pkg-config' is available, use values from `freetype2.pc'
|
||||
-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
|
||||
-if test $? -eq 0 ; then
|
||||
- # note that option `--variable' is not affected by the
|
||||
- # PKG_CONFIG_SYSROOT_DIR environment variable
|
||||
- if test "x$SYSROOT" != "x" ; then
|
||||
- PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
|
||||
- export PKG_CONFIG_SYSROOT_DIR
|
||||
- fi
|
||||
-
|
||||
- prefix=`%PKG_CONFIG% --variable prefix freetype2`
|
||||
- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
|
||||
-
|
||||
- includedir=`%PKG_CONFIG% --variable includedir freetype2`
|
||||
- libdir=`%PKG_CONFIG% --variable libdir freetype2`
|
||||
-
|
||||
- version=`%PKG_CONFIG% --modversion freetype2`
|
||||
-
|
||||
- cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
- dynamic_libs=`%PKG_CONFIG% --libs freetype2`
|
||||
- static_libs=`%PKG_CONFIG% --static --libs freetype2`
|
||||
-else
|
||||
- prefix="%prefix%"
|
||||
- exec_prefix="%exec_prefix%"
|
||||
-
|
||||
- includedir="%includedir%"
|
||||
- libdir="%libdir%"
|
||||
-
|
||||
- version=%ft_version%
|
||||
-
|
||||
- cflags="-I${SYSROOT}$includedir/freetype2"
|
||||
- dynamic_libs="-lfreetype"
|
||||
- static_libs="%LIBSSTATIC_CONFIG%"
|
||||
- if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
||||
- test "${SYSROOT}$libdir" != "/usr/lib64" ; then
|
||||
- libs_L="-L${SYSROOT}$libdir"
|
||||
- fi
|
||||
+# note that option `--variable' is not affected by the
|
||||
+# PKG_CONFIG_SYSROOT_DIR environment variable
|
||||
+if test "x$SYSROOT" != "x" ; then
|
||||
+ PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
|
||||
+ export PKG_CONFIG_SYSROOT_DIR
|
||||
fi
|
||||
|
||||
+prefix=`pkgconf --variable prefix freetype2`
|
||||
+exec_prefix=`pkgconf --variable exec_prefix freetype2`
|
||||
+
|
||||
+includedir=`pkgconf --variable includedir freetype2`
|
||||
+libdir=`pkgconf --variable libdir freetype2`
|
||||
+
|
||||
+version=`pkgconf --modversion freetype2`
|
||||
+
|
||||
+cflags=`pkgconf --cflags freetype2`
|
||||
+dynamic_libs=`pkgconf --libs freetype2`
|
||||
+static_libs=`pkgconf --static --libs freetype2`
|
||||
+
|
||||
orig_prefix=$prefix
|
||||
orig_exec_prefix=$exec_prefix
|
||||
|
@ -1,101 +0,0 @@
|
||||
--- a/src/smooth/ftsmooth.c
|
||||
+++ b/src/smooth/ftsmooth.c
|
||||
@@ -232,39 +232,13 @@
|
||||
FT_UInt i, j;
|
||||
|
||||
unsigned int height = bitmap->rows;
|
||||
- unsigned int width = bitmap->width;
|
||||
+ unsigned int width = bitmap->width / 3;
|
||||
int pitch = bitmap->pitch;
|
||||
|
||||
-
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. */
|
||||
- width /= 3;
|
||||
-
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, -21, 0 );
|
||||
- x_shift -= 21;
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 42, 0 );
|
||||
- x_shift += 42;
|
||||
- bitmap->buffer -= 2 * width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
|
||||
- /* XXX: It is more efficient to render every third byte above. */
|
||||
-
|
||||
if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
|
||||
goto Exit;
|
||||
|
||||
@@ -272,11 +246,7 @@
|
||||
{
|
||||
line = bitmap->buffer + i * (FT_ULong)pitch;
|
||||
for ( j = 0; j < width; j++ )
|
||||
- {
|
||||
- temp[3 * j ] = line[j];
|
||||
- temp[3 * j + 1] = line[j + width];
|
||||
- temp[3 * j + 2] = line[j + width + width];
|
||||
- }
|
||||
+ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j];
|
||||
FT_MEM_COPY( line, temp, pitch );
|
||||
}
|
||||
|
||||
@@ -284,35 +254,23 @@
|
||||
}
|
||||
else if ( vmul ) /* lcd_v */
|
||||
{
|
||||
- int pitch = bitmap->pitch;
|
||||
-
|
||||
+ FT_Byte* line;
|
||||
+ FT_UInt i;
|
||||
+ int original_pitch = bitmap->pitch;
|
||||
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. Triple the pitch to render on each third row. */
|
||||
bitmap->pitch *= 3;
|
||||
bitmap->rows /= 3;
|
||||
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, 0, 21 );
|
||||
- y_shift += 21;
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 0, -42 );
|
||||
- y_shift -= 42;
|
||||
- bitmap->buffer -= 2 * pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
+ for ( i = 0; i < bitmap->rows; i++ )
|
||||
+ {
|
||||
+ line = bitmap->buffer + i * bitmap->pitch;
|
||||
+ FT_MEM_COPY( line + original_pitch, line, bitmap->width );
|
||||
+ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width );
|
||||
+ }
|
||||
|
||||
bitmap->pitch /= 3;
|
||||
bitmap->rows *= 3;
|
@ -1,8 +1,9 @@
|
||||
%{?mingw_package_header}
|
||||
|
||||
Name: mingw-freetype
|
||||
Version: 2.9.1
|
||||
Release: 3%{?dist}
|
||||
# NOTE See comment for Patch2 below
|
||||
Version: 2.10.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Free and portable font rendering engine
|
||||
|
||||
License: FTL or GPLv2+
|
||||
@ -15,11 +16,11 @@ Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{ve
|
||||
Patch0: freetype-2.3.0-enable-spr.patch
|
||||
# Enable otvalid and gxvalid modules
|
||||
Patch1: freetype-2.2.1-enable-valid.patch
|
||||
# Enable additional demos
|
||||
#Patch2: freetype-2.5.2-more-demos.patch
|
||||
Patch3: freetype-2.6.5-libtool.patch
|
||||
Patch4: freetype-2.8-multilib.patch
|
||||
Patch5: freetype-2.9-ftsmooth.patch
|
||||
# Re-add symbol downstream for ABI compatibility only. Remove once soname has been bumped from -6.
|
||||
Patch2: freetype-2.10.0-internal-outline.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1719132
|
||||
# https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=c149f7397e484c97f45fb75fa1c7fdda2fc646cd
|
||||
Patch3: 0001-pcf-Fix-handling-of-undefined-glyph-56067.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -71,22 +72,11 @@ Requires: mingw64-freetype = %{version}-%{release}
|
||||
Static version of the MinGW Windows Freetype library.
|
||||
|
||||
|
||||
%?mingw_debug_package
|
||||
%{?mingw_debug_package}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n freetype-%{version}
|
||||
|
||||
%patch0 -p1 -b .enable-spr
|
||||
%patch1 -p1 -b .enable-valid
|
||||
|
||||
#pushd ft2demos-%{version}
|
||||
#%patch2 -p1 -b .more-demos
|
||||
#popd
|
||||
|
||||
%patch3 -p1 -b .libtool
|
||||
%patch4 -p1 -b .multilib
|
||||
%patch5 -p1 -b .ftsmooth
|
||||
%autosetup -p1 -n freetype-%{version}
|
||||
|
||||
|
||||
%build
|
||||
@ -145,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} $RPM_BUILD_ROOT%{mingw64_mandir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 30 2019 Sandro Mani <manisandro@gmail.com> - 2.10.0-1
|
||||
- Update to 2.10.0
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (freetype-2.9.1.tar.bz2) = 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
|
||||
SHA512 (freetype-2.10.0.tar.bz2) = dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
|
||||
|
Loading…
Reference in New Issue
Block a user