pango text size

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

 



Hello,
I need to know the size of chars(width,height) written in a text view,
so I could calculate the number of "words" per line I could write.
So I downloaded "gnome-terminal" source code to see if I could
understand how can it do it, but I'm little confused.
I just want to know  the width and heigth of a given monospace font
cell, looking at the documentation I only found:
pango_font_metrics_get_approximate_digit_width()
[ http://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html#id2931730 ]
but I need the fontmetrics, I can get the metrics from a fontset, but
how do I get the fontset?
gdk functions that do it are deprecated.
Seems too complicated for something so simple.
Do you know a good pango tutorial/ebook that covers this?  Any simple
program that already do this with viewable code?
                                                                      
   Jose Hevia
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux