diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-03-17 00:53:30 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-03-17 00:58:40 -0400 |
commit | 3ec94f9b5917b8f71304c982bd153e5a810f3b12 (patch) | |
tree | c112c1b6926b1e6b5846e41d82ac98124fcc8d2e /src/cairo-ft.h | |
parent | 0e7bcb5e3793771d50f7d391d7b1e538ef220a80 (diff) | |
download | cairo-3ec94f9b5917b8f71304c982bd153e5a810f3b12.tar.gz |
Support compiling without fontconfig
Adds a new, fake, fontconfig font backend. Fontconfig can be disabled
using --disable-fc, in which case the toy text API wont find fonts and
the internal font will always be used.
Also defines the feature macro CAIRO_HAS_FC_FONT. The two fontconfig-specific
functions in cairo-ft.h depend on that macro now.
Diffstat (limited to 'src/cairo-ft.h')
-rw-r--r-- | src/cairo-ft.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/cairo-ft.h b/src/cairo-ft.h index 91e2db895..b7178d35f 100644 --- a/src/cairo-ft.h +++ b/src/cairo-ft.h @@ -43,18 +43,14 @@ /* Fontconfig/Freetype platform-specific font interface */ -#include <fontconfig/fontconfig.h> #include <ft2build.h> #include FT_FREETYPE_H -CAIRO_BEGIN_DECLS - -cairo_public cairo_font_face_t * -cairo_ft_font_face_create_for_pattern (FcPattern *pattern); +#if CAIRO_HAS_FC_FONT +#include <fontconfig/fontconfig.h> +#endif -cairo_public void -cairo_ft_font_options_substitute (const cairo_font_options_t *options, - FcPattern *pattern); +CAIRO_BEGIN_DECLS cairo_public cairo_font_face_t * cairo_ft_font_face_create_for_ft_face (FT_Face face, @@ -66,6 +62,17 @@ cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font); cairo_public void cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font); +#if CAIRO_HAS_FC_FONT + +cairo_public cairo_font_face_t * +cairo_ft_font_face_create_for_pattern (FcPattern *pattern); + +cairo_public void +cairo_ft_font_options_substitute (const cairo_font_options_t *options, + FcPattern *pattern); + +#endif + CAIRO_END_DECLS #else /* CAIRO_HAS_FT_FONT */ |