[cairo-commit] 2 commits - src/cairo-ft-font.c src/cairo-xlib-screen.c test/user-font.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Aug 6 15:38:44 PDT 2008


 src/cairo-ft-font.c     |    3 +++
 src/cairo-xlib-screen.c |    3 +++
 test/user-font.c        |    2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 64ba6c74dbc5464da3093867b4f26166da7fbaff
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 6 18:37:03 2008 -0400

    Fix Ubuntu-specific issue with FC_LCD_NONE et al
    
    No idea if Ubuntu will ever learn not to modify public API of
    common libraries without any clue of what kind of problems they
    create by doing that.  They could very well define
    FC_UBUNTU_LCD_FILTER if they wanted to, but no, they defined
    FC_LCD_FILTER as if it's an upstream thing.  It wasn't.

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index bf69775..e143053 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -64,6 +64,9 @@
 /* Fontconfig version older than 2.6 didn't have these options */
 #ifndef FC_LCD_FILTER
 #define FC_LCD_FILTER	"lcdfilter"
+#endif
+/* Stupid Ubuntu defined FC_LCD_FILTER without defining the following */
+#ifndef FC_LCD_NONE
 #define FC_LCD_NONE	0
 #define FC_LCD_DEFAULT	1
 #define FC_LCD_LIGHT	2
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index c3d2fd7..ebce8a2 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -135,6 +135,9 @@ get_integer_default (Display    *dpy,
 /* Fontconfig version older than 2.6 didn't have these options */
 #ifndef FC_LCD_FILTER
 #define FC_LCD_FILTER	"lcdfilter"
+#endif
+/* Stupid Ubuntu defined FC_LCD_FILTER without defining the following */
+#ifndef FC_LCD_NONE
 #define FC_LCD_NONE	0
 #define FC_LCD_DEFAULT	1
 #define FC_LCD_LIGHT	2
commit 1dc0f3a1ad2cfa7f910e4a729943fbddbb90637d
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 6 02:14:59 2008 -0400

    [test/user-font] Document that Poppler is buggy with glyph 0

diff --git a/test/user-font.c b/test/user-font.c
index 764d44f..c414719 100644
--- a/test/user-font.c
+++ b/test/user-font.c
@@ -159,7 +159,7 @@ get_user_font_face (void)
 	 *     13 14 15
 	 */
 	static const test_scaled_font_glyph_t glyphs [] = {
-	    { '\0', 0, { END_GLYPH } },
+	    { '\0', 0, { END_GLYPH } }, /* Poppler has a bug assuming glyph 0 is .notdef */
 	    { ' ',  1, { END_GLYPH } },
 	    { '-',  2, { 7, 8, STROKE, END_GLYPH } },
 	    { '.',  1, { 10, 10, STROKE, END_GLYPH } },


More information about the cairo-commit mailing list