summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-09-28 23:52:11 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-09-29 00:12:22 -0600
commit01ea7111a113eef9aa095773086df216baa1e034 (patch)
tree63711fb6a90c6962b7355df4dcf3560d6aaa4982
parent4df03898faefcda99bc4cd3a751a95dba3b4d690 (diff)
verify pdf-fontsdir value of . represents pwd
-rw-r--r--spec/font_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/font_spec.rb b/spec/font_spec.rb
index 6d27d7b4..15da223c 100644
--- a/spec/font_spec.rb
+++ b/spec/font_spec.rb
@@ -174,6 +174,15 @@ describe 'Asciidoctor::PDF::Converter - Font' do
end
end
+ it 'should look for font file in pwd if path entry is .' do
+ Dir.chdir fixtures_dir do
+ pdf = to_pdf 'content', attribute_overrides: { 'pdf-theme' => './otf-theme.yml', 'pdf-fontsdir' => ([examples_dir, '.'].join ';') }
+ fonts = pdf.objects.values.select {|it| Hash === it && it[:Type] == :Font }
+ (expect fonts).to have_size 1
+ (expect fonts[0][:BaseFont]).to end_with '+Quicksand-Regular'
+ end
+ end
+
it 'should look for font file in gem fonts dir if path entry is empty' do
pdf = to_pdf 'content', attribute_overrides: { 'pdf-theme' => (fixture_file 'bundled-fonts-theme.yml'), 'pdf-fontsdir' => ([fixtures_dir, ''].join ';') }
fonts = pdf.objects.values.select {|it| Hash === it && it[:Type] == :Font }