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

Martin Kretzschmar m_kretzschmar at gmx.net
Fri Apr 22 04:04:24 PDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-3.3-fix.diff
Type: text/x-patch
Size: 1607 bytes
Desc: 
Url : http://lists.freedesktop.org/archives/poppler/attachments/20050422/8122ab59/gcc-3.3-fix.bin


More information about the poppler mailing list