[cairo-commit] cairo/src cairo_ft_font.c,1.33,1.34
Owen Taylor
commit at pdx.freedesktop.org
Fri Jan 21 15:31:19 PST 2005
Committed by: otaylor
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv8016/src
Modified Files:
cairo_ft_font.c
Log Message:
2005-01-21 Owen Taylor <otaylor at redhat.com>
* src/cairo_ft_font.c (_get_load_flags): Make dependence
on FC_HINT_STYLE conditional. (reported by Abraham Egnor)
* src/cairo_ft_font.c: Use FT_LOAD_MONOCHROME if
FT_LOAD_TARGET_MONO isn't defined for compatibility
with older FreeType.
Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- cairo_ft_font.c 21 Jan 2005 22:33:48 -0000 1.33
+++ cairo_ft_font.c 21 Jan 2005 23:31:16 -0000 1.34
@@ -479,6 +479,11 @@
ft_unscaled_font_t *unscaled;
} cairo_ft_font_t;
+/* for compatibility with older freetype versions */
+#ifndef FT_LOAD_TARGET_MONO
+#define FT_LOAD_TARGET_MONO FT_LOAD_MONOCHROME
+#endif
+
/* The load flags passed to FT_Load_Glyph control aspects like hinting and
* antialiasing. Here we compute them from the fields of a FcPattern.
*/
@@ -486,7 +491,9 @@
_get_load_flags (FcPattern *pattern)
{
FcBool antialias, hinting, autohint;
+#ifdef FC_HINT_STYLE
int hintstyle;
+#endif
int load_flags = 0;
/* disable antialiasing if requested */
@@ -504,11 +511,16 @@
FC_HINTING, 0, &hinting) != FcResultMatch)
hinting = FcTrue;
+#ifdef FC_HINT_STYLE
if (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
hintstyle = FC_HINT_FULL;
if (!hinting || hintstyle == FC_HINT_NONE)
load_flags |= FT_LOAD_NO_HINTING;
+#else /* !FC_HINT_STYLE */
+ if (!hinting)
+ load_flags |= FT_LOAD_NO_HINTING;
+#endif /* FC_FHINT_STYLE */
switch (hintstyle) {
case FC_HINT_SLIGHT:
More information about the cairo-commit
mailing list