Re: proper way to get cairo font width
- From: Tommi Sakari Uimonen <tuimonen cc hut fi>
- To: gtk-app-devel-list gnome org
- Subject: Re: proper way to get cairo font width
- Date: Wed, 20 Sep 2006 09:25:27 +0300 (EEST)
Hi Tommi,
Hi Stefan :)
Hello. What is the best way to query font width from cairo, in case that I
want to set size_hint for the widget that is drawing with that font?
would it help to construcz PangoLayouts and use pango_layout_get_extents().
I think I started some experiments already with Pango, but didn't progress
very far. But for now, I can live with the 'ugly' way and think some
smarter way later on.
Next step is to find how to store the rendered text as pixmap/image and
use that instead of every time rendering the text, because that seems to
be awfully slow. And since I know when the text has to be rendered again
and when I can use the pixmap (for eg. scrolling when text does not
change, only the position), this is the best approach.
Tommi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]