summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-07-08 04:19:04 -0600
committerDan Allen <dan.j.allen@gmail.com>2019-07-08 04:19:04 -0600
commite05d9268b9d0c890c347510ba10723f53b6dc936 (patch)
tree9b740fc2fb1f083cb2a1b45ee1470111e29ef3e0
parent7fd3a6e79fad627c61bdf71c8005c71890948bae (diff)
add simple test for fallback font
-rw-r--r--spec/reference/text-formatter-fallback-font.pdfbin0 -> 5539 bytes
-rw-r--r--spec/text_formatter_spec.rb5
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/reference/text-formatter-fallback-font.pdf b/spec/reference/text-formatter-fallback-font.pdf
new file mode 100644
index 00000000..7fd40aec
--- /dev/null
+++ b/spec/reference/text-formatter-fallback-font.pdf
Binary files differ
diff --git a/spec/text_formatter_spec.rb b/spec/text_formatter_spec.rb
index f8746543..80338121 100644
--- a/spec/text_formatter_spec.rb
+++ b/spec/text_formatter_spec.rb
@@ -124,5 +124,10 @@ describe Asciidoctor::PDF::FormattedText::Formatter do
to_file = to_pdf_file 'Click btn:[Save] to save your work.', 'text-formatter-button.pdf', pdf_theme: theme_overrides, attribute_overrides: { 'experimental' => '' }, analyze: true
(expect to_file).to visually_match 'text-formatter-button.pdf'
end
+
+ it 'should use glyph from fallback font if not present in primary font' do
+ to_file = to_pdf_file '*を*', 'text-formatter-fallback-font.pdf', attribute_overrides: { 'pdf-theme' => 'default-with-fallback-font' }
+ (expect to_file).to visually_match 'text-formatter-fallback-font.pdf'
+ end
end
end