Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87160 - Openbox 3.3-rc1-r1 pango weirdness
Summary: Openbox 3.3-rc1-r1 pango weirdness
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Commonbox Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-29 12:32 UTC by Tobias Klausmann (RETIRED)
Modified: 2005-06-10 05:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Workaround for huge fonts in Openbox+Pango (pango-font-fix.patch,492 bytes, patch)
2005-06-10 05:04 UTC, Ricardo Martins
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2005-03-29 12:32:57 UTC
If I use the supplied ebuild for openbox, I get this (generated) configure line:

./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-nls --disable-pango

Interestingly enough, the configure says "Pango: yes" in then end and the resulting openbox binary is linked against pango.

If I take that line and use it (instead of the conditional econf construct), it says Pango: no during configure and the resulting binary *isn't* linked against pango. Pango is not in my USE flags (-pango isn't, either).

What's amiss here?
Comment 1 Ricardo Martins 2005-04-03 09:44:56 UTC
Confirmed here. And the worse is that pango miscalculates fontsizes... Spider noticed that ("...btw. openbox+pango, broken configure check, and the pango code miscalculates fontsizes to pixels.. bleh." -- http://darkmere.wanfear.com/blog/ )
Comment 2 Brandon Low (RETIRED) gentoo-dev 2005-04-05 15:44:37 UTC
Fixed in CVS.
Comment 3 Aaron Gyes 2005-04-05 18:17:44 UTC
Agh! You didn't have to kill pango support. It can be fixed in font.c:

------------------------------------------------------
      g_object_unref(context);
      return result;
  */
-    return f->xftfont->ascent + f->xftfont->descent +
-        (f->shadow ? f->offset : 0);
+    gint x, y;
+    font_measure_full(f, " ", &x, &y);
+    return y;
 #endif /* USE_PANGO */
 }
Comment 4 Brandon Low (RETIRED) gentoo-dev 2005-04-05 18:46:04 UTC
I didn't kill pango support afaics -- I just made it act like it was supposed to -- on with USE="pango" and off w/o.

If you make that a proper patch and reopen this bug with it attached, I can maek another revision with it.
Comment 5 Ricardo Martins 2005-06-10 05:04:28 UTC
Created attachment 60982 [details, diff]
Workaround for huge fonts in Openbox+Pango

Here's a workaround for the problem with the fonts. It multiplies the font size
(which is the product of pixelsize*PANGO_SCALE) by 0.72 (72dpi). I don't know
the right way to do this, as I'm no programmer. This post [1] helped me a lot.

[1] http://mail.gnome.org/archives/gtk-i18n-list/2004-August/msg00029.html