tiny-teeny fonts with KDE

Hi! I'm using the following code to calculate the size of some text:

layout = pango_layout_new(gdk_pango_context_get_for_screen(gdk_screen_get_default()));
// equivalent to gdk_pango_context_get();

  pango_layout_set_text(layout, text, -1);
  pango_layout_get_extents(layout, NULL, &rect);

This is because I don't have any widget available to use

What happens is that if I use KDE, the text appears to be like 3 pixels wide! Now, if you run gnome-font-properties, and restart the program, the fonts look fine. I know some of these issues between gnome and KDE have been discussed elsewere, but my program doesn't use gnome, I'm using gtk and pango. What's the problem then? Is there a way to fix my code, without using a widget to get the context?

Thank you!

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