Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f980d13

Browse files
committed
Test support of chars beyond BMP in PDF output
Test that character beyond the Basic Multilingual Plane are supported in PDF files with Type 42 fonts. The example tests STIX Sans math chars and a char from an old script.
1 parent 357e9fa commit f980d13

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Binary file not shown.

lib/matplotlib/tests/test_text.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,3 +748,11 @@ def test_pdf_font42_kerning():
748748
plt.rcParams['pdf.fonttype'] = 42
749749
plt.figure()
750750
plt.figtext(0.1, 0.5, "ATAVATAVATAVATAVATA", size=30)
751+
752+
753+
@image_comparison(['text_pdf_chars_beyond_bmp.pdf'], style='mpl20')
754+
def test_pdf_chars_beyond_bmp():
755+
plt.rcParams['pdf.fonttype'] = 42
756+
plt.rcParams['mathtext.fontset'] = 'stixsans'
757+
plt.figure()
758+
plt.figtext(0.1, 0.5, "Mass $m$ \U00010308", size=30)

0 commit comments

Comments
 (0)