# Embedded images with Pango and Cairo

**URL:** <https://www.ruby-forum.com/t/embedded-images-with-pango-and-cairo/203181>\
**Category:** Ruby-Gnome 2\
**Created:** [February 15, 2011, 12:28am UTC](https://www.ruby-forum.com/t/embedded-images-with-pango-and-cairo/203181 "2011-02-15T00:28:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 15, 2011, 12:28am UTC](https://www.ruby-forum.com/t/embedded-images-with-pango-and-cairo/203181/1 "2011-02-15T00:28:16Z")

</div>

The goal: To embed images within text rendered by Pango (similar to how  
some chat clients display inline emoticons), using a Cairo backend.

The research: After much Google-grinding I came across the  
pango\_cairo\_context\_get\_shape\_renderer and pango\_attr\_shape\_new  
functions in the original C library.

The problem: I am unable to locate bindings for the aforementioned Pango  
functions in Ruby-Gnome, and I can’t find an alternative way of  
embedding images.

All help is much appreciated.
