diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-11-28 23:16:21 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-11-29 03:16:35 -0700 |
| commit | 989951ca9823df447763b2fa2fecdb261b61702a (patch) | |
| tree | 27c26e0d4b0ced4c44127408f300211c993fc705 /spec/section_spec.rb | |
| parent | 0a384d0c40f3472ef2fff007dda7094cb5831750 (diff) | |
test font style can be set per heading level
Diffstat (limited to 'spec/section_spec.rb')
| -rw-r--r-- | spec/section_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/section_spec.rb b/spec/section_spec.rb index decb964e..b43a2c2d 100644 --- a/spec/section_spec.rb +++ b/spec/section_spec.rb @@ -60,6 +60,17 @@ describe 'Asciidoctor::PDF::Converter - Section' do (expect text[1][:font_name]).to eql 'NotoSerif-BoldItalic' end + it 'should add text formatting styles to styles defined in theme for specific level' do + pdf = to_pdf <<~'EOS', pdf_theme: { heading_font_style: nil, heading_h2_font_style: 'bold' }, analyze: true + == Get Started _Quickly_ + EOS + + text = pdf.text + (expect text).to have_size 2 + (expect text[0][:font_name]).to eql 'NotoSerif-Bold' + (expect text[1][:font_name]).to eql 'NotoSerif-BoldItalic' + end + it 'should allow theme to align all section titles' do pdf = to_pdf <<~'EOS', pdf_theme: { heading_align: 'center' }, analyze: true == Drill |
