From 610601a9b967bbf023a0c843fa2991ab2aa30ec4 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 20 Sep 2013 13:47:16 +0200 Subject: [PATCH] Fix vertical size of emboldened glyphs --- ...x-vertical-size-of-emboldened-glyphs.patch | 45 +++++++++++++++++++ freetype.spec | 10 ++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-vertical-size-of-emboldened-glyphs.patch diff --git a/0001-Fix-vertical-size-of-emboldened-glyphs.patch b/0001-Fix-vertical-size-of-emboldened-glyphs.patch new file mode 100644 index 0000000..330d1ce --- /dev/null +++ b/0001-Fix-vertical-size-of-emboldened-glyphs.patch @@ -0,0 +1,45 @@ +From 31e726d939e7b79506d11164d259c9789e429761 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod +Date: Fri, 20 Sep 2013 07:20:53 +0200 +Subject: [PATCH] Fix vertical size of emboldened glyphs. + +Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 + +* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' +also. +--- + src/base/ftsynth.c | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c +index 241d37f..3098a60 100644 +--- a/src/base/ftsynth.c ++++ b/src/base/ftsynth.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType synthesizing code for emboldening and slanting (body). */ + /* */ +-/* Copyright 2000-2006, 2010, 2012 by */ ++/* Copyright 2000-2006, 2010, 2012, 2013 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +@@ -139,10 +139,11 @@ + if ( slot->advance.y ) + slot->advance.y += ystr; + +- slot->metrics.width += xstr; +- slot->metrics.height += ystr; +- slot->metrics.horiAdvance += xstr; +- slot->metrics.vertAdvance += ystr; ++ slot->metrics.width += xstr; ++ slot->metrics.height += ystr; ++ slot->metrics.horiAdvance += xstr; ++ slot->metrics.vertAdvance += ystr; ++ slot->metrics.horiBearingY += ystr; + + /* XXX: 16-bit overflow case must be excluded before here */ + if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) +-- +1.8.3.1 + diff --git a/freetype.spec b/freetype.spec index 7d7578f..74cee3c 100644 --- a/freetype.spec +++ b/freetype.spec @@ -7,7 +7,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.5.0 -Release: 3%{?dist} +Release: 4%{?dist} License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement Group: System Environment/Libraries URL: http://www.freetype.org @@ -32,6 +32,9 @@ Patch90: freetype-2.4.12-pkgconfig.patch # Backport of all (2) commits from 2.5.0.1 Patch91: freetype-2.5.0.1.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=686709 +Patch92: 0001-Fix-vertical-size-of-emboldened-glyphs.patch + Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) BuildRequires: libX11-devel @@ -97,6 +100,8 @@ popd %patch91 -p1 -b .2.5.0.1 +%patch92 -p1 -b .emboldened-glyphs + %build %configure --disable-static @@ -217,6 +222,9 @@ rm -rf $RPM_BUILD_ROOT %doc docs/tutorial %changelog +* Fri Sep 20 2013 Marek Kasik - 2.5.0-4 +- Fix vertical size of emboldened glyphs + * Mon Aug 05 2013 Marek Kasik - 2.5.0-3 - Fix changelog dates