# How to use Pango::Attribute stuff?

**URL:** <https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521>\
**Category:** Ruby-Gnome 2\
**Created:** [February 27, 2009, 3:17am UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521 "2009-02-27T03:17:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magicloud\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Magicloud\_M](https://www.ruby-forum.com/u/Magicloud_M)\
**Post date:** [February 27, 2009, 3:17am UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521/1 "2009-02-27T03:17:32Z")

</div>

Hi,  
With C or pygtk, I could set a foreground attribute with index. But as  
it  
turns out, in ruby-gtk, I cannot, since there is no way to change the  
index.

So, any idea how to make part of the whole text in another color with  
pango layout?

Thanks.

---

<div class="post-metadata">

**Author:** ![Magicloud\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Magicloud\_M](https://www.ruby-forum.com/u/Magicloud_M)\
**Post date:** [February 27, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521/2 "2009-02-27T12:32:29Z")

</div>

Sorry - I noticed this a couple of weeks ago and hadn’t got around to  
submitting a patch.

2009/2/27 Magicloud M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Magicloud\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Magicloud\_M](https://www.ruby-forum.com/u/Magicloud_M)\
**Post date:** [February 28, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521/3 "2009-02-28T15:45:39Z")

</div>

I see. Thanks for the hard work. And one another thing, something about  
file  
system changed in the new version of gtk2, so ruby-gtk failed building  
with  
the latest gtk2.

2009/2/27 Geoff Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Magicloud\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Magicloud\_M](https://www.ruby-forum.com/u/Magicloud_M)\
**Post date:** [March 7, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521/4 "2009-03-07T14:59:22Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] How to use Pango::Attribute stuff?” on  
Fri, 27 Feb 2009 11:30:51 +0000,  
Geoff Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Sorry - I noticed this a couple of weeks ago and hadn’t got around to  
> submitting a patch.

I’ve added the features described in your patch.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![Magicloud\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Magicloud\_M](https://www.ruby-forum.com/u/Magicloud_M)\
**Post date:** [April 23, 2009, 8:36am UTC](https://www.ruby-forum.com/t/how-to-use-pango-attribute-stuff/161521/5 "2009-04-23T08:36:03Z")

</div>

Nice to see this  
[http://www.cheapest-caverta.com](http://www.cheapest-caverta.com)
