From 989951ca9823df447763b2fa2fecdb261b61702a Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sat, 28 Nov 2020 23:16:21 -0700 Subject: test font style can be set per heading level --- spec/section_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/section_spec.rb') 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 -- cgit v1.2.3