Skip to content

Commit

Permalink
Only add dominant_baseline when its value is not auto
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-hsieh committed Dec 11, 2023
1 parent a03aa49 commit 0878e10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prawn/svg/elements/text_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def apply
size: computed_properties.numerical_font_size,
style: font && font.subfamily,
text_anchor: computed_properties.text_anchor,
dominant_baseline: computed_properties.dominant_baseline,
}

opts[:dominant_baseline] = computed_properties.dominant_baseline unless computed_properties.dominant_baseline == 'auto'
opts[:decoration] = computed_properties.text_decoration unless computed_properties.text_decoration == 'none'

if state.text.parent
Expand Down

0 comments on commit 0878e10

Please sign in to comment.