#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */
#define FC_SOURCE "source" /* String (X11, freetype) */
#define FC_CHARSET "charset" /* CharSet */
-#define FC_LANG "lang" /* String OS/2 CodePageRange */
+#define FC_LANG "lang" /* String RFC 3066 langs */
+#define FC_FONTVERSION "fontversion" /* Int from 'head' table */
#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
/*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/src/fcdefault.c,v 1.2 2002/07/09 22:08:14 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
FcPatternAddString (pattern, FC_LANG, (FcChar8 *) lang);
}
}
+ if (FcPatternGet (pattern, FC_FONTVERSION, 0, &v) == FcResultNoMatch)
+ {
+ FcPatternAddInteger (pattern, FC_FONTVERSION, 0x7fffffff);
+ }
}
/*
- * $XFree86: xc/lib/fontconfig/src/fcfreetype.c,v 1.10 2002/08/22 07:36:44 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcfreetype.c,v 1.11 2002/08/31 22:17:32 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
FcChar8 *family;
FcChar8 *style;
TT_OS2 *os2;
+ TT_Header *head;
const FcChar8 *exclusiveLang = 0;
FT_SfntName sname;
FT_UInt snamei, snamec;
goto bail1;
#endif
+ /*
+ * Find the font revision (if available)
+ */
+ head = (TT_Header *) FT_Get_Sfnt_Table (face, ft_sfnt_head);
+ if (head)
+ {
+ if (!FcPatternAddInteger (pat, FC_FONTVERSION, head->Font_Revision))
+ goto bail1;
+ }
+ else
+ {
+ if (!FcPatternAddInteger (pat, FC_FONTVERSION, 0))
+ goto bail1;
+ }
+
/*
* Get the OS/2 table and poke about
*/
/*
- * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.19 2002/08/22 07:36:44 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.20 2002/08/31 22:17:32 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
{ FC_OUTLINE, FcCompareBool, 12, 12 },
#define MATCH_OUTLINE 11
+
+ { FC_FONTVERSION, FcCompareInteger, 13, 13 },
+#define MATCH_FONTVERSION 12
};
-#define NUM_MATCH_VALUES 13
+#define NUM_MATCH_VALUES 14
static FcBool
FcCompareValueList (const char *object,
case 'f':
switch (FcToLower (object[1])) {
case 'o':
- i = MATCH_FOUNDRY; break;
+ switch (FcToLower (object[2])) {
+ case 'u':
+ i = MATCH_FOUNDRY; break;
+ case 'n':
+ i = MATCH_FONTVERSION; break;
+ }
+ break;
case 'a':
i = MATCH_FAMILY; break;
}
/*
- * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.13 2002/08/22 07:36:45 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.14 2002/08/31 22:17:32 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
{ FC_MATRIX, FcTypeMatrix },
{ FC_CHARSET, FcTypeCharSet },
{ FC_LANG, FcTypeLangSet },
+ { FC_FONTVERSION, FcTypeInteger },
};
#define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])