]> git.wh0rd.org - fontconfig.git/commitdiff
Fix problem dating back at least to 2.3.2 where globs weren't being applied
authorPatrick Lam <plam@MIT.EDU>
Tue, 29 Nov 2005 00:14:42 +0000 (00:14 +0000)
committerPatrick Lam <plam@MIT.EDU>
Tue, 29 Nov 2005 00:14:42 +0000 (00:14 +0000)
    to patterns loaded from a cache.
Fix some obvious spelling mistakes.

ChangeLog
doc/fontconfig-user.sgml
src/fccfg.c
src/fcint.h
src/fcpat.c

index 7c402be46b0e5932c0a3b7d989df24170d9283d8..812bff303749bfcbf7792f52207cecf3a77222ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-11-28  Patrick Lam  <plam@mit.edu>
+       * src/fcint.h:
+       * src/fcpat.c (FcPatternFindFullFname):
+       * src/fccfg.c (FcConfigBuildFonts):
+
+       Fix problem dating back at least to 2.3.2 where globs weren't
+       being applied to patterns loaded from a cache.
+
+2005-11-28  Patrick Lam  <plam@mit.edu>
+       * doc/fontconfig-user.sgml:
+
+       Fix some obvious spelling mistakes.
+       
 2005-11-28  Dirk Mueller  <dmueller@suse.com>
            Stephan Kulow  <coolo@suse.de>
        reviewed by: plam
index 5e240ddd14ee841bd6c6b628506b21e5904efcb9..79988a3c2575195effe811989916d4aa61917727 100644 (file)
@@ -57,7 +57,7 @@ which accepts font patterns and returns the nearest matching font.
   <refsect2><title>Font Configuration</title>
     <para>
 The configuration module consists of the FcConfig datatype, libexpat and
-FcConfigParse which walks over an XML tree and ammends a configuration with
+FcConfigParse which walks over an XML tree and amends a configuration with
 data found within.  From an external perspective, configuration of the
 library consists of generating a valid XML tree and feeding that to
 FcConfigParse.  The only other mechanism provided to applications for
@@ -87,17 +87,17 @@ simplify and regularize font installation and customization.
 While font patterns may contain essentially any properties, there are some
 well known properties with associated types.  Fontconfig uses some of these
 properties for font matching and font completion.  Others are provided as a
-convenience for the applications rendering mechanism.
+convenience for the applications' rendering mechanism.
     </para>
     <programlisting>
   Property        Type    Description
   --------------------------------------------------------------
   family          String  Font family names
-  familylang      String  Languages cooresponding to each family
+  familylang      String  Languages corresponding to each family
   style           String  Font style. Overrides weight and slant
-  stylelang       String  Languages cooresponding to each style
+  stylelang       String  Languages corresponding to each style
   fullname        String  Font full names (often includes style)
-  fullnamelang    String  Languages cooresponding to each fullname
+  fullnamelang    String  Languages corresponding to each fullname
   slant           Int     Italic, oblique or roman
   weight          Int     Light, medium, demibold, bold or black
   size            Double  Point size
@@ -285,7 +285,7 @@ default "no", a missing file or directory will elicit no warning message from
 the library.
   </para></refsect2>
   <refsect2><title><sgmltag>config</></title><para>
-This element provides a place to consolodate additional configuration
+This element provides a place to consolidate additional configuration
 information.  <sgmltag>config</> can contain <sgmltag>blank</> and <sgmltag>rescan</> elements in any
 order.
   </para></refsect2>
@@ -324,7 +324,8 @@ Glob elements hold shell-style filename matching patterns (including ? and
 *) which match fonts based on their complete pathnames.  This can be used to
 exclude a set of directories (/usr/share/fonts/uglyfont*), or particular
 font file types (*.pcf.gz), but the latter mechanism relies rather heavily
-on filenaming conventions which can't be relied upon.
+on filenaming conventions which can't be relied upon.  Note that globs
+only apply to directories, not to individual fonts.
   </para></refsect2>
   <refsect2><title><sgmltag>pattern</></title><para>
 Pattern elements perform list-style matching on incoming fonts; that is,
@@ -470,7 +471,7 @@ operations needed to substitute one font family for another.  They contain a
 <sgmltag>family</> element followed by optional <sgmltag>prefer</>, <sgmltag>accept</> and <sgmltag>default</>
 elements.  Fonts matching the <sgmltag>family</> element are edited to prepend the
 list of <sgmltag>prefer</>ed families before the matching <sgmltag>family</>, append the
-<sgmltag>accept</>able familys after the matching <sgmltag>family</> and append the <sgmltag>default</>
+<sgmltag>accept</>able families after the matching <sgmltag>family</> and append the <sgmltag>default</>
 families to the end of the family list.
   </para></refsect2>
   <refsect2><title><sgmltag>family</></title><para>
index 4543553cef8488d999499a09277196685cf71ae9..3ba1ae915cc2f95ba87e5e099040bf5e6b78cae3 100644 (file)
@@ -308,7 +308,8 @@ FcConfigBuildFonts (FcConfig *config)
 
        for (i = 0; i < cached_fonts->nfont; i++)
        {
-           if (FcConfigAcceptFont (config, cached_fonts->fonts[i]))
+           if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
+                FcConfigAcceptFilename (config, (FcChar8 *)FcPatternFindFullFname(cached_fonts->fonts[i])))
                FcFontSetAdd (fonts, cached_fonts->fonts[i]);
 
            cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */
index 561c5cb5bd6382857f2fd68894125bfcc658e7ab..9b833f764a4c57f7d07ee7e453f6e81d2d129a2e 100644 (file)
@@ -848,6 +848,9 @@ FcPatternAppend (FcPattern *p, FcPattern *s);
 void
 FcPatternAddFullFname (const FcPattern *p, const char *fname);
 
+const char *
+FcPatternFindFullFname (const FcPattern *p);
+
 void
 FcPatternTransferFullFname (const FcPattern *new, const FcPattern *orig);
 
index cc87ff07b05343fb216a910a5709c44f8f017d92..cba99911d99e7222f2cd61e60f1cfc454981b903 100644 (file)
@@ -34,8 +34,6 @@ static int fcpatternelt_ptr, fcpatternelt_count;
 FcValueList ** _fcValueLists = 0;
 static int fcvaluelist_bank_count = 0, fcvaluelist_ptr, fcvaluelist_count;
 
-static const char *
-FcPatternFindFullFname (const FcPattern *p);
 static FcPatternEltPtr
 FcPatternEltPtrCreateDynamic (FcPatternElt * e);
 
@@ -2016,7 +2014,7 @@ FcPatternAddFullFname (const FcPattern *p, const char *fname)
     pb->next->m.fname = fname;
 }
 
-static const char *
+const char *
 FcPatternFindFullFname (const FcPattern *p)
 {
     struct patternDirBucket    *pb;