diff -Nuar pango-1.10.0-orig/pango/pango-layout.c pango-1.10.0/pango/pango-layout.c
--- pango-1.10.0-orig/pango/pango-layout.c	2005-08-15 22:05:27.000000000 +0300
+++ pango-1.10.0/pango/pango-layout.c	2006-01-03 14:17:28.000000000 +0200
@@ -107,6 +107,8 @@
 {
   PangoLayoutLine line;
   guint ref_count;
+  PangoGlyphString *last_tab_glyph;
+  PangoTabAlign last_tab_alignment;
 };
 
 struct _PangoLayoutClass
@@ -2475,11 +2477,8 @@
     }
 }
 
-/* For now we only need the tab position, we assume
- * all tabs are left-aligned.
- */
 static int
-get_tab_pos (PangoLayout *layout, int index)
+get_tab_pos (PangoLayout *layout, int index, PangoTabAlign *alignment)
 {
   gint n_tabs;
   gboolean in_pixels;
@@ -2499,7 +2498,7 @@
     {
       gint pos = 0;
 
-      pango_tab_array_get_tab (layout->tabs, index, NULL, &pos);
+      pango_tab_array_get_tab (layout->tabs, index, alignment, &pos);
 
       if (in_pixels)
         return pos * PANGO_SCALE;
@@ -2516,10 +2515,10 @@
       int next_to_last_pos = 0;
       int tab_width;
       
-      pango_tab_array_get_tab (layout->tabs, n_tabs - 1, NULL, &last_pos);
+      pango_tab_array_get_tab (layout->tabs, n_tabs - 1, alignment, &last_pos);
 
       if (n_tabs > 1)
-        pango_tab_array_get_tab (layout->tabs, n_tabs - 2, NULL, &next_to_last_pos);
+        pango_tab_array_get_tab (layout->tabs, n_tabs - 2, alignment, &next_to_last_pos);
       else
         next_to_last_pos = 0;
 
@@ -2577,6 +2576,8 @@
 {
   int i;
 
+  PangoTabAlign tab_alignment;
+
   int current_width = line_width (line);
 
   pango_glyph_string_set_size (glyphs, 1);
@@ -2590,13 +2591,16 @@
 
   for (i=0;;i++)
     {
-      int tab_pos = get_tab_pos (line->layout, i);
+      int tab_pos = get_tab_pos (line->layout, i, &tab_alignment);
       if (tab_pos > current_width)
 	{
 	  glyphs->glyphs[0].geometry.width = tab_pos - current_width;
 	  break;
 	}
     }
+  PangoLayoutLinePrivate *private = (PangoLayoutLinePrivate *)line;
+  private->last_tab_glyph = glyphs;
+  private->last_tab_alignment =  tab_alignment;
 }
 
 static inline gboolean
@@ -2669,6 +2673,16 @@
 				 * to the remaining portion of the first item */
 };
 
+static int
+glyphstring_width (PangoGlyphString* glyphs)
+{
+  int i;
+  int width = 0;
+  for (i=0; i < glyphs->num_glyphs; i++)
+    width += glyphs->glyphs[i].geometry.width;
+  return width;
+}
+
 static PangoGlyphString *
 shape_run (PangoLayoutLine *line,
 	   ParaBreakState  *state,
@@ -2681,6 +2695,10 @@
     shape_tab (line, glyphs);
   else
     {
+      PangoLayoutLinePrivate *private = (PangoLayoutLinePrivate *)line;
+      
+      g_return_val_if_fail (line != NULL, glyphs);
+      
       if (state->properties.shape_set)
 	imposed_shape (layout->text + item->offset, item->num_chars,
 		       state->properties.shape_ink_rect, state->properties.shape_logical_rect,
@@ -2688,6 +2706,21 @@
       else 
 	pango_shape (layout->text + item->offset, item->length, &item->analysis, glyphs);
 
+	if (private->last_tab_glyph != NULL)
+	{
+	if (private->last_tab_glyph->num_glyphs > 0)
+	{
+	  int w = private->last_tab_glyph->glyphs[0].geometry.width;
+	  if (private->last_tab_alignment == PANGO_TAB_RIGHT)
+	    w -= glyphstring_width (glyphs);
+	  else if (private->last_tab_alignment == PANGO_TAB_CENTER)
+	    w -= glyphstring_width (glyphs) / 2;
+	  
+	  if (w < 0) w = 0;
+	  private->last_tab_glyph->glyphs[0].geometry.width = w;
+	}
+	}
+
       if (state->properties.letter_spacing)
 	{
 	  PangoGlyphItem glyph_item;
@@ -4017,6 +4050,8 @@
   private->line.layout = layout;
   private->line.runs = 0;
   private->line.length = 0;
+  private->last_tab_glyph = NULL;
+  private->last_tab_alignment = PANGO_TAB_LEFT;
 
   /* Note that we leave start_index, resolved_dir, and is_paragraph_start
    *  uninitialized */
diff -Nuar pango-1.10.0-orig/pango/pango-tabs.h pango-1.10.0/pango/pango-tabs.h
--- pango-1.10.0-orig/pango/pango-tabs.h	2001-09-18 23:05:17.000000000 +0300
+++ pango-1.10.0/pango/pango-tabs.h	2006-01-03 14:19:53.000000000 +0200
@@ -30,13 +30,13 @@
 
 typedef enum
 {
-  PANGO_TAB_LEFT
+  PANGO_TAB_LEFT,
+  PANGO_TAB_RIGHT,
+  PANGO_TAB_CENTER
 
   /* These are not supported now, but may be in the
    * future.
    *
-   *  PANGO_TAB_RIGHT,
-   *  PANGO_TAB_CENTER,
    *  PANGO_TAB_NUMERIC
    */
 } PangoTabAlign;
