def compute_valign(layout, valign, embed_h)
      return 0 unless layout.height > 0
      ink_extents = layout.extents[1]
      ink_extents.height = embed_h * Pango::SCALE if ink_extents.height == 0 # JUST embed, bug #134
      case valign.to_s.downcase
      when 'middle'
        Pango.pixels((layout.height - ink_extents.height) / 2)
      when 'bottom'
        Pango.pixels(layout.height - ink_extents.height)
      else
        0
      end
    end
def compute_valign(layout, valign, embed_h)
      return 0 unless layout.height > 0
      ink_extents = layout.extents[1]
      ink_extents.height = embed_h * Pango::SCALE if ink_extents.height == 0 # JUST embed, bug #134
      case valign.to_s.downcase
      when 'middle'
        Pango.pixels((layout.height - ink_extents.height) / 2)
      when 'bottom'
        Pango.pixels(layout.height - ink_extents.height)
      else
        0
      end
    end
:nodoc:
 @api private