module Asciidoctor::Prawn::FormattedText::Fragment

Attributes

document[R]

Public Instance Methods

ascender=(val) click to toggle source

Modify the built-in ascender write method to allow an override value to be specified using the format_state hash.

# File lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb, line 14
def ascender= val
  @ascender = (format_state.key? :ascender) ? format_state[:ascender] : val
end
conceal() click to toggle source

Prevent fragment from being written by discarding the text.

# File lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb, line 8
def conceal
  @text = ''
end
descender=(val) click to toggle source

Modify the built-in ascender write method to allow an override value to be specified using the format_state hash.

# File lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb, line 20
def descender= val
  @descender = (format_state.key? :descender) ? format_state[:descender] : val
end
width() click to toggle source
Calls superclass method
# File lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb, line 24
def width
  if (val = format_state[:width])
    (val.end_with? 'em') ? val.to_f * @document.font_size : val
  else
    super
  end
end