text_width (PDF::Writer)

          # File lib/pdf/writer.rb, line 1554
    1554:   def text_width(text, size = nil)
    1555:     if text.kind_of?(Numeric) and size.kind_of?(String)
    1556:       text, size = size, text
    1557:       warn PDF::Writer::Lang[:text_width_parameters_reversed] % caller[0]
    1558:     end
    1559:
    1560:     if size.nil? or size <= 0
    1561:       size = @font_size
    1562:     end
    1563:
    1564:     max   = 0
    1565:
    1566:     text.to_s.each do |line|
    1567:       width = text_line_width(line, size)
    1568:       max = width if width > max
    1569:     end
    1570:     max
    1571:   end