Update to 2.10.1
This commit is contained in:
parent
fd03d9ab7c
commit
bb5781f42c
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@ freetype-doc-2.3.11.tar.gz
|
||||
/freetype-2.8.tar.bz2
|
||||
/freetype-2.9.1.tar.bz2
|
||||
/freetype-2.10.0.tar.bz2
|
||||
/freetype-2.10.1.tar.xz
|
||||
|
@ -1,292 +0,0 @@
|
||||
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,6 +1,6 @@
|
||||
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
|
||||
diff -rupN --no-dereference freetype-2.10.1/include/freetype/ftoutln.h freetype-2.10.1-new/include/freetype/ftoutln.h
|
||||
--- freetype-2.10.1/include/freetype/ftoutln.h 2019-06-23 07:01:12.000000000 +0200
|
||||
+++ freetype-2.10.1-new/include/freetype/ftoutln.h 2020-02-07 17:45:38.812222868 +0100
|
||||
@@ -165,6 +165,15 @@ FT_BEGIN_HEADER
|
||||
FT_Int numContours,
|
||||
FT_Outline *anoutline );
|
||||
@ -31,10 +31,10 @@ diff -rupN --no-dereference freetype-2.10.0/include/freetype/ftoutln.h freetype-
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
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 @@
|
||||
diff -rupN --no-dereference freetype-2.10.1/src/base/ftoutln.c freetype-2.10.1-new/src/base/ftoutln.c
|
||||
--- freetype-2.10.1/src/base/ftoutln.c 2019-05-12 21:07:18.000000000 +0200
|
||||
+++ freetype-2.10.1-new/src/base/ftoutln.c 2020-02-07 17:45:38.812222868 +0100
|
||||
@@ -290,6 +290,19 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
@ -54,7 +54,7 @@ diff -rupN --no-dereference freetype-2.10.0/src/base/ftoutln.c freetype-2.10.0-n
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Outline_New( FT_Library library,
|
||||
FT_UInt numPoints,
|
||||
@@ -423,6 +436,17 @@
|
||||
@@ -422,6 +435,17 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
diff -rupN --no-dereference freetype-2.10.1/modules.cfg freetype-2.10.1-new/modules.cfg
|
||||
--- freetype-2.10.1/modules.cfg 2019-02-23 10:06:07.000000000 +0100
|
||||
+++ freetype-2.10.1-new/modules.cfg 2020-02-07 17:45:38.682220283 +0100
|
||||
@@ -111,7 +111,7 @@ AUX_MODULES += cache
|
||||
|
||||
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
|
||||
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
diff -rupN --no-dereference freetype-2.10.1/include/freetype/config/ftoption.h freetype-2.10.1-new/include/freetype/config/ftoption.h
|
||||
--- freetype-2.10.1/include/freetype/config/ftoption.h 2019-02-23 10:09:06.000000000 +0100
|
||||
+++ freetype-2.10.1-new/include/freetype/config/ftoption.h 2020-02-07 17:45:38.545217560 +0100
|
||||
@@ -126,7 +126,7 @@ FT_BEGIN_HEADER
|
||||
* macro is not defined, FreeType offers alternative LCD rendering
|
||||
* technology that produces excellent output without LCD filtering.
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
Name: mingw-freetype
|
||||
# NOTE See comment for Patch2 below
|
||||
Version: 2.10.0
|
||||
Release: 2%{?dist}
|
||||
Version: 2.10.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Free and portable font rendering engine
|
||||
|
||||
License: FTL or GPLv2+
|
||||
URL: http://www.freetype.org
|
||||
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
|
||||
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz
|
||||
|
||||
# Patches from native Fedora package:
|
||||
|
||||
@ -18,9 +18,6 @@ Patch0: freetype-2.3.0-enable-spr.patch
|
||||
Patch1: freetype-2.2.1-enable-valid.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
|
||||
|
||||
@ -135,6 +132,9 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} $RPM_BUILD_ROOT%{mingw64_mandir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 07 2020 Sandro Mani <manisandro@gmail.com> - 2.10.1-1
|
||||
- Update to 2.10.1
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (freetype-2.10.0.tar.bz2) = dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
|
||||
SHA512 (freetype-2.10.1.tar.xz) = c7a565b0ab3dce81927008a6965d5c7540f0dc973fcefdc1677c2e65add8668b4701c2958d25593cb41f706f4488765365d40b93da71dbfa72907394f28b2650
|
||||
|
Loading…
Reference in New Issue
Block a user