Skip to content

Commit

Permalink
Add a test for typesetting quotation marks
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Apr 18, 2024
1 parent 1746c04 commit f1d24e9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pygmt/tests/baseline/test_text_quotation_marks.png.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: 90d08c5a11c606abed51b84eafcdea04
size: 1662
hash: md5
path: test_text_quotation_marks.png
13 changes: 13 additions & 0 deletions pygmt/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,16 @@ def test_text_nonascii():
fig.text(x=1, y=1, text="xytext:°α") # noqa: RUF001
fig.text(x=[5, 5], y=[3, 5], text=["xytext1:αζΔ❡", "xytext2:∑π∇✉"])
return fig


@pytest.mark.mpl_image_compare
def test_text_quotation_marks():
"""
Test typesetting quotation marks.
See https://github.com/GenericMappingTools/pygmt/issues/3104.
"""
fig = Figure()
fig.basemap(projection="X4c/2c", region=[0, 4, 0, 2], frame=0)
fig.text(x=2, y=1, text="\\234 \\140 ' \" \\216 \\217", font="20p")
return fig

0 comments on commit f1d24e9

Please sign in to comment.