commit 224401c717892f5027aeb6f59e99a52caeb49814 Author: Jan Palus <at...@pld-linux.org> Date: Sat Mar 10 13:00:55 2018 +0100
patch to fix constant (non-ranged) weight in font pattern; rel 2 see https://bugs.freedesktop.org/show_bug.cgi?id=105415 fontconfig-constant-weight.patch | 46 ++++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 4 +++- 2 files changed, 49 insertions(+), 1 deletion(-) --- diff --git a/fontconfig.spec b/fontconfig.spec index b842ce5..8e3b181 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -9,7 +9,7 @@ Summary(pl.UTF-8): Narzędzia do konfigurowania fontów Summary(pt_BR.UTF-8): Ferramentas para configuração e customização do acesso a fontes Name: fontconfig Version: 2.13.0 -Release: 1 +Release: 2 Epoch: 1 License: MIT Group: Libraries @@ -17,6 +17,7 @@ Source0: https://www.freedesktop.org/software/fontconfig/release/%{name}-%{versi # Source0-md5: 60d2394a79d3b2e5db2daea55193fa47 Source1: %{name}-lcd-filter.conf Patch0: %{name}-bitstream-cyberbit.patch +Patch1: %{name}-constant-weight.patch URL: http://fontconfig.org/ BuildRequires: autoconf >= 2.61 BuildRequires: automake >= 1:1.11 @@ -129,6 +130,7 @@ Este pacote contém a biblioteca estática do fontconfig %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__gettextize} diff --git a/fontconfig-constant-weight.patch b/fontconfig-constant-weight.patch new file mode 100644 index 0000000..1d558c3 --- /dev/null +++ b/fontconfig-constant-weight.patch @@ -0,0 +1,46 @@ +diff --git a/src/fcname.c b/src/fcname.c +index 79e413e..2172d70 100644 +--- a/src/fcname.c ++++ b/src/fcname.c +@@ -330,13 +330,36 @@ FcNameConvert (FcType type, FcChar8 *string) + case FcTypeRange: + if (sscanf ((char *) string, "[%lg %lg]", &b, &e) != 2) + { +- v.u.d = strtod ((char *) string, &p); +- if (p != NULL && p[0] != 0) ++ char *sc, *ec; ++ size_t len = strlen ((const char *) string); ++ int si, ei; ++ ++ sc = malloc (len); ++ ec = malloc (len); ++ if (sc && ec && sscanf ((char *) string, "[%s %[^]]]", sc, ec) == 2) + { +- v.type = FcTypeVoid; +- break; ++ if (FcNameConstant ((const FcChar8 *) sc, &si) && FcNameConstant ((const FcChar8 *) ec, &ei)) ++ v.u.r = FcRangeCreateDouble (si, ei); ++ else ++ goto bail1; ++ } ++ else ++ { ++ bail1: ++ v.type = FcTypeDouble; ++ if (FcNameConstant (string, &si)) ++ { ++ v.u.d = (double) si; ++ } else { ++ v.u.d = strtod ((char *) string, &p); ++ if (p != NULL && p[0] != 0) ++ v.type = FcTypeVoid; ++ } + } +- v.type = FcTypeDouble; ++ if (sc) ++ free (sc); ++ if (ec) ++ free (ec); + } + else + v.u.r = FcRangeCreateDouble (b, e); ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/fontconfig.git/commitdiff/224401c717892f5027aeb6f59e99a52caeb49814 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit