Index: print/freetype2/files/patch-45520 =================================================================== --- print/freetype2/files/patch-45520 (revision 0) +++ print/freetype2/files/patch-45520 (working copy) @@ -0,0 +1,32 @@ +From b650dfbb0b0700440cc88da31f97cec45b4140de Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sun, 26 Jul 2015 19:08:34 +0000 +Subject: [cff] Don't use `hmtx' table for LSB (#45520). + +* src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance +width only. Bug introduced 2015-04-10. + +2015-07-26 Matthias Clasen + + [cff] Don't use `hmtx' table for LSB (#45520). + + * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance + width only. Bug introduced 2015-04-10. + +diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c +index 43054f8..a075ddc 100644 +--- src/cff/cffgload.c ++++ src/cff/cffgload.c +@@ -3064,9 +3064,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 ) +-- +cgit v0.9.0.2 Property changes on: print/freetype2/files/patch-45520 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: print/freetype2/files/patch-5cd2155 =================================================================== --- print/freetype2/files/patch-5cd2155 (revision 392916) +++ print/freetype2/files/patch-5cd2155 (working copy) @@ -1,163 +0,0 @@ -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 -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 )