After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608512 - pangocairo scaling problem.
pangocairo scaling problem.
Status: RESOLVED INCOMPLETE
Product: pango
Classification: Platform
Component: cairo
1.26.x
Other All
: Normal critical
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2010-01-30 11:12 UTC by cornelius.howl
Modified: 2010-09-23 00:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
when scale to 21 x 21. (3.52 KB, text/x-perl-script)
2010-01-30 11:15 UTC, cornelius.howl
Details
when scale to 3 x 3 (3.55 KB, text/x-perl-script)
2010-01-30 11:27 UTC, cornelius.howl
Details

Description cornelius.howl 2010-01-30 11:12:53 UTC
Hi everyone , 

I've encountered a pango bug, which spent me amount of time.. :-(

if you scale a cairo context to a small value( 1 ~ 10 ) , the text extents (ink) is ok. the ink extents rectangle is stick on text.

if you scale a cairo context to a large value ( 20 > .. ), the text extents (ink) will be very strange,  ink ascent is ok , but descent is not good.

here is my test case, thought it's in perl
Comment 1 cornelius.howl 2010-01-30 11:15:09 UTC
Created attachment 152624 [details]
when scale to 21 x 21.
Comment 2 cornelius.howl 2010-01-30 11:27:15 UTC
Created attachment 152625 [details]
when scale to 3 x 3
Comment 3 Sven Herzberg 2010-02-01 11:52:24 UTC
Hi,

your test cases don't work for me.

When I install perl-Gtk2 on Fedora 12, all I get is this error:
> $ perl scale33.pl 
> Can't locate Pango.pm in @INC (@INC contains: lib /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl .) at scale33.pl line 7.
BEGIN failed--compilation aborted at scale33.pl line 7.

Can you please provide working test cases?
Comment 4 Sven Herzberg 2010-02-01 12:01:59 UTC
Alright, I had to change "use Pango;" to "use Gtk2::Pango;".

Now I get this error:
> Undefined subroutine &Pango::Cairo::create_layout called at scale21x21.pl line 46.

Can you please specify the versions of the language bindings that you use?
Comment 5 cornelius.howl 2010-02-01 19:07:14 UTC
ok,
my Pango module version is:

Pango 1.221 
Cairo   1.061

you will need to reinstall these module via:

# cpan Pango
# cpan Cairo

my libraries:

glib version 2.22.4
cairo version: 1.8.8 
pango version: 1.26.2


and I am on Mac OS 10.6.   :-)
Comment 6 cornelius.howl 2010-02-01 19:12:40 UTC
and the perl version is:
5.10.1



another question:

when i scaling a cairo context to 23:23 

I use font size < 5 to get ink ,logical extents
but they both will be the same. (but it shouldn't, the ink extents should stick on text , right ? )

font size >12 , the text extents will be more concise.
Comment 7 Tobias Mueller 2010-08-05 23:06:45 UTC
Reopening as the requested information has been provided.
Comment 8 Behdad Esfahbod 2010-08-05 23:09:13 UTC
Attach screenshot please.
Comment 9 Felipe Besoaín Pino 2010-09-23 00:24:55 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!