rpms/cairo/devel cairo-1.0.2-embedded-bitmaps.patch, NONE, 1.1 cairo-1.0.2-fix-build.patch, NONE, 1.1 cairo.spec, 1.29, 1.30

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jan 31 16:17:11 UTC 2006


Author: rstrode

Update of /cvs/dist/rpms/cairo/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8028

Modified Files:
	cairo.spec 
Added Files:
	cairo-1.0.2-embedded-bitmaps.patch cairo-1.0.2-fix-build.patch 
Log Message:
- add patch from Tim Mayberry to support embbedded bitmap
  fonts (bug 176910)


cairo-1.0.2-embedded-bitmaps.patch:
 cairo-ft-font.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

--- NEW FILE cairo-1.0.2-embedded-bitmaps.patch ---
--- cairo-1.0.2/src/cairo-ft-font.c.orig	2005-12-20 10:56:08.000000000 +1000
+++ cairo-1.0.2/src/cairo-ft-font.c	2005-12-20 11:01:03.000000000 +1000
@@ -1328,7 +1328,9 @@
 static int
 _get_pattern_load_flags (FcPattern *pattern)
 {
-    FcBool antialias, vertical_layout, hinting, autohint;
+    FcBool antialias, vertical_layout, hinting, autohint, bitmap;
+    FcBool transform;
+    FcMatrix *font_matrix;
     int rgba;
 #ifdef FC_HINT_STYLE    
     int hintstyle;
@@ -1336,14 +1338,30 @@
     int load_flags = 0;
     int target_flags = 0;
 
+#ifndef FC_EMBEDDED_BITMAP
+#define FC_EMBEDDED_BITMAP "embeddedbitmap"
+#endif
+
+    if (FcPatternGetMatrix (pattern,
+			    FC_MATRIX, 0, &font_matrix) != FcResultMatch)
+	font_matrix = NULL;
+
+    transform = (font_matrix && (font_matrix->xx != 1 || font_matrix->xy != 0 ||
+				 font_matrix->yx != 0 || font_matrix->yy != 1));
+
+    /* Check whether to use embedded bitmap forcely */
+    if (FcPatternGetBool (pattern,
+			  FC_EMBEDDED_BITMAP, 0, &bitmap) != FcResultMatch)
+	bitmap = FcFalse;
+
     /* disable antialiasing if requested */
     if (FcPatternGetBool (pattern,
 			  FC_ANTIALIAS, 0, &antialias) != FcResultMatch)
 	antialias = FcTrue;
 
-    if (antialias)
+    if ((!bitmap && antialias) || transform)
 	load_flags |= FT_LOAD_NO_BITMAP;
-    else
+    else if (!antialias)
 	load_flags |= FT_LOAD_MONOCHROME;
     
     /* disable hinting if requested */


cairo-1.0.2-fix-build.patch:
 pixman-remap.h |    2 --
 1 files changed, 2 deletions(-)

--- NEW FILE cairo-1.0.2-fix-build.patch ---
--- cairo-1.0.2/pixman/src/pixman-remap.h.orig	2006-01-17 10:52:03.000000000 +1000
+++ cairo-1.0.2/pixman/src/pixman-remap.h	2006-01-17 10:52:33.000000000 +1000
@@ -1,9 +1,7 @@
 #define pixman_add_trapezoids _cairo_pixman_add_trapezoids
-#define INT_pixman_color_to_pixel _cairo_pixman_color_to_pixel
 #define pixman_color_to_pixel _cairo_pixman_color_to_pixel
 #define composeFunctions _cairo_pixman_compose_functions
 #define fbComposeSetupMMX _cairo_pixman_compose_setup_mmx
-#define INT_pixman_composite _cairo_pixman_composite
 #define pixman_composite _cairo_pixman_composite
 #define fbCompositeCopyAreammx _cairo_pixman_composite_copy_area_mmx
 #define fbCompositeSolidMask_nx8888x0565Cmmx _cairo_pixman_composite_solid_mask_nx8888x0565Cmmx



Index: cairo.spec
===================================================================
RCS file: /cvs/dist/rpms/cairo/devel/cairo.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- cairo.spec	3 Jan 2006 19:59:18 -0000	1.29
+++ cairo.spec	31 Jan 2006 16:17:08 -0000	1.30
@@ -4,7 +4,7 @@
 Summary:   A vector graphics library
 Name:      cairo
 Version:   1.0.2
-Release:   3.2
+Release:   4
 URL:       http://cairographics.org
 Source0:   %{name}-%{version}.tar.gz
 License:   LGPL/MPL
@@ -18,10 +18,14 @@
 Requires: /sbin/ldconfig
 BuildRequires: pkgconfig
 BuildRequires: libXrender-devel
+BuildRequires: libX11-devel
 BuildRequires: libpng-devel
 BuildRequires: freetype-devel >= %{freetype_version}
 BuildRequires: fontconfig-devel >= %{fontconfig_version}
 
+Patch0: cairo-1.0.2-embedded-bitmaps.patch
+Patch1: cairo-1.0.2-fix-build.patch
+
 %description 
 Cairo is a vector graphics library designed to provide high-quality
 display and print output. Currently supported output targets include
@@ -47,6 +51,8 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .embedded-bitmaps
+%patch1 -p1 -b .fix-build
 
 %build
 %configure --enable-warnings --disable-glitz --disable-quartz \
@@ -81,6 +87,10 @@
 %{_datadir}/gtk-doc/*
 
 %changelog
+* Tue Jan 31 2006 Ray Strode <rstrode at redhat.com> 1.0.2-4
+- add patch from Tim Mayberry to support embbedded bitmap
+  fonts (bug 176910)
+
 * Tue Jan  3 2006 Jesse Keating <jkeating at redhat.com> 1.0.2-3.2
 - rebuilt again
 




More information about the fedora-cvs-commits mailing list