Method: PDF::Core::Text#process_text_options

Defined in:
lib/pdf/core/text.rb

#process_text_options(options) ⇒ Object

Low level call to set the current font style and extract text options from an options hash. Should be called from within a save_font block



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/pdf/core/text.rb', line 33

def process_text_options(options)
  if options[:style]
    raise "Bad font family" unless font.family
    font(font.family, :style => options[:style])
  end

  # must compare against false to keep kerning on as default
  unless options[:kerning] == false
    options[:kerning] = font.has_kerning_data?
  end

  options[:size] ||= font_size
end