Re: Scrolling on Larger Fonts

On 03.06.2010 23:49, Zettai Muri wrote:
In the attached program there are two textviews, one uses the default
fontsize and the other uses fontsize 12 - a little larger than the
default.  After typing text into each of the text views (copying and
pasting this email is enough), so that the scroll bar appears, when I
scroll the larger font text view the text doesn't appear to redraw?
refresh? correctly. The tops of some lines are cut off as I scroll up
and down to view the top and bottom of the page.

You call $fontdesc->set_size with a size of 12, but that's very small since this methods expects sizes scaled with PANGO_SCALE. So use this instead:

  use Gtk2::Pango; # for PANGO_SCALE
  $fontdesc->set_size($size * PANGO_SCALE);

With this change, your program works fine for me (on Ubuntu).

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]