]> git.wh0rd.org - fontconfig.git/commitdiff
Add Low Saxon orthography (Kenneth Rohde Christiansen <kenneth@gnu.org>)
authorKeith Packard <keithp@keithp.com>
Sat, 7 Feb 2004 07:13:48 +0000 (07:13 +0000)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Feb 2004 07:13:48 +0000 (07:13 +0000)
Oops. Left 'newest.set' unset, which would miscompute the newest file
Add FcGetPixelSize to extract correct pixel size from bdf/pcf font
    properties (which report the wrong value in current FreeType)
Don't attempt to check for empty glyphs in non-scalable fonts; they have no
    outlines...

ChangeLog
fc-lang/nds.orth [new file with mode: 0644]
src/fccfg.c
src/fcfreetype.c

index 332844d1884b353298c2ab095e49a2a84f211451..cb7be0d2aa6441fde2aebd6bf0a4a06c703ca37b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2004-02-06  Keith Packard  <keithp@keithp.com>
+
+       * fc-lang/nds.orth:
+       Add Low Saxon orthography 
+               (Kenneth Rohde Christiansen <kenneth@gnu.org>)
+               
+       * src/fccfg.c: (FcConfigNewestFile):
+       Oops.  Left 'newest.set' unset, which would miscompute
+       the newest file
+       
+       * src/fcfreetype.c: (FcGetPixelSize), (FcFreeTypeQuery),
+       (FcFreeTypeCheckGlyph):
+       Add FcGetPixelSize to extract correct pixel size from bdf/pcf
+       font properties (which report the wrong value in current FreeType)
+
+       Don't attempt to check for empty glyphs in non-scalable fonts; they
+       have no outlines...
+
 2004-02-01  Tor Lillqvist  <tml@iki.fi>
 
        * src/fccfg.c (FcConfigCreate): fontconfig, at least as used by
diff --git a/fc-lang/nds.orth b/fc-lang/nds.orth
new file mode 100644 (file)
index 0000000..91f152e
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# $RCSId: xc/lib/fontconfig/fc-lang/de.orth,v 1.3 2002/07/12 09:12:36 keithp Exp $
+#
+# Copyright © 2004 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission.  Keith Packard makes no
+# representations about the suitability of this software for any purpose.  It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+#
+# Low Saxon (NDS)
+#
+# Sources:
+#      Kenneth Rohde Christiansen <kenneth@gnu.org>
+#      ANS -
+#      Algemeyne Neddersassische Schryvwys' (DE)
+#      Algemeyne Nedersaksische Schryvwyse (NL)
+#
+0041-005a      # LATIN CAPITAL LETTER A through Z
+0061-007a      # LATIN SMALL LETTER A through Z
+00C4           # LATIN CAPITAL LETTER A WITH DIAERESIS
+00D6           # LATIN CAPITAL LETTER O WITH DIAERESIS
+00DC           # LATIN CAPITAL LETTER U WITH DIAERESIS
+00DF           # LATIN SMALL LETTER SHARP S (German)
+00E4           # LATIN SMALL LETTER A WITH DIAERESIS
+00F6           # LATIN SMALL LETTER O WITH DIAERESIS
+00FC           # LATIN SMALL LETTER U WITH DIAERESIS
index 654977da01559cd77354bdc331065ada5b2d049c..b02346739d05959ae60af5899abd104ae9e5a8f3 100644 (file)
@@ -145,7 +145,10 @@ FcConfigNewestFile (FcStrSet *files)
        while ((file = FcStrListNext (list)))
            if (stat ((char *) file, &statb) == 0)
                if (!newest.set || statb.st_mtime - newest.time > 0)
+               {
+                   newest.set = FcTrue;
                    newest.time = statb.st_mtime;
+               }
        FcStrListDone (list);
     }
     return newest;
index 4feb37d3f3ed31a18aed1c6fd553c56ec6a71950..75da7357424dcf105d0f5b8bc29ca1865faff768 100644 (file)
@@ -344,6 +344,23 @@ static const FcStringConst  slantConsts[] = {
 #define FcIsSlant(s)       FcStringIsConst(s,slantConsts,NUM_SLANT_CONSTS)
 #define FcContainsSlant(s)  FcStringContainsConst (s,slantConsts,NUM_SLANT_CONSTS)
 
+static double
+FcGetPixelSize (FT_Face face, int i)
+{
+#ifdef HAVE_FT_GET_BDF_PROPERTY
+    if (face->num_fixed_sizes == 1)
+    {
+       BDF_PropertyRec prop;
+       int             rc;
+
+       rc = MY_Get_BDF_Property (face, "PIXEL_SIZE", &prop);
+       if (rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
+           return (double) prop.u.integer;
+    }
+#endif
+    return (double) face->available_sizes[i].y_ppem / 64.0;
+}
+
 FcPattern *
 FcFreeTypeQuery (const FcChar8 *file,
                 int            id,
@@ -991,7 +1008,7 @@ FcFreeTypeQuery (const FcChar8     *file,
     {
        for (i = 0; i < face->num_fixed_sizes; i++)
            if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE,
-                                    (double) face->available_sizes[i].height))
+                                    FcGetPixelSize (face, i)))
                goto bail1;
        if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
            goto bail1;
@@ -1001,17 +1018,6 @@ FcFreeTypeQuery (const FcChar8   *file,
             int value;
             BDF_PropertyRec prop;
 
-            rc = MY_Get_BDF_Property(face, "PIXEL_SIZE", &prop);
-            if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
-                value = prop.u.integer;
-            else if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_CARDINAL)
-                value = prop.u.cardinal;
-            else
-                goto nevermind;
-            if(value != face->available_sizes[0].height)
-                /* ``impossible'' */
-                goto nevermind;
-
             rc = MY_Get_BDF_Property(face, "POINT_SIZE", &prop);
             if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
                 value = prop.u.integer;
@@ -1760,6 +1766,12 @@ FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
     FT_Int         load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
     FT_GlyphSlot    slot;
     
+    /*
+     * For bitmap-only fonts, assume that they're OK.
+     */
+    if ((face->face_flags & FT_FACE_FLAG_SCALABLE) == 0)
+       return FcTrue;
+
     /*
      * When using scalable fonts, only report those glyphs
      * which can be scaled; otherwise those fonts will