This commit is contained in:
parent
42fae3b969
commit
ef79e3879a
@ -6,9 +6,9 @@ Fri Apr 28 18:46:08 CEST 2006 - mfabian@suse.de
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=10413
|
||||
================================================================================
|
||||
--- cairo-1.4.0/src/cairo-ft-font.c
|
||||
+++ cairo-1.4.0/src/cairo-ft-font.c
|
||||
@@ -2232,20 +2232,16 @@
|
||||
--- cairo-1.4.10/src/cairo-ft-font.c
|
||||
+++ cairo-1.4.10/src/cairo-ft-font.c
|
||||
@@ -2321,20 +2321,16 @@
|
||||
|
||||
if (options->antialias != CAIRO_ANTIALIAS_DEFAULT)
|
||||
{
|
||||
@ -30,7 +30,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=10413
|
||||
int rgba;
|
||||
|
||||
if (options->antialias == CAIRO_ANTIALIAS_SUBPIXEL) {
|
||||
@@ -2269,19 +2265,17 @@
|
||||
@@ -2358,19 +2354,17 @@
|
||||
rgba = FC_RGBA_NONE;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ https://bugs.freedesktop.org/show_bug.cgi?id=10413
|
||||
{
|
||||
int hint_style;
|
||||
|
||||
@@ -2302,6 +2296,7 @@
|
||||
@@ -2391,6 +2385,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,15 @@
|
||||
--- ../cairo/src/cairo-xlib-surface.c 2006-01-19 14:55:25.000000000 -0500
|
||||
+++ ./src/cairo-xlib-surface.c 2006-01-19 14:55:25.000000000 -0500
|
||||
@@ -675,7 +675,7 @@
|
||||
This fixed a problem with libpixman getting the depth wrong for some
|
||||
16bpp image formats but still render things correctly. Using
|
||||
surface->depth instead of image->depth for the ximage was a quick way to
|
||||
avoid this problem.
|
||||
|
||||
It's not the appropriate fix and should probably not go upstream.
|
||||
libpixmap should be fixed if it hasn't already.
|
||||
|
||||
================================================================================
|
||||
--- src/cairo-xlib-surface.c
|
||||
+++ src/cairo-xlib-surface.c
|
||||
@@ -796,7 +796,7 @@
|
||||
ximage.bitmap_unit = 32; /* always for libpixman */
|
||||
ximage.bitmap_bit_order = native_byte_order;
|
||||
ximage.bitmap_pad = 32; /* always for libpixman */
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5741a3df492de8a24b04927c8ffe38728216ccaa76fea1ea47442f99400390b4
|
||||
size 2532573
|
@ -1,7 +1,6 @@
|
||||
diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
--- cairo-1.2.4-old/src/cairo-ft-font.c 2006-10-24 11:05:15.000000000 +0200
|
||||
+++ cairo-1.2.4/src/cairo-ft-font.c 2006-10-24 11:06:45.000000000 +0200
|
||||
@@ -53,6 +53,8 @@
|
||||
--- cairo-1.4.10/src/cairo-ft-font.c
|
||||
+++ cairo-1.4.10/src/cairo-ft-font.c
|
||||
@@ -55,6 +55,8 @@
|
||||
#include FT_SYNTHESIS_H
|
||||
#endif
|
||||
|
||||
@ -10,8 +9,8 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
#define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 64.0))
|
||||
#define DOUBLE_FROM_26_6(t) ((double)(t) / 64.0)
|
||||
#define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
|
||||
@@ -683,23 +685,300 @@
|
||||
assert (error == 0);
|
||||
@@ -701,23 +703,300 @@
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
-/* Empirically-derived subpixel filtering values thanks to Keith
|
||||
@ -327,7 +326,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
|
||||
/* Fills in val->image with an image surface created from @bitmap
|
||||
*/
|
||||
@@ -712,12 +991,14 @@
|
||||
@@ -730,12 +1009,14 @@
|
||||
int width, height, stride;
|
||||
unsigned char *data;
|
||||
int format = CAIRO_FORMAT_A8;
|
||||
@ -344,7 +343,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
case FT_PIXEL_MODE_MONO:
|
||||
stride = (((width + 31) & ~31) >> 3);
|
||||
if (own_buffer) {
|
||||
@@ -745,7 +1026,6 @@
|
||||
@@ -765,7 +1046,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,7 +351,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
{
|
||||
unsigned char *d = data;
|
||||
@@ -757,17 +1037,15 @@
|
||||
@@ -777,17 +1057,15 @@
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -373,7 +372,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
stride = bitmap->pitch;
|
||||
if (own_buffer) {
|
||||
data = bitmap->buffer;
|
||||
@@ -778,101 +1056,19 @@
|
||||
@@ -800,107 +1078,19 @@
|
||||
memcpy (data, bitmap->buffer, stride * height);
|
||||
}
|
||||
format = CAIRO_FORMAT_A8;
|
||||
@ -390,13 +389,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
- unsigned int width_rgba, stride_rgba;
|
||||
- int vmul = 1;
|
||||
- int hmul = 1;
|
||||
+ } else {
|
||||
+ // if we get there, the data from the source bitmap
|
||||
+ // really comes from _fill_xrender_bitmap, and is
|
||||
+ // made of 32-bit ARGB or ABGR values
|
||||
+ assert(own_buffer != 0);
|
||||
+ assert(bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
|
||||
|
||||
-
|
||||
- switch (font_options->subpixel_order) {
|
||||
- case CAIRO_SUBPIXEL_ORDER_DEFAULT:
|
||||
- case CAIRO_SUBPIXEL_ORDER_RGB:
|
||||
@ -410,15 +403,30 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
- vmul = 3;
|
||||
- height /= 3;
|
||||
- break;
|
||||
- }
|
||||
+ } else {
|
||||
+ // if we get there, the data from the source bitmap
|
||||
+ // really comes from _fill_xrender_bitmap, and is
|
||||
+ // made of 32-bit ARGB or ABGR values
|
||||
+ assert(own_buffer != 0);
|
||||
+ assert(bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
|
||||
+
|
||||
+ data = bitmap->buffer;
|
||||
+ stride = bitmap->pitch;
|
||||
+ format = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
- /*
|
||||
- * Filter the glyph to soften the color fringes
|
||||
- */
|
||||
- width_rgba = width;
|
||||
+ data = bitmap->buffer;
|
||||
stride = bitmap->pitch;
|
||||
- stride = bitmap->pitch;
|
||||
- stride_rgba = (width_rgba * 4 + 3) & ~3;
|
||||
- data_rgba = calloc (1, stride_rgba * height);
|
||||
- if (data_rgba == NULL) {
|
||||
- if (own_buffer)
|
||||
- free (bitmap->buffer);
|
||||
- _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
- return CAIRO_STATUS_NO_MEMORY;
|
||||
- }
|
||||
-
|
||||
- os = 1;
|
||||
- switch (font_options->subpixel_order) {
|
||||
@ -473,17 +481,17 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
- free (bitmap->buffer);
|
||||
- data = data_rgba;
|
||||
- stride = stride_rgba;
|
||||
format = CAIRO_FORMAT_ARGB32;
|
||||
- format = CAIRO_FORMAT_ARGB32;
|
||||
- subpixel = TRUE;
|
||||
- break;
|
||||
break;
|
||||
- }
|
||||
}
|
||||
break;
|
||||
- }
|
||||
- break;
|
||||
+
|
||||
case FT_PIXEL_MODE_GRAY2:
|
||||
case FT_PIXEL_MODE_GRAY4:
|
||||
/* These could be triggered by very rare types of TrueType fonts */
|
||||
@@ -880,20 +1076,21 @@
|
||||
@@ -911,20 +1101,21 @@
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
@ -511,7 +519,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -917,16 +1114,44 @@
|
||||
@@ -948,16 +1139,44 @@
|
||||
cairo_font_options_t *font_options,
|
||||
cairo_image_surface_t **surface)
|
||||
{
|
||||
@ -560,7 +568,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
|
||||
FT_Outline_Get_CBox (outline, &cbox);
|
||||
|
||||
@@ -937,98 +1162,90 @@
|
||||
@@ -968,100 +1187,88 @@
|
||||
|
||||
width = (unsigned int) ((cbox.xMax - cbox.xMin) >> 6);
|
||||
height = (unsigned int) ((cbox.yMax - cbox.yMin) >> 6);
|
||||
@ -572,15 +580,14 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
/* Looks like fb handles zero-sized images just fine */
|
||||
- switch (font_options->antialias) {
|
||||
- case CAIRO_ANTIALIAS_NONE:
|
||||
+ switch (render_mode)
|
||||
+ {
|
||||
+ case FT_RENDER_MODE_MONO:
|
||||
+ switch (render_mode) {
|
||||
+ case FT_RENDER_MODE_MONO:
|
||||
format = CAIRO_FORMAT_A1;
|
||||
break;
|
||||
- case CAIRO_ANTIALIAS_SUBPIXEL:
|
||||
- format= CAIRO_FORMAT_ARGB32;
|
||||
+ case FT_RENDER_MODE_LCD:
|
||||
+ case FT_RENDER_MODE_LCD_V:
|
||||
+ case FT_RENDER_MODE_LCD:
|
||||
+ case FT_RENDER_MODE_LCD_V:
|
||||
+ format = CAIRO_FORMAT_ARGB32;
|
||||
break;
|
||||
- case CAIRO_ANTIALIAS_DEFAULT:
|
||||
@ -599,16 +606,16 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
|
||||
- matrix.xx = matrix.yy = 0x10000L;
|
||||
- matrix.xy = matrix.yx = 0;
|
||||
+ int bitmap_size;
|
||||
+ int bitmap_size;
|
||||
|
||||
- switch (font_options->antialias) {
|
||||
- case CAIRO_ANTIALIAS_NONE:
|
||||
- bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
|
||||
- bitmap.num_grays = 1;
|
||||
- stride = ((width + 31) & -32) >> 3;
|
||||
+ switch (render_mode)
|
||||
+ {
|
||||
+ case FT_RENDER_MODE_LCD:
|
||||
+ switch (render_mode)
|
||||
+ {
|
||||
+ case FT_RENDER_MODE_LCD:
|
||||
+ if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR ) {
|
||||
+ rgba = FC_RGBA_BGR;
|
||||
+ } else {
|
||||
@ -662,6 +669,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
+ fterror = FT_Render_Glyph( face->glyph, render_mode );
|
||||
|
||||
- if (bitmap.buffer == NULL) {
|
||||
- _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
+ FT_Library_SetLcdFilter( library, FT_LCD_FILTER_NONE );
|
||||
+
|
||||
+ if (fterror != 0)
|
||||
@ -677,6 +685,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
|
||||
- if (FT_Outline_Get_Bitmap (glyphslot->library, outline, &bitmap) != 0) {
|
||||
- free (bitmap.buffer);
|
||||
- _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
+ bitmap.buffer = calloc(1, bitmap_size);
|
||||
+ if (bitmap.buffer == NULL) {
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
@ -690,7 +699,7 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
if (status)
|
||||
return status;
|
||||
- }
|
||||
|
||||
-
|
||||
/*
|
||||
* Note: the font's coordinate system is upside down from ours, so the
|
||||
* Y coordinate of the control box needs to be negated.
|
||||
@ -698,13 +707,13 @@ diff -urbN cairo-1.2.4-old/src/cairo-ft-font.c cairo-1.2.4/src/cairo-ft-font.c
|
||||
cairo_surface_set_device_offset (&(*surface)->base,
|
||||
- floor ((double) cbox.xMin / 64.0),
|
||||
- floor (-(double) cbox.yMax / 64.0));
|
||||
+ (double) glyphslot->bitmap_left,
|
||||
+ (double)-glyphslot->bitmap_top);
|
||||
+ (double) glyphslot->bitmap_left,
|
||||
+ (double)-glyphslot->bitmap_top);
|
||||
+ }
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1389,11 +1606,11 @@
|
||||
@@ -1433,11 +1640,11 @@
|
||||
case CAIRO_SUBPIXEL_ORDER_DEFAULT:
|
||||
case CAIRO_SUBPIXEL_ORDER_RGB:
|
||||
case CAIRO_SUBPIXEL_ORDER_BGR:
|
3
cairo-1.4.10.tar.bz2
Normal file
3
cairo-1.4.10.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3a958eaba7858a0c8392cf20885643639dee35e0b6b4eca44172e24d2c59ec4
|
||||
size 2631064
|
@ -1,15 +0,0 @@
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=10267
|
||||
Fixes following warning:
|
||||
cairo-truetype-subset.c:698: warning: call to __builtin___snprintf_chk will always overflow destination buffer
|
||||
================================================================================
|
||||
--- src/cairo-truetype-subset.c
|
||||
+++ src/cairo-truetype-subset.c
|
||||
@@ -676,7 +676,7 @@
|
||||
cairo_truetype_font_write_post_table (cairo_truetype_font_t *font,
|
||||
unsigned long tag)
|
||||
{
|
||||
- char buf[10];
|
||||
+ char buf[11];
|
||||
int n;
|
||||
unsigned i;
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 4 15:00:38 CEST 2007 - sbrabec@suse.cz
|
||||
|
||||
- Updated to version 1.4.10:
|
||||
* Eliminate X errors that were killing OO.o
|
||||
* Use IncludeInferiors when using xlib surface as a source
|
||||
* Optimize drawing of many rectangles
|
||||
* Thread-safe surface-cache for solid patterns
|
||||
* Surface cache for solid patterns
|
||||
* Internal cleanup of error handling
|
||||
* Repaired mutex initialization
|
||||
* PDF Improvements
|
||||
* Performance optimizations
|
||||
* More malloc reduction
|
||||
* Fix a crash due to a LOCK vs. UNLOCK typo
|
||||
* Backend-specific fixes
|
||||
* Miscellaneous fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 18 14:05:05 CDT 2007 - maw@suse.de
|
||||
|
||||
|
35
cairo.spec
35
cairo.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package cairo (Version 1.4.0)
|
||||
# spec file for package cairo (Version 1.4.10)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -11,12 +11,12 @@
|
||||
# norootforbuild
|
||||
|
||||
Name: cairo
|
||||
%define DIRECTFB_SUPPORT 0
|
||||
# Use rpmbuild -D 'DIRECTFB_SUPPORT 1' to build wíth DirectFB support.
|
||||
BuildRequires: freetype2-devel glitz-devel libpng-devel pkg-config xorg-x11-devel
|
||||
%if %suse_version > 1020
|
||||
BuildRequires: xorg-x11-libxcb-devel
|
||||
%endif
|
||||
%if %DIRECTFB_SUPPORT
|
||||
%if 0%{?DIRECTFB_SUPPORT}
|
||||
BuildRequires: DirectFB-devel
|
||||
%endif
|
||||
# These libraries are needed only for tests.
|
||||
@ -24,12 +24,12 @@ BuildRequires: DirectFB-devel
|
||||
#BuildRequires: librsvg-devel poppler-devel
|
||||
# Needed only for directory ownership:
|
||||
BuildRequires: gtk-doc
|
||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
License: LGPL v2 or later, MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
Group: Development/Libraries/X11
|
||||
Summary: Vector Graphics Library with Cross-Device Output Support
|
||||
URL: http://cairographics.org/
|
||||
Version: 1.4.0
|
||||
Release: 28
|
||||
Version: 1.4.10
|
||||
Release: 1
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
# This fixes a problem with libpixman getting the depth wrong for some
|
||||
# 16bpp image formats but still render things correctly. Using
|
||||
@ -39,8 +39,7 @@ Source: %{name}-%{version}.tar.bz2
|
||||
# libpixmap should be fixed if it hasn't already.
|
||||
Patch4: cairo-1.0.2-depth-fix-1.patch
|
||||
Patch6: bugzilla-104365.patch
|
||||
Patch7: cairo-1.2.4-lcd-filter-1.patch
|
||||
Patch8: cairo-snprintf-overflow.patch
|
||||
Patch7: cairo-1.4.10-lcd-filter-1.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# Last present in SuSE Linux 10.0 (and NLD9):
|
||||
Obsoletes: libpixman
|
||||
@ -63,7 +62,7 @@ Summary: Development environment for cairo
|
||||
Group: Development/Libraries/X11
|
||||
Requires: %{name} = %{version} freetype2-devel fontconfig-devel xorg-x11-devel
|
||||
Requires: libpng-devel glitz-devel
|
||||
%if %DIRECTFB_SUPPORT
|
||||
%if 0%{?DIRECTFB_SUPPORT}
|
||||
Requires: DirectFB-devel
|
||||
%endif
|
||||
%if %(rpm -q --queryformat=%%{version} xorg-x11-devel | sed 's/\..*$//') >= 7
|
||||
@ -104,7 +103,6 @@ Authors:
|
||||
%patch4
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8
|
||||
|
||||
%build
|
||||
autoreconf -f -i
|
||||
@ -115,7 +113,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector"
|
||||
# Only for tests: --enable-pdf --enable-svg
|
||||
%configure\
|
||||
--enable-glitz\
|
||||
%if %DIRECTFB_SUPPORT
|
||||
%if 0%{?DIRECTFB_SUPPORT}
|
||||
--enable-directfb\
|
||||
%endif
|
||||
--enable-ps\
|
||||
@ -155,6 +153,21 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 04 2007 - sbrabec@suse.cz
|
||||
- Updated to version 1.4.10:
|
||||
* Eliminate X errors that were killing OO.o
|
||||
* Use IncludeInferiors when using xlib surface as a source
|
||||
* Optimize drawing of many rectangles
|
||||
* Thread-safe surface-cache for solid patterns
|
||||
* Surface cache for solid patterns
|
||||
* Internal cleanup of error handling
|
||||
* Repaired mutex initialization
|
||||
* PDF Improvements
|
||||
* Performance optimizations
|
||||
* More malloc reduction
|
||||
* Fix a crash due to a LOCK vs. UNLOCK typo
|
||||
* Backend-specific fixes
|
||||
* Miscellaneous fixes
|
||||
* Mon Jun 18 2007 - maw@suse.de
|
||||
- Add %%run_ldconfig to %%post and %%postun sections.
|
||||
* Mon Mar 26 2007 - sbrabec@suse.cz
|
||||
|
Loading…
Reference in New Issue
Block a user