From c592064690f6efacd1773faeb2f70a241b473edb6e371f9a3d5b21691fef0cf0 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Fri, 11 Sep 2015 06:04:59 +0000 Subject: [PATCH] Accepting request 330451 from home:Zaitor Fix cut off fonts that appear in some cases. Patch based on git commit upstream. OBS-URL: https://build.opensuse.org/request/show/330451 OBS-URL: https://build.opensuse.org/package/show/M17N/freetype2?expand=0&rev=107 --- Dont-use-hmtx-table-for-LSB.patch | 25 +++++++++++++++++++++++++ freetype2.changes | 6 ++++++ freetype2.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 Dont-use-hmtx-table-for-LSB.patch diff --git a/Dont-use-hmtx-table-for-LSB.patch b/Dont-use-hmtx-table-for-LSB.patch new file mode 100644 index 0000000..4989a82 --- /dev/null +++ b/Dont-use-hmtx-table-for-LSB.patch @@ -0,0 +1,25 @@ +From b650dfbb0b0700440cc88da31f97cec45b4140de Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sun, 26 Jul 2015 21:08:34 +0200 +Subject: [PATCH] [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 +--- a/src/cff/cffgload.c ++++ b/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 ) +-- +2.4.3 diff --git a/freetype2.changes b/freetype2.changes index 684732e..e1848fb 100644 --- a/freetype2.changes +++ b/freetype2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 11 04:11:52 UTC 2015 - zaitor@opensuse.org + +- Add Dont-use-hmtx-table-for-LSB.patch: Fixes gnu#45520, cut off + fonts in gtk and qt. Taken from upstream git. + ------------------------------------------------------------------- Thu Jun 11 08:54:13 UTC 2015 - idonmez@suse.com diff --git a/freetype2.spec b/freetype2.spec index cc81d2f..95aa5fc 100644 --- a/freetype2.spec +++ b/freetype2.spec @@ -29,6 +29,7 @@ Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{ve Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{doc_version}.tar.bz2 Source3: baselibs.conf Patch1: freetype2-bitmap-foundry.patch +Patch2: Dont-use-hmtx-table-for-LSB.patch Patch200: freetype2-subpixel.patch # PATCH-FIX-OPENSUSE don-t-mark-libpng-as-required-library.patch -- it is private in .pc Patch202: don-t-mark-libpng-as-required-library.patch @@ -84,6 +85,7 @@ It also contains a small tutorial for using that library. %define enable_subpixel_rendering 0 %setup -q -n freetype-%{version} -a 1 %patch1 -p1 +%patch2 -p1 %patch308961 -p 1 %patch202 -p1 %if %{enable_subpixel_rendering}