[cairo] cairo_text_path problem

Behdad Esfahbod behdad at behdad.org
Wed Oct 31 20:54:58 PDT 2007


On Thu, 2007-11-01 at 03:11 +0200, Hakki Dogusan wrote:
> Hi,
> 
> (Thanks for responding)
> 
> Behdad Esfahbod wrote:
> > On Wed, 2007-10-31 at 18:43 -0400, Hakki Dogusan wrote:
> >> Hi,
> >>
> >> (winxp, mingw, (my)lua binding)
> >>
> >> Same code -translated from snippets to lua- gives different results for 
> >> 1.4.10 and 1.5.2:
> >>
> >> http://www.dogusan.net/uploads/images/text-1.4.10.png
> >> http://www.dogusan.net/uploads/images/text-1.5.2.png
> >>
> >> What could be the reason?
> > 
> > In more seriousness.  Just tested it and definitely works in C.
> 
> Sorry, not here :(

Ok, then it's not a lua-binding issue.

> Are you using mingw?

No, I was trying on Linux.  So, means, it's probably a win32 font issue.
Anyone else can test this on win32 and/or mingw?


> If it is, could you write your 
> compilation flags? Maybe my configuration is incorrect.
> I used following file to test:
> http://www.dogusan.net/uploads/File/text_path_test.c
> 
> Compiled with:
> 1.4.10: gcc -mwindows -W -O2 -Wall -DHAVE_W32API_H -DWIN32 -D_WINDOWS -o 
> t1.exe text_path_test.c -I. -I./src -I./depend/include/png 
> -I./depend/include/zlib -L. -lcairo -lpng -lzlib -lgdi32 -luser32 -lkernel32
> 1.5.2 added:  -lmsimg32
> 
> 
> > It's probably something changed in what cairo_text_path returns that
> > makes your lua conversion make a difference.  Can you dump the fetched
> > paths to see what's changed?
> > 
> 
> How can I dump the fetched paths?

You need to write some code.  Check the sample code here:
http://cairographics.org/manual/cairo-Paths.html#cairo-path-data-t

> --
> Regards,
> Hakki Dogusan
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list