text_width (PDF::Writer)

          # File lib/pdf/writer.rb, line 1617
    1617:   def text_width(text, size = nil)
    1618:     if text.kind_of?(Numeric) and size.kind_of?(String)
    1619:       text, size = size, text
    1620:       warn PDF::Writer::Lang[:text_width_parameters_reversed] % caller[0]
    1621:     end
    1622:
    1623:     if size.nil? or size <= 0
    1624:       size = @font_size
    1625:     end
    1626:
    1627:     max   = 0
    1628:
    1629:     text.to_s.each do |line|
    1630:       width = text_line_width(line, size)
    1631:       max = width if width > max
    1632:     end
    1633:     max
    1634:   end