lib/prawn/svg/elements/text_component.rb in prawn-svg-0.30.0 vs lib/prawn/svg/elements/text_component.rb in prawn-svg-0.31.0

- old
+ new

@@ -44,13 +44,15 @@ # text_anchor isn't a Prawn option; we have to do some math to support it # and so we handle this in Prawn::SVG::Interface#rewrite_call_arguments opts = { size: computed_properties.numerical_font_size, style: font && font.subfamily, - text_anchor: computed_properties.text_anchor + text_anchor: computed_properties.text_anchor, } + opts[:decoration] = computed_properties.text_decoration unless computed_properties.text_decoration == 'none' + if state.text.parent add_call_and_enter 'character_spacing', state.text.spacing unless state.text.spacing == state.text.parent.spacing add_call_and_enter 'text_rendering_mode', state.text.mode unless state.text.mode == state.text.parent.mode else add_call_and_enter 'character_spacing', state.text.spacing unless state.text.spacing == 0 @@ -181,10 +183,10 @@ source.children end end def find_referenced_element - href = attributes['xlink:href'] + href = href_attribute if href && href[0..0] == '#' element = document.elements_by_id[href[1..-1]] element if element.name == 'text' end