class Rabbit::Format::Size

Public Instance Methods

pango_value() click to toggle source
# File lib/rabbit/formatter.rb, line 105
def pango_value
  if @value > Pango::SCALE # For backward compatibility
    @value.ceil
  else
    (@value * Pango::SCALE).ceil
  end
end

Private Instance Methods

css_name() click to toggle source
# File lib/rabbit/formatter.rb, line 114
def css_name
  "font-size"
end
css_value() click to toggle source
# File lib/rabbit/formatter.rb, line 118
def css_value
  if value > Pango::SCALE # For backward compatibility
    "#{(value / Pango::SCALE) * 2}px"
  else
    "#{value * 2}px"
  end
end