aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2015-07-26 00:01:14 +0800
committerkwm <kwm@FreeBSD.org>2015-07-26 00:01:14 +0800
commit9c81bf703ae39628bdfe5875d7042e07a33f8b6d (patch)
tree3bd15ac07a442fe08a218573ec6b821b912cdd89 /print
parente621173856e0fd30c8da7e44743e693b0a8bf16d (diff)
downloadfreebsd-ports-gnome-9c81bf703ae39628bdfe5875d7042e07a33f8b6d.tar.gz
freebsd-ports-gnome-9c81bf703ae39628bdfe5875d7042e07a33f8b6d.tar.zst
freebsd-ports-gnome-9c81bf703ae39628bdfe5875d7042e07a33f8b6d.zip
Revert a upstream commit that causes text getting cut off, while upstream
investigates the issue. Submitted by: Daniel Kolesa Tested by: Daniel Kolesa
Diffstat (limited to 'print')
-rw-r--r--print/freetype2/Makefile1
-rw-r--r--print/freetype2/files/patch-5cd2155163
-rw-r--r--print/freetype2/pkg-descr2
3 files changed, 165 insertions, 1 deletions
diff --git a/print/freetype2/Makefile b/print/freetype2/Makefile
index e5889d775bdc..7d6ef9f1d5a6 100644
--- a/print/freetype2/Makefile
+++ b/print/freetype2/Makefile
@@ -3,6 +3,7 @@
PORTNAME= freetype2
PORTVERSION= 2.6
+PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= http://savannah.nongnu.org/download/freetype/ \
SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \
diff --git a/print/freetype2/files/patch-5cd2155 b/print/freetype2/files/patch-5cd2155
new file mode 100644
index 000000000000..b9806f7a9462
--- /dev/null
+++ b/print/freetype2/files/patch-5cd2155
@@ -0,0 +1,163 @@
+Revert commit below to fix cut off text
+
+https://savannah.nongnu.org/bugs/?45520
+
+From 5cd21551131ef3a9690ecbefcc9782286ee5199e Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Fri, 10 Apr 2015 05:01:01 +0000
+Subject: [cff] Update advance width handling to OpenType 1.7.
+
+Problem reported by Behdad.
+
+* src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
+separately.
+
+* src/cff/cffgload.c (cff_slot_load): Use advance width and side
+bearing values from `hmtx' table if present.
+---
+
+--- src/cff/cffdrivr.c.orig 2015-04-28 09:15:13.000000000 +0200
++++ src/cff/cffdrivr.c 2015-07-25 17:42:23.025572000 +0200
+@@ -195,68 +195,6 @@
+ FT_GlyphSlot slot = face->glyph;
+
+
+- if ( FT_IS_SFNT( face ) )
+- {
+- /* OpenType 1.7 mandates that the data from `hmtx' table be used; */
+- /* it is no longer necessary that those values are identical to */
+- /* the values in the `CFF' table */
+-
+- TT_Face ttface = (TT_Face)face;
+- FT_Short dummy;
+-
+-
+- if ( flags & FT_LOAD_VERTICAL_LAYOUT )
+- {
+- /* check whether we have data from the `vmtx' table at all; */
+- /* otherwise we extract the info from the CFF glyphstrings */
+- /* (instead of synthesizing a global value using the `OS/2' */
+- /* table) */
+- if ( !ttface->vertical_info )
+- goto Missing_Table;
+-
+- for ( nn = 0; nn < count; nn++ )
+- {
+- FT_UShort ah;
+-
+-
+- ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
+- 1,
+- start + nn,
+- &dummy,
+- &ah );
+-
+- FT_TRACE5(( " idx %d: advance height %d font units\n",
+- start + nn, ah ));
+- advances[nn] = ah;
+- }
+- }
+- else
+- {
+- /* check whether we have data from the `hmtx' table at all */
+- if ( !ttface->horizontal.number_Of_HMetrics )
+- goto Missing_Table;
+-
+- for ( nn = 0; nn < count; nn++ )
+- {
+- FT_UShort aw;
+-
+-
+- ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
+- 0,
+- start + nn,
+- &dummy,
+- &aw );
+-
+- FT_TRACE5(( " idx %d: advance width %d font units\n",
+- start + nn, aw ));
+- advances[nn] = aw;
+- }
+- }
+-
+- return error;
+- }
+-
+- Missing_Table:
+ flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
+
+ for ( nn = 0; nn < count; nn++ )
+--- src/cff/cffgload.c.orig 2015-04-16 07:02:23.000000000 +0200
++++ src/cff/cffgload.c 2015-07-25 17:42:23.027008000 +0200
+@@ -2725,7 +2725,7 @@
+ face->vertical_info &&
+ face->vertical.number_Of_VMetrics > 0 );
+
+- /* get the vertical metrics from the vmtx table if we have one */
++ /* get the vertical metrics from the vtmx table if we have one */
+ if ( has_vertical_info )
+ {
+ (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
+@@ -2953,43 +2953,25 @@
+ FT_Bool has_vertical_info;
+
+
+- if ( face->horizontal.number_Of_HMetrics )
+- {
+- FT_Short horiBearingX = 0;
+- FT_UShort horiAdvance = 0;
+-
+-
+- ( (SFNT_Service)face->sfnt )->get_metrics( face, 0,
+- glyph_index,
+- &horiBearingX,
+- &horiAdvance );
+- metrics->horiAdvance = horiAdvance;
+- metrics->horiBearingX = horiBearingX;
+- glyph->root.linearHoriAdvance = horiAdvance;
+- }
+- else
+- {
+- /* copy the _unscaled_ advance width */
+- metrics->horiAdvance = decoder.glyph_width;
+- glyph->root.linearHoriAdvance = decoder.glyph_width;
+- }
+-
++ /* copy the _unscaled_ advance width */
++ metrics->horiAdvance = decoder.glyph_width;
++ glyph->root.linearHoriAdvance = decoder.glyph_width;
+ glyph->root.internal->glyph_transformed = 0;
+
+ has_vertical_info = FT_BOOL( face->vertical_info &&
+ face->vertical.number_Of_VMetrics > 0 );
+
+- /* get the vertical metrics from the vmtx table if we have one */
++ /* get the vertical metrics from the vtmx table if we have one */
+ if ( has_vertical_info )
+ {
+ FT_Short vertBearingY = 0;
+ FT_UShort vertAdvance = 0;
+
+
+- ( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
+- glyph_index,
+- &vertBearingY,
+- &vertAdvance );
++ (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
++ glyph_index,
++ &vertBearingY,
++ &vertAdvance );
+ metrics->vertBearingY = vertBearingY;
+ metrics->vertAdvance = vertAdvance;
+ }
+@@ -3064,9 +3046,7 @@
+ metrics->width = cbox.xMax - cbox.xMin;
+ metrics->height = cbox.yMax - cbox.yMin;
+
+- if ( !face->horizontal.number_Of_HMetrics )
+- metrics->horiBearingX = cbox.xMin;
+-
++ metrics->horiBearingX = cbox.xMin;
+ metrics->horiBearingY = cbox.yMax;
+
+ if ( has_vertical_info )
diff --git a/print/freetype2/pkg-descr b/print/freetype2/pkg-descr
index 57ec2a4c68fc..d047091d3845 100644
--- a/print/freetype2/pkg-descr
+++ b/print/freetype2/pkg-descr
@@ -7,4 +7,4 @@ ttf2bdf: Produce bitmapped fonts from TrueType files for your X11
applications.
ttfbanner: make posters using a TrueType font
-WWW: http://freetype.sourceforge.net/
+WWW: http://www.freetype.org/