OBS User unknown 2009-02-06 22:00:15 +00:00 committed by Git OBS Bridge
parent 757026a80f
commit 6dfd824f0c
11 changed files with 48 additions and 364 deletions

View File

@ -1,12 +0,0 @@
diff -ru fontconfig-2.3.91.20051026.orig/src/fcdefault.c fontconfig-2.3.91.20051026/src/fcdefault.c
--- fontconfig-2.3.91.20051026.orig/src/fcdefault.c 2005-10-26 11:26:44.000000000 +0200
+++ fontconfig-2.3.91.20051026/src/fcdefault.c 2005-10-27 15:19:10.000000000 +0200
@@ -33,7 +33,7 @@
{ FC_VERTICAL_LAYOUT, FcFalse }, /* FC_LOAD_VERTICAL_LAYOUT */
{ FC_AUTOHINT, FcFalse }, /* FC_LOAD_FORCE_AUTOHINT */
{ FC_GLOBAL_ADVANCE, FcTrue }, /* !FC_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
- { FC_EMBEDDED_BITMAP, FcTrue }, /* !FC_LOAD_NO_BITMAP */
+ { FC_EMBEDDED_BITMAP, FcFalse }, /* !FC_LOAD_NO_BITMAP */
};
#define NUM_FC_BOOL_DEFAULTS (int) (sizeof FcBoolDefaults / sizeof FcBoolDefaults[0])

View File

@ -1,21 +0,0 @@
diff -ru fontconfig-2.3.94.orig/src/fccache.c fontconfig-2.3.94/src/fccache.c
--- fontconfig-2.3.94.orig/src/fccache.c 2006-03-23 13:21:50.000000000 +0100
+++ fontconfig-2.3.94/src/fccache.c 2006-03-23 18:34:44.000000000 +0100
@@ -206,7 +206,7 @@
current_arch_start = FcCacheSkipToArch(cache->fd,
current_arch_machine_name);
if (current_arch_start < 0)
- goto bail_and_destroy;
+ goto bail1;
lseek (cache->fd, current_arch_start, SEEK_SET);
if (!FcCacheReadString (cache->fd, candidate_arch_machine_name,
@@ -644,6 +644,7 @@
if (strcmp (candidate_arch, arch)==0)
return current_arch_start;
current_arch_start += bs;
+ current_arch_start = FcCacheNextOffset (current_arch_start);
}
return -1;

View File

@ -1,72 +0,0 @@
diff -ru fontconfig-2.3.93.20060210.orig/src/fccfg.c fontconfig-2.3.93.20060210/src/fccfg.c
--- fontconfig-2.3.93.20060210.orig/src/fccfg.c 2006-02-07 16:04:03.000000000 +0100
+++ fontconfig-2.3.93.20060210/src/fccfg.c 2006-02-10 16:37:32.000000000 +0100
@@ -1879,9 +1876,10 @@
return FcTrue;
}
-FcBool
-FcConfigAppFontAddDir (FcConfig *config,
- const FcChar8 *dir)
+static FcBool
+FcConfigAppFontAddDirWithCheck (FcConfig *config,
+ const FcChar8 *dir,
+ FcStrSet *processed_dirs)
{
FcFontSet *set;
FcStrSet *subdirs;
@@ -1915,11 +1913,17 @@
FcStrSetDestroy (subdirs);
return FcFalse;
}
+ FcStrSetAdd (processed_dirs, dir);
if ((sublist = FcStrListCreate (subdirs)))
{
while ((subdir = FcStrListNext (sublist)))
{
- FcConfigAppFontAddDir (config, subdir);
+ FcChar8 *name;
+ name = FcConfigNormalizeFontDir (config, subdir);
+ if (! name)
+ name = subdir;
+ if (! FcStrSetMember (processed_dirs, name))
+ FcConfigAppFontAddDirWithCheck (config, name, processed_dirs);
}
FcStrListDone (sublist);
}
@@ -1927,6 +1931,23 @@
return FcTrue;
}
+FcBool
+FcConfigAppFontAddDir (FcConfig *config,
+ const FcChar8 *dir)
+{
+ FcStrSet *processed_dirs;
+ FcBool res;
+
+ processed_dirs = FcStrSetCreate ();
+ if (! processed_dirs)
+ return FcFalse;
+
+ res = FcConfigAppFontAddDirWithCheck (config, dir, processed_dirs);
+ FcStrSetDestroy (processed_dirs);
+
+ return res;
+}
+
void
FcConfigAppFontClear (FcConfig *config)
{
diff -ru fontconfig-2.3.93.20060210.orig/src/fcdir.c fontconfig-2.3.93.20060210/src/fcdir.c
--- fontconfig-2.3.93.20060210.orig/src/fcdir.c 2006-02-10 13:06:08.000000000 +0100
+++ fontconfig-2.3.93.20060210/src/fcdir.c 2006-02-10 16:35:30.000000000 +0100
@@ -133,6 +133,8 @@
d_can = FcConfigNormalizeFontDir (config, dir);
if (d_can)
dir = d_can;
+ else
+ FcConfigAddFontDir (config, dir);
if (!force)
{

View File

@ -1,50 +0,0 @@
diff -ru fontconfig-2.3.93.20060210.orig/fc-cache/Makefile.am fontconfig-2.3.93.20060210.new/fc-cache/Makefile.am
--- fontconfig-2.3.93.20060210.orig/fc-cache/Makefile.am 2006-02-06 11:36:09.000000000 +0100
+++ fontconfig-2.3.93.20060210.new/fc-cache/Makefile.am 2006-02-10 19:52:36.000000000 +0100
@@ -35,7 +35,7 @@
uninstall-local:
$(RM) -rf "$(DESTDIR)$(pkgcachedir)"
-INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS)
+INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS)
bin_PROGRAMS=fc-cache
fontconfig-2.3.93.20060210.new/fc-cacheだけに発見: Makefile.am.orig
diff -ru fontconfig-2.3.93.20060210.orig/fc-cache/fc-cache.c fontconfig-2.3.93.20060210.new/fc-cache/fc-cache.c
--- fontconfig-2.3.93.20060210.orig/fc-cache/fc-cache.c 2006-02-07 16:04:03.000000000 +0100
+++ fontconfig-2.3.93.20060210.new/fc-cache/fc-cache.c 2006-02-10 19:52:53.000000000 +0100
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -45,6 +46,8 @@
#define HAVE_GETOPT_LONG 0
#endif
+#include "fcint.h"
+
#if HAVE_GETOPT_LONG
#undef _GNU_SOURCE
#define _GNU_SOURCE
@@ -315,9 +318,13 @@
}
while (argv[i])
{
- if (!FcStrSetAdd (dirs, (FcChar8 *) argv[i]))
+ char *rp;
+
+ if (!FcStrSetAdd (dirs, (FcChar8 *) argv[i]) ||
+ (rp = realpath(argv[i], NULL)) == NULL ||
+ !FcConfigAddFontDir (config, rp))
{
- fprintf (stderr, "%s: Can't add directory\n", argv[0]);
+ fprintf (stderr, "%s: Can't add directory %s\n", argv[0], argv[i]);
return 1;
}
i++;
fontconfig-2.3.93.20060210.new/fc-cacheだけに発見: fc-cache.c.orig

View File

@ -1,17 +0,0 @@
Index: fc-match/fc-match.c
===================================================================
RCS file: /cvs/fontconfig/fontconfig/fc-match/fc-match.c,v
retrieving revision 1.2
diff -u -r1.2 fc-match.c
--- fc-match/fc-match.c 15 Aug 2003 19:45:20 -0000 1.2
+++ fc-match/fc-match.c 3 Apr 2004 18:29:50 -0000
@@ -134,8 +134,8 @@
else
pat = FcPatternCreate ();
- FcConfigSubstitute (0, pat, FcMatchPattern);
FcDefaultSubstitute (pat);
+ FcConfigSubstitute (0, pat, FcMatchPattern);
if (sort)
fs = FcFontSort (0, pat, FcTrue, 0, &result);

View File

@ -1,141 +0,0 @@
--- src/fcint.h-dist 2006-02-08 20:57:29.000000000 +0100
+++ src/fcint.h 2006-02-08 20:58:06.000000000 +0100
@@ -414,6 +414,10 @@ struct _FcConfig {
*/
time_t rescanTime; /* last time information was scanned */
int rescanInterval; /* interval between scans */
+ /*
+ * Validate cache files at each open?
+ */
+ FcBool validateCache;
};
extern FcConfig *_fcConfig;
--- src/fccfg.c-dist 2006-02-08 21:07:16.000000000 +0100
+++ src/fccfg.c 2006-02-08 21:07:38.000000000 +0100
@@ -117,6 +117,7 @@ FcConfigCreate (void)
config->rescanTime = time(0);
config->rescanInterval = 30;
+ config->validateCache = 1;
return config;
--- src/fcxml.c-dist 2006-02-08 20:55:00.000000000 +0100
+++ src/fcxml.c 2006-02-08 20:57:18.000000000 +0100
@@ -293,6 +293,7 @@ typedef enum _FcElement {
FcElementBlank,
FcElementRescan,
+ FcElementValidatecache,
FcElementPrefer,
FcElementAccept,
@@ -353,6 +354,7 @@ static struct {
{ "blank", FcElementBlank },
{ "rescan", FcElementRescan },
+ { "validatecache", FcElementValidatecache },
{ "prefer", FcElementPrefer },
{ "accept", FcElementAccept },
@@ -1099,6 +1101,20 @@ FcParseRescan (FcConfigParse *parse)
}
static void
+FcParseValidatecache (FcConfigParse *parse)
+{
+ int n = FcVStackElements (parse);
+ while (n-- > 0)
+ {
+ FcVStack *v = FcVStackFetch (parse, n);
+ if (v->tag != FcVStackBool)
+ FcConfigMessage (parse, FcSevereWarning, "non-boolean validatecache");
+ else
+ parse->config->validateCache = v->u.bool;
+ }
+}
+
+static void
FcParseInt (FcConfigParse *parse)
{
FcChar8 *s, *end;
@@ -2086,6 +2102,9 @@ FcEndElement(void *userData, const XML_C
case FcElementRescan:
FcParseRescan (parse);
break;
+ case FcElementValidatecache:
+ FcParseValidatecache (parse);
+ break;
case FcElementPrefer:
FcParseFamilies (parse, FcVStackPrefer);
--- src/fccache.c-dist 2006-02-08 20:58:21.000000000 +0100
+++ src/fccache.c 2006-02-08 21:38:23.000000000 +0100
@@ -221,9 +221,10 @@ FcGlobalCacheLoad (FcGlobalCache *cac
/* Directory must be older than the global cache file; also
cache must be newer than the config file. */
- if (stat ((char *) name_buf, &dir_stat) < 0 ||
- dir_stat.st_mtime > cache_stat.st_mtime ||
- (config_time.set && cache_stat.st_mtime < config_time.time))
+ if (config->validateCache &&
+ (stat ((char *) name_buf, &dir_stat) < 0 ||
+ dir_stat.st_mtime > cache_stat.st_mtime ||
+ (config_time.set && cache_stat.st_mtime < config_time.time)))
{
FcCache md;
off_t off;
@@ -876,6 +877,27 @@ FcCacheReadDirs (FcConfig * config, FcGl
continue;
}
+ if (! config->validateCache)
+ {
+ /* We trust cache files -- if not found, just ignore that directory
+ */
+ if ((cache && FcGlobalCacheReadDir (set, subdirs, cache, (char *)dir,
+ config)) ||
+ FcDirCacheRead (set, subdirs, dir, config))
+ {
+ sublist = FcStrListCreate (subdirs);
+ FcStrSetDestroy (subdirs);
+ if (!sublist)
+ {
+ fprintf (stderr, "Can't create subdir list in \"%s\"\n", dir);
+ ret++;
+ continue;
+ }
+ ret += FcCacheReadDirs (config, cache, sublist, set, processed_dirs);
+ }
+ continue;
+ }
+
if (access ((char *) dir, X_OK) < 0)
{
switch (errno) {
--- fonts.dtd-dist 2006-02-08 21:12:11.000000000 +0100
+++ fonts.dtd 2006-02-08 21:14:00.000000000 +0100
@@ -40,7 +40,7 @@
<!--
Global library configuration data
-->
-<!ELEMENT config (blank|rescan)*>
+<!ELEMENT config (blank|rescan|validatecache)*>
<!--
Specify the set of Unicode encoding values which
@@ -82,6 +82,13 @@
<!ELEMENT rescan (int)>
<!--
+ Validate cache files dynamically
+ If this is set to false, fontconfig trusts cache files and never
+ checks the timestamp or changes of contents.
+ -->
+<!ELEMENT validatecache (bool)>
+
+<!--
Edit list of available fonts at startup/reload time
-->
<!ELEMENT selectfont (rejectfont | acceptfont)* >

View File

@ -1,15 +0,0 @@
diff -ru fontconfig-2.3.93.20060210.orig/src/fccache.c fontconfig-2.3.93.20060210/src/fccache.c
--- fontconfig-2.3.93.20060210.orig/src/fccache.c 2006-02-10 13:06:08.000000000 +0100
+++ fontconfig-2.3.93.20060210/src/fccache.c 2006-02-10 14:39:40.000000000 +0100
@@ -741,7 +741,11 @@
* the cache file, the cache is not valid
*/
if (dir_stat.st_mtime > file_stat.st_mtime)
+ {
+ fprintf (stderr, "FC: cache for %s is outdated,\n"
+ " consider running \"fc-cache\" as root!\n", dir);
return FcFalse;
+ }
return FcTrue;

View File

@ -1,19 +0,0 @@
--- src/fcfreetype.c
+++ src/fcfreetype.c
@@ -74,6 +74,16 @@
#warning "No FT_Get_Font_Info"
#endif
+#ifndef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef ABS
+#define ABS(a) ((a) >= 0 ? (a) : -(a))
+#endif
+
/*
* Keep Han languages separated by eliminating languages
* that the codePageRange bits says aren't supported

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Thu Feb 05 13:02:59 CET 2009 - mfabian@suse.de
- cleanup old patches:
• remove obsolete fc-app-dir-fix-new-new.diff
• remove obsolete fontconfig-minmaxabs.patch
• remove obsolete fc-cache.patch.
• remove obsolete bugzilla-160226-multiarch-cache-file-problem.patch
• remove fc-match.patch which reversed the order of
FcDefaultSubstitute() and FcConfigSubstitute(), this was only
experimental and always commented out in the fontconfig.spec file.
• remove obsolete
bugzilla-128937-turn-off-embedded-bitmaps-by-default.patch
• remove obsolete fc-verbose.diff.
-------------------------------------------------------------------
Tue Feb 03 16:43:16 CET 2009 - mfabian@suse.de
- bnc#468407: add the Arabic font "KacstBook" to the preference
lists for serif, sans-serif, and monospace. Until now there was
no font at all preferred for Arabic when the dejavu fonts were
not installed and even if they were installed there was still no
preferred Arabic font for serif. This caused a certain
randomness in the fonts used by YaST2.
-------------------------------------------------------------------
Mon Jan 26 17:59:34 CET 2009 - mfabian@suse.de

View File

@ -35,7 +35,7 @@ Obsoletes: fontconfig-64bit
%endif
Requires: bash
Version: 2.6.0
Release: 9
Release: 11
Summary: Library for Font Configuration
# CVS can be found here: (CVS is gone, fontconfig uses git now).
# $ cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/fontconfig login
@ -58,20 +58,12 @@ Source14: suse-bitmaps.conf
Source15: suse-font-dirs.conf
Source20: local.conf.instsys
Source30: 29-liberation-aliases.conf
Patch4: fc-match.patch
# http://www.kde.gr.jp/~akito/patch/
# http://www.kde.gr.jp/~akito/patch/fontconfig/fontconfig-2.2.1/fontconfig-2.2.1-AppleRoman-DynaFont.patch
Patch5: AppleRoman-DynaFont.patch
Patch6: fontconfig-minmaxabs.patch
Patch10: conf.patch
Patch12: bugzilla-128937-turn-off-embedded-bitmaps-by-default.patch
Patch13: bugzilla-160226-multiarch-cache-file-problem.patch
Patch15: fc-cache.patch
Patch16: make-check.patch
Patch17: change-magic.patch
Patch18: fc-validatecache-option.diff
Patch22: fc-verbose.diff
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
@ -128,18 +120,10 @@ Authors:
%if %{build_docs} < 1
tar xvf $RPM_SOURCE_DIR/%name-doc.tar.bz2
%endif
#%patch4 -p0 -b .fc-match
%patch5 -p0 -b .dynafont
%patch6 -p0 -b .minmaxabs
%patch10 -p1 -b .fonts.conf
#%patch12 -p1
#%patch13 -p1
#%patch15 -p1
%patch16 -p1
%patch17 -p1
#%patch18 -p0
#%patch22 -p1
#%patch27 -p1
%patch28 -p1
#%patch29 -p1
#%patch30 -p1
@ -258,6 +242,25 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/fontconfig/
%changelog
* Thu Feb 05 2009 mfabian@suse.de
- cleanup old patches:
remove obsolete fc-app-dir-fix-new-new.diff
remove obsolete fontconfig-minmaxabs.patch
remove obsolete fc-cache.patch.
remove obsolete bugzilla-160226-multiarch-cache-file-problem.patch
remove fc-match.patch which reversed the order of
FcDefaultSubstitute() and FcConfigSubstitute(), this was only
experimental and always commented out in the fontconfig.spec file.
remove obsolete
bugzilla-128937-turn-off-embedded-bitmaps-by-default.patch
remove obsolete fc-verbose.diff.
* Tue Feb 03 2009 mfabian@suse.de
- bnc#468407: add the Arabic font "KacstBook" to the preference
lists for serif, sans-serif, and monospace. Until now there was
no font at all preferred for Arabic when the dejavu fonts were
not installed and even if they were installed there was still no
preferred Arabic font for serif. This caused a certain
randomness in the fonts used by YaST2.
* Mon Jan 26 2009 mfabian@suse.de
- bnc#466068: insert "VL Gothic" in the preference lists between
"IPA Gothic" and "Sazanami Gothic".

View File

@ -19,6 +19,7 @@
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Likhan</family>
<family>KacstBook</family>
<family>Frank Ruehl CLM</family>
<family>Times</family>
<family>Khmer OS System</family>
@ -63,6 +64,7 @@
<family>Nimbus Sans L</family>
<family>Luxi Sans</family>
<family>Mukti Narrow</family>
<family>KacstBook</family>
<family>Nachlieli CLM</family>
<family>Helvetica</family>
<family>Khmer OS System</family>
@ -109,6 +111,7 @@
<family>Nimbus Mono L</family>
<family>Luxi Mono</family>
<family>Mukti Narrow</family>
<family>KacstBook</family>
<family>Miriam Mono CLM</family>
<family>Terafik</family>
<family>Khmer OS System</family>