Create FC_FONTFORMAT from FT_Get_X11_Font_Format function where available.
This provides font file format information (BDF, Type 1, PCF, TrueType) for each font. Closes #109.
This commit is contained in:
parent
dbf68dd5fe
commit
537e3d23fa
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-12-04 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* configure.in:
|
||||
* fontconfig/fontconfig.h:
|
||||
* src/fcfreetype.c: (FcFreeTypeQuery):
|
||||
* src/fcname.c:
|
||||
Create FC_FONTFORMAT from FT_Get_X11_Font_Format function where
|
||||
available. This provides font file format information (BDF, Type 1,
|
||||
PCF, TrueType) for each font. Closes #109.
|
||||
|
||||
2004-12-04 Daniel Glassey <danglassey@ntlworld.com>
|
||||
|
||||
reviewed by: Keith Packard <keithp@keithp.com>
|
||||
|
|
|
@ -134,7 +134,7 @@ fontconfig_save_libs="$LIBS"
|
|||
fontconfig_save_cflags="$CFLAGS"
|
||||
LIBS="$LIBS $FREETYPE_LIBS"
|
||||
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
|
||||
AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names)
|
||||
AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format)
|
||||
AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
|
||||
|
|
|
@ -94,6 +94,7 @@ typedef int FcBool;
|
|||
#define FC_STYLELANG "stylelang" /* String RFC 3066 langs */
|
||||
#define FC_FULLNAMELANG "fullnamelang" /* String RFC 3066 langs */
|
||||
#define FC_CAPABILITY "capability" /* String */
|
||||
#define FC_FONTFORMAT "fontformat" /* String */
|
||||
|
||||
#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
|
||||
#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_INTERNAL_TRUETYPE_TYPES_H
|
||||
#if HAVE_FT_GET_X11_FONT_FORMAT
|
||||
#include FT_XFREE86_H
|
||||
#endif
|
||||
|
||||
#if HAVE_FT_GET_BDF_PROPERTY
|
||||
#include FT_BDF_H
|
||||
|
@ -1614,6 +1617,17 @@ FcFreeTypeQuery (const FcChar8 *file,
|
|||
;
|
||||
#endif
|
||||
}
|
||||
#if HAVE_FT_GET_X11_FONT_FORMAT
|
||||
/*
|
||||
* Use the (not well documented or supported) X-specific function
|
||||
* from FreeType to figure out the font format
|
||||
*/
|
||||
{
|
||||
const char *font_format = FT_Get_X11_Font_Format (face);
|
||||
if (font_format)
|
||||
FcPatternAddString (pat, FC_FONTFORMAT, font_format);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Drop our reference to the charset
|
||||
|
|
|
@ -68,6 +68,7 @@ static const FcObjectType _FcBaseObjectTypes[] = {
|
|||
{ FC_LANG, FcTypeLangSet },
|
||||
{ FC_FONTVERSION, FcTypeInteger },
|
||||
{ FC_CAPABILITY, FcTypeString },
|
||||
{ FC_FONTFORMAT, FcTypeString },
|
||||
};
|
||||
|
||||
#define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])
|
||||
|
|
Loading…
Reference in New Issue