Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2015 16:01:15 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r392890 - in head/print/freetype2: . files
Message-ID:  <201507251601.t6PG1FEM008104@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Sat Jul 25 16:01:14 2015
New Revision: 392890
URL: https://svnweb.freebsd.org/changeset/ports/392890

Log:
  Revert a upstream commit that causes text getting cut off, while upstream
  investigates the issue.
  
  Submitted by:	Daniel Kolesa
  Tested by:	Daniel Kolesa

Added:
  head/print/freetype2/files/patch-5cd2155   (contents, props changed)
Modified:
  head/print/freetype2/Makefile
  head/print/freetype2/pkg-descr

Modified: head/print/freetype2/Makefile
==============================================================================
--- head/print/freetype2/Makefile	Sat Jul 25 15:39:09 2015	(r392889)
+++ head/print/freetype2/Makefile	Sat Jul 25 16:01:14 2015	(r392890)
@@ -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/}/ \

Added: head/print/freetype2/files/patch-5cd2155
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/freetype2/files/patch-5cd2155	Sat Jul 25 16:01:14 2015	(r392890)
@@ -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 )

Modified: head/print/freetype2/pkg-descr
==============================================================================
--- head/print/freetype2/pkg-descr	Sat Jul 25 15:39:09 2015	(r392889)
+++ head/print/freetype2/pkg-descr	Sat Jul 25 16:01:14 2015	(r392890)
@@ -7,4 +7,4 @@ ttf2bdf: Produce bitmapped fonts from Tr
          applications.
 ttfbanner: make posters using a TrueType font
 
-WWW: http://freetype.sourceforge.net/
+WWW: http://www.freetype.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507251601.t6PG1FEM008104>