+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
--- /dev/null
+#
+# $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
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;
#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,
{
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;
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;
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