- PangoItem *item = (PangoItem *) ptr->data;
-
- Stencil item_stencil = pango_item_string_stencil (item, str, tight);
-
- if (text_dir == RIGHT)
- {
- item_stencil.translate_axis (last_x, X_AXIS);
- last_x = item_stencil.extent (X_AXIS)[RIGHT];
- }
- else if (text_dir == LEFT)
- {
- dest.translate_axis (item_stencil.extent (X_AXIS)[RIGHT], X_AXIS);
- }
-
-#if 0 /* Check extents. */
- if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
- {
- Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
- Box empty;
- empty.set_empty ();
- Stencil dimless_frame (empty, frame.expr ());
- dest.add_stencil (frame);
- }
+ PangoLayoutLine *line = (PangoLayoutLine *) l->data;
+ GSList *layout_runs = line->runs;
+
+ for (GSList *p = layout_runs; p; p = p->next)
+ {
+ PangoGlyphItem *item = (PangoGlyphItem *) p->data;
+ Stencil item_stencil = pango_item_string_stencil (item);
+
+ item_stencil.translate_axis (last_x, X_AXIS);
+ last_x = item_stencil.extent (X_AXIS)[RIGHT];
+
+#if 0 // Check extents.
+ if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
+ {
+ Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
+ Box empty;
+ empty.set_empty ();
+ Stencil dimless_frame (empty, frame.expr ());
+ dest.add_stencil (frame);
+ }