[poppler] poppler/poppler: CairoFontEngine.cc, 1.5, 1.6 CairoFontEngine.h, 1.2, 1.3 CairoOutputDev.cc, 1.6, 1.7

Kristian Høgsberg krh at redhat.com
Fri Apr 22 10:30:14 PDT 2005


Thanks, committed.

Martin Kretzschmar wrote:
> Hi,
> 
> Am Donnerstag, den 21.04.2005, 21:09 -0700 schrieb Kristian Hogsberg:
> 
>>Index: CairoFontEngine.cc
>>===================================================================
>>RCS file: /cvs/poppler/poppler/poppler/CairoFontEngine.cc,v
>>retrieving revision 1.5
>>retrieving revision 1.6
>>diff -u -d -r1.5 -r1.6
>>--- CairoFontEngine.cc	21 Apr 2005 06:35:33 -0000	1.5
>>+++ CairoFontEngine.cc	22 Apr 2005 04:09:23 -0000	1.6
> 
> 
>>@@ -232,6 +239,19 @@
>>     unlink (fileName->getCString());
>>   }
>> 
>>+  this->m11 = m11;
>>+  this->m12 = m12;
>>+  this->m21 = m21;
>>+  this->m22 = m22;
>>+  cairo_matrix_t *matrix = cairo_matrix_create ();
> 
> 
> This, together with gotos some lines earlier, breaks the build with gcc
> 3.3 (4.0 is fine).
> 
>  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -DXTHREADS
> -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/X11R6/include
> -I/usr/include/libpng12 -DDATADIR=\"/usr/local/share\" -Wall -Wno-unused
> -g -O2 -MT CairoFontEngine.lo -MD -MP -MF .deps/CairoFontEngine.Tpo -c
> CairoFontEngine.cc  -fPIC -DPIC -o .libs/CairoFontEngine.o
> CairoFontEngine.cc: In constructor `CairoFont::CairoFont(GfxFont*,
> XRef*,
>    FT_LibraryRec_*, double, double, double, double)':
> CairoFontEngine.cc:256: error: jump to label `err2'
> CairoFontEngine.cc:167: error:   from here
> CairoFontEngine.cc:246: error:   crosses initialization of `
>    cairo_matrix_t*matrix'
> CairoFontEngine.cc:256: error: jump to label `err2'
> CairoFontEngine.cc:97: error:   from here
> CairoFontEngine.cc:246: error:   crosses initialization of `
>    cairo_matrix_t*matrix'
> CairoFontEngine.cc: In member function `long unsigned int
>    CairoFont::getGlyph(unsigned int, Unicode*, int)':
> CairoFontEngine.cc:290: warning: comparison between signed and unsigned
> integer
>    expressions
> 
> Declaring matrix at the top of the function helps (and is consistent
> with other xpdf variable declarations). Patch is attached
> 
> 
>>+  cairo_matrix_set_affine (matrix, m11, m12, m21, m22, 0, 0);
>>+  cairo_font = cairo_ft_font_create_for_ft_face (face, FT_LOAD_NO_HINTING,
>>+						 matrix);
>>+  cairo_matrix_destroy (matrix);
>>+  if (cairo_font == NULL)
>>+    goto err2; /* this doesn't do anything, but it looks like we're
>>+		* handling the error */
>>+
>>   return;
>>  err2:
>>   /* hmm? */
> 
> 
> Regards,
> 
> Martin
> 
> 
> ------------------------------------------------------------------------
> 
> ? installed
> ? glib/semantic.cache
> cvs diff: Diffing .
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/poppler/poppler/ChangeLog,v
> retrieving revision 1.65
> diff -u -r1.65 ChangeLog
> --- ChangeLog	22 Apr 2005 04:09:23 -0000	1.65
> +++ ChangeLog	22 Apr 2005 11:01:42 -0000
> @@ -1,3 +1,8 @@
> +2005-04-22  Martin Kretzschmar  <martink at gnome.org>
> +
> +	* poppler/CairoFontEngine.cc: declare matrix variable before the
> +	first goto. Fixes build with gcc 3.3.
> +
>  Fri Apr 22 00:01:40 2005  Kristian Høgsberg  <krh at redhat.com>
>  
>  	* poppler/CairoFontEngine.cc: Hack around semi-broken cairo-0.4.0
> cvs diff: Diffing fofi
> cvs diff: Diffing glib
> cvs diff: Diffing goo
> cvs diff: Diffing poppler
> Index: poppler/CairoFontEngine.cc
> ===================================================================
> RCS file: /cvs/poppler/poppler/poppler/CairoFontEngine.cc,v
> retrieving revision 1.6
> diff -u -r1.6 CairoFontEngine.cc
> --- poppler/CairoFontEngine.cc	22 Apr 2005 04:09:23 -0000	1.6
> +++ poppler/CairoFontEngine.cc	22 Apr 2005 11:01:43 -0000
> @@ -80,6 +80,7 @@
>    char *name;
>    FoFiTrueType *ff;
>    FoFiType1C *ff1c;
> +  cairo_matrix_t *matrix;
>    
>    codeToGID = NULL;
>    codeToGIDLen = 0;
> @@ -243,7 +244,7 @@
>    this->m12 = m12;
>    this->m21 = m21;
>    this->m22 = m22;
> -  cairo_matrix_t *matrix = cairo_matrix_create ();
> +  matrix = cairo_matrix_create ();
>    cairo_matrix_set_affine (matrix, m11, m12, m21, m22, 0, 0);
>    cairo_font = cairo_ft_font_create_for_ft_face (face, FT_LOAD_NO_HINTING,
>  						 matrix);
> cvs diff: Diffing qt
> cvs diff: Diffing splash
> cvs diff: Diffing test



More information about the poppler mailing list