1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00

print/freetype2: Update to 2.10.2

- breaks print/ftdemos2, which needs to be updated to 2.10.2 as well.

PR:		246432, 246631
Submitted by:	lightside <lightside@gmx.com>
Exp-run by:	antoine
This commit is contained in:
Tobias C. Berner 2020-06-01 18:09:48 +00:00
parent 4c6273d1f0
commit 4ca20f66a1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=537498
4 changed files with 8 additions and 206 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= freetype2
PORTVERSION= 2.10.1
PORTVERSION= 2.10.2
CATEGORIES= print
MASTER_SITES= http://savannah.nongnu.org/download/freetype/ \
SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \
@ -36,7 +36,7 @@ PORTDOCS= reference CHANGES formats.txt LICENSE.TXT raster.txt
CPE_PRODUCT= freetype
CPE_VENDOR= freetype
OPTIONS_DEFINE= CONFIG DEBUG DOCS LONG_PCF_NAMES PNG \
OPTIONS_DEFINE= BROTLI CONFIG DEBUG DOCS LONG_PCF_NAMES PNG \
TABLE_VALIDATION
OPTIONS_GROUP= SUBPIXEL_HINTING
OPTIONS_GROUP_SUBPIXEL_HINTING= V38 V40
@ -47,6 +47,8 @@ OPTIONS_RADIO_SIZE_METRICS_CHOICE= FIX_SIZE_METRICS TT_SIZE_METRICS
OPTIONS_DEFAULT= CONFIG LCD_RENDERING LONG_PCF_NAMES V40
OPTIONS_SUB= yes
BROTLI_CONFIGURE_WITH= brotli
BROTLI_LIB_DEPENDS= libbrotlidec.so:archivers/brotli
CONFIG_DESC= Install freetype-config
CONFIG_CONFIGURE_ENABLE=freetype-config
PNG_DESC= Png compressed OpenType embedded bitmaps support

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1561996538
SHA256 (freetype-2.10.1.tar.xz) = 16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f
SIZE (freetype-2.10.1.tar.xz) = 2378784
TIMESTAMP = 1589001276
SHA256 (freetype-2.10.2.tar.xz) = 1543d61025d2e6312e0a1c563652555f17378a204a61e99928c9fcef030a2d8b
SIZE (freetype-2.10.2.tar.xz) = 2404456

View File

@ -1,200 +0,0 @@
# [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).
# http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=f2b64583cb2587373e126b06d8da9ac97b287681
# [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580).
# http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=05439f5cc69eaa3deaf3db52a7999af09a2c293a
# Properly handle phantom points for variation fonts (#56601).
# http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=12e4307dc7b48c9a4a4fc3ac6c32220874ab18ec
# [sfnt, winfonts] Avoid memory leaks in case of error (#56587).
# http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b110acba9e6f7e40314f0da5d249cb3cb3beeab8
--- src/psaux/psintrp.c.orig 2019-03-05 10:28:19 UTC
+++ src/psaux/psintrp.c
@@ -1433,6 +1433,13 @@
lastError = error2; /* pass FreeType error through */
goto exit;
}
+
+ /* save the left bearing and width of the SEAC */
+ /* glyph as they will be erased by the next load */
+
+ left_bearing = *decoder->builder.left_bearing;
+ advance = *decoder->builder.advance;
+
cf2_interpT2CharString( font,
&component,
callbacks,
@@ -1443,11 +1450,14 @@
&dummyWidth );
cf2_freeT1SeacComponent( decoder, &component );
- /* save the left bearing and width of the base */
- /* character as they will be erased by the next load */
+ /* If the SEAC glyph doesn't have a (H)SBW of its */
+ /* own use the values from the base glyph. */
- left_bearing = *decoder->builder.left_bearing;
- advance = *decoder->builder.advance;
+ if ( !haveWidth )
+ {
+ left_bearing = *decoder->builder.left_bearing;
+ advance = *decoder->builder.advance;
+ }
decoder->builder.left_bearing->x = 0;
decoder->builder.left_bearing->y = 0;
@@ -1473,8 +1483,8 @@
&dummyWidth );
cf2_freeT1SeacComponent( decoder, &component );
- /* restore the left side bearing and */
- /* advance width of the base character */
+ /* restore the left side bearing and advance width */
+ /* of the SEAC glyph or base character (saved above) */
*decoder->builder.left_bearing = left_bearing;
*decoder->builder.advance = advance;
--- src/psaux/t1decode.c.orig 2019-02-23 09:06:07 UTC
+++ src/psaux/t1decode.c
@@ -367,6 +367,12 @@
FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */
+ /* save the left bearing and width of the SEAC */
+ /* glyph as they will be erased by the next load */
+
+ left_bearing = decoder->builder.left_bearing;
+ advance = decoder->builder.advance;
+
/* the seac operator must not be nested */
decoder->seac = TRUE;
error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index );
@@ -374,11 +380,14 @@
if ( error )
goto Exit;
- /* save the left bearing and width of the base character */
- /* as they will be erased by the next load. */
+ /* If the SEAC glyph doesn't have a (H)SBW of its */
+ /* own use the values from the base glyph. */
- left_bearing = decoder->builder.left_bearing;
- advance = decoder->builder.advance;
+ if ( decoder->builder.parse_state != T1_Parse_Have_Width )
+ {
+ left_bearing = decoder->builder.left_bearing;
+ advance = decoder->builder.advance;
+ }
decoder->builder.left_bearing.x = 0;
decoder->builder.left_bearing.y = 0;
@@ -396,8 +405,8 @@
if ( error )
goto Exit;
- /* restore the left side bearing and */
- /* advance width of the base character */
+ /* restore the left side bearing and advance width */
+ /* of the SEAC glyph or base character (saved above) */
decoder->builder.left_bearing = left_bearing;
decoder->builder.advance = advance;
--- src/sfnt/sfwoff.c.orig 2019-05-31 05:59:06 UTC
+++ src/sfnt/sfwoff.c
@@ -371,18 +371,18 @@
sfnt + table->OrigOffset, &output_len,
stream->cursor, table->CompLength );
if ( error )
- goto Exit;
+ goto Exit1;
if ( output_len != table->OrigLength )
{
FT_ERROR(( "woff_font_open: compressed table length mismatch\n" ));
error = FT_THROW( Invalid_Table );
- goto Exit;
+ goto Exit1;
}
#else /* !FT_CONFIG_OPTION_USE_ZLIB */
error = FT_THROW( Unimplemented_Feature );
- goto Exit;
+ goto Exit1;
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
}
@@ -424,6 +424,10 @@
}
return error;
+
+ Exit1:
+ FT_FRAME_EXIT();
+ goto Exit;
}
--- src/truetype/ttgload.c.orig 2019-05-29 06:13:12 UTC
+++ src/truetype/ttgload.c
@@ -1102,9 +1102,16 @@
}
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
- !IS_HINTED( loader->load_flags ) )
+ /* if we have a HVAR table, `pp1' and/or `pp2' */
+ /* are already adjusted but unscaled */
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) &&
+ IS_HINTED( loader->load_flags ) )
+ {
+ loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
+ loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+ }
+ else
#endif
{
loader->pp1 = outline->points[n_points - 4];
@@ -1112,9 +1119,17 @@
}
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
- !IS_HINTED( loader->load_flags ) )
+ /* if we have a VVAR table, `pp3' and/or `pp4' */
+ /* are already adjusted but unscaled */
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) &&
+ IS_HINTED( loader->load_flags ) )
+ {
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
+ loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
+ loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
+ }
+ else
#endif
{
loader->pp3 = outline->points[n_points - 2];
--- src/winfonts/winfnt.c.orig 2019-02-23 09:06:07 UTC
+++ src/winfonts/winfnt.c
@@ -331,7 +331,7 @@
{
FT_TRACE2(( "invalid alignment shift count for resource data\n" ));
error = FT_THROW( Invalid_File_Format );
- goto Exit;
+ goto Exit1;
}
@@ -597,6 +597,10 @@
Exit:
return error;
+
+ Exit1:
+ FT_FRAME_EXIT();
+ goto Exit;
}

View File

@ -52,7 +52,7 @@ include/freetype2/ft2build.h
lib/libfreetype.a
lib/libfreetype.so
lib/libfreetype.so.6
lib/libfreetype.so.6.17.1
lib/libfreetype.so.6.17.2
libdata/pkgconfig/freetype2.pc
%%CONFIG%%man/man1/freetype-config.1.gz
share/aclocal/freetype2.m4