summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-02-07 07:13:48 +0000
committerKeith Packard <keithp@keithp.com>2004-02-07 07:13:48 +0000
commitb68b96464f6488dbc62c4dcd62ca7e2eed3141d2 (patch)
treed67eb59568ea410889727f925d9b307081e20a06
parentf4c52909ab5321df608fe7af2da3edcab48818d9 (diff)
Add Low Saxon orthography (Kenneth Rohde Christiansen <kenneth@gnu.org>)
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...
-rw-r--r--ChangeLog18
-rw-r--r--fc-lang/nds.orth40
-rw-r--r--src/fccfg.c3
-rw-r--r--src/fcfreetype.c36
4 files changed, 85 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 332844d..cb7be0d 100644
--- 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
index 0000000..91f152e
--- /dev/null
+++ b/fc-lang/nds.orth
@@ -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
diff --git a/src/fccfg.c b/src/fccfg.c
index 654977d..b023467 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -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;
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 4feb37d..75da735 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -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;
@@ -1761,6 +1767,12 @@ FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
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
* only be available at some sizes, and never when