Hello community, here is the log from the commit of package fontconfig checked in at Sat Jun 3 00:55:29 CEST 2006. -------- --- fontconfig/fontconfig.changes 2006-04-28 19:26:45.000000000 +0200 +++ fontconfig/fontconfig.changes 2006-06-02 15:28:15.000000000 +0200 @@ -1,0 +2,8 @@ +Fri Jun 02 15:24:25 CEST 2006 - mfabian@suse.de + +- Bugzilla #179457: fix font handling for wine (from upstream CVS): + wine uses FcPatternGet instead of FcPatternGetString to find the + full path name of a font file. This used to work but has been + broken recently in the fontconfig 2.4 branch. + +------------------------------------------------------------------- New: ---- bugzilla-179457-fix-font-file-names-for-wine.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fontconfig.spec ++++++ --- /var/tmp/diff_new_pack.Zxz6lz/_old 2006-06-03 00:55:18.000000000 +0200 +++ /var/tmp/diff_new_pack.Zxz6lz/_new 2006-06-03 00:55:18.000000000 +0200 @@ -18,7 +18,7 @@ URL: http://fontconfig.org/ Autoreqprov: on Version: 2.3.94 -Release: 15 +Release: 18 Summary: Library for Font Configuration # CVS can be found here: # $ cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/fontconfig login @@ -60,6 +60,7 @@ Patch27: fc-app-dir-fix-new-new.diff Patch28: bugzilla-158573-turn-off-hinting-when-embolden.patch Patch29: fix-build-for-10.0.patch +Patch30: bugzilla-179457-fix-font-file-names-for-wine.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -107,6 +108,7 @@ %patch27 -p1 %patch28 -p0 %patch29 -p1 +%patch30 -p1 %build %define myprefix /usr @@ -196,6 +198,11 @@ %{myprefix}/include/fontconfig/ %changelog -n fontconfig +* Fri Jun 02 2006 - mfabian@suse.de +- Bugzilla #179457: fix font handling for wine (from upstream CVS): + wine uses FcPatternGet instead of FcPatternGetString to find the + full path name of a font file. This used to work but has been + broken recently in the fontconfig 2.4 branch. * Fri Apr 28 2006 - mfabian@suse.de - Bugzilla #104365: match on "pattern" instead on "font" to edit the default hinting settings to make it easier to override ++++++ bugzilla-179457-fix-font-file-names-for-wine.patch ++++++ diff -ru fontconfig-2.3.94.orig/src/fcpat.c fontconfig-2.3.94/src/fcpat.c --- fontconfig-2.3.94.orig/src/fcpat.c 2006-03-10 16:00:36.000000000 +0100 +++ fontconfig-2.3.94/src/fcpat.c 2006-06-02 13:27:57.000000000 +0200 @@ -1098,6 +1112,39 @@ return FcPatternAdd (p, object, v, FcTrue); } +static FcResult +FcPatternGetFile (const FcPattern *p, const char *object, int id, FcChar8 ** s) +{ + const char *fn, *fpath; + FcChar8 *fname; + int size; + + fn = FcPatternFindFullFname(p); + if (fn) + { + *s = (FcChar8 *) fn; + return FcResultMatch; + } + + if (!p->bank) + return FcResultMatch; + + fpath = FcCacheFindBankDir (p->bank); + size = strlen((char *)fpath) + 1 + strlen ((char *)*s) + 1; + fname = malloc (size); + if (!fname) + return FcResultOutOfMemory; + + FcMemAlloc (FC_MEM_STRING, size); + strcpy ((char *)fname, (char *)fpath); + strcat ((char *)fname, "/"); + strcat ((char *)fname, (char *)*s); + + FcPatternAddFullFname (p, (const char *)fname); + *s = (FcChar8 *)fname; + return FcResultMatch; +} + FcResult FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v) { @@ -1112,6 +1159,12 @@ if (!id) { *v = FcValueCanonicalize(&FcValueListPtrU(l)->value); + + /* Pull the FC_FILE trick here too. */ + if (v->type == FcTypeString && + FcObjectToPtr(object) == FcObjectToPtr(FC_FILE)) + return FcPatternGetFile (p, object, id, (FcChar8 **)&(v->u.s)); + return FcResultMatch; } id--; @@ -1175,41 +1228,6 @@ if (v.type != FcTypeString) return FcResultTypeMismatch; - if (FcObjectToPtr(object) == FcObjectToPtr(FC_FILE)) - { - const char *fn, *fpath; - FcChar8 *fname; - int size; - - fn = FcPatternFindFullFname(p); - if (fn) - { - *s = (FcChar8 *) fn; - return FcResultMatch; - } - - if (!p->bank) - { - *s = (FcChar8 *) v.u.s; - return FcResultMatch; - } - - fpath = FcCacheFindBankDir (p->bank); - size = strlen((char*)fpath) + 1 + strlen ((char *)v.u.s) + 1; - fname = malloc (size); - if (!fname) - return FcResultOutOfMemory; - - FcMemAlloc (FC_MEM_STRING, size); - strcpy ((char *)fname, (char *)fpath); - strcat ((char *)fname, "/"); - strcat ((char *)fname, (char *)v.u.s); - - FcPatternAddFullFname (p, (const char *)fname); - *s = (FcChar8 *)fname; - return FcResultMatch; - } - *s = (FcChar8 *) v.u.s; return FcResultMatch; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org
participants (1)
-
root@suse.de