From d8a92ac06a2a56f0fb7786e4151fcc032c9bfdf95fbb42105d2565702c9af6b5 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 4 Mar 2015 10:36:46 +0000 Subject: [PATCH] Accepting request 288828 from home:pgajdos - fix segfault for Hershey fonts [bnc#918466] - treat /FontName as family name when /FamilyName is missing + u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch OBS-URL: https://build.opensuse.org/request/show/288828 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/mkfontscale?expand=0&rev=9 --- mkfontscale.changes | 7 ++++ mkfontscale.spec | 2 + ...Type1-fonts-without-FamilyName-and-o.patch | 37 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch diff --git a/mkfontscale.changes b/mkfontscale.changes index 896b50f..c60e96e 100644 --- a/mkfontscale.changes +++ b/mkfontscale.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 3 11:20:54 UTC 2015 - pgajdos@suse.com + +- fix segfault for Hershey fonts [bnc#918466] +- treat /FontName as family name when /FamilyName is missing + + u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch + ------------------------------------------------------------------- Mon Feb 2 23:53:41 UTC 2015 - zaitor@opensuse.org diff --git a/mkfontscale.spec b/mkfontscale.spec index 216dc45..0714467 100644 --- a/mkfontscale.spec +++ b/mkfontscale.spec @@ -24,6 +24,7 @@ License: MIT Group: System/X11/Utilities Url: http://xorg.freedesktop.org/ Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2 +Patch0: u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch BuildRequires: pkg-config BuildRequires: zlib-devel BuildRequires: pkgconfig(fontenc) @@ -40,6 +41,7 @@ legacy X11 font system. %prep %setup -q +%patch0 -p1 %build %configure diff --git a/u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch b/u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch new file mode 100644 index 0000000..3448bdf --- /dev/null +++ b/u_mkfontscale-fix-handling-of-Type1-fonts-without-FamilyName-and-o.patch @@ -0,0 +1,37 @@ +From 0c66831aa4326a5314d381a5c922e4e5a62b82f8 Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Wed, 4 Mar 2015 09:01:32 +0100 +Subject: [PATCH 1/1] fix handling of Type1 fonts without /FamilyName and/or + /FullName +Patch-Mainline: To be upstreamed +References: bnc#918466 + +--- + mkfontscale.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/mkfontscale.c b/mkfontscale.c +index da93e0c..e9b9488 100644 +--- a/mkfontscale.c ++++ b/mkfontscale.c +@@ -579,11 +579,14 @@ makeXLFD(char *filename, FT_Face face, int isBitmap) + } + + if(t1info) { +- if(!family) ++ if(!family && t1info->family_name) + family = strdup(t1info->family_name); +- if(!family) ++ if(!family && t1info->full_name) + family = strdup(t1info->full_name); +- if(!full_name) ++ /* Hershey fonts miss /FamilyName */ ++ if(!family && face->family_name) ++ family = strdup(face->family_name); ++ if(!full_name && t1info->full_name) + full_name = strdup(t1info->full_name); + if(!foundry) + foundry = notice_foundry(t1info->notice); +-- +2.3.0 +