You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using pygmt to draw recently, and found that Chinese fonts are messy, GMT supports Chinese fonts normally, but PYGMT is messy, how can I solve this problem? Thank you for your answer.
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
@agentUD Hello, may I ask if you have solved the above problem? I also encountered the same issue. Could you please share how you solved it? Thank you very much. I feel that pygmt cannot obtain the path of the Chinese font, so it's garbled
As explained above, PyGMT can support Chinese characters without issues.
Ideally, we should be able to provide a gallery example to show PyGMT supports non-standard fonts, as GMT does, but it means we have to offer extra fonts, and also do some font-related configurations, which is not easy to do in our CI.
@seisman Thank you. I successfully solved my problem. I didn't add the gs_option option as required when figur.show (), so the Chinese characters were garbled
Activity
welcome commentedon May 1, 2024
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
yvonnefroehlich commentedon May 1, 2024
@agentUD can you please provided code examples for an incorrectly working PyGMT case and a correctly working GMT case.
yvonnefroehlich commentedon Jun 2, 2024
Maybe the instructions on these pages can help here:
CUMT530849827 commentedon Dec 8, 2025
@agentUD Hello, may I ask if you have solved the above problem? I also encountered the same issue. Could you please share how you solved it? Thank you very much. I feel that pygmt cannot obtain the path of the Chinese font, so it's garbled
seisman commentedon Dec 8, 2025
Below is a Pyton script modified from the post by the GMT-China community: https://docs.gmt-china.org/latest/chinese/unix/. Please note that setting
pygmt.config(PS_CONVERT="C-I/home/xxxx/.gmt")doesn't work as expected (I don't know the reason yet). Instead, you need to addgs_optionwhen callingFigure.show().seisman commentedon Dec 8, 2025
As explained above, PyGMT can support Chinese characters without issues.
Ideally, we should be able to provide a gallery example to show PyGMT supports non-standard fonts, as GMT does, but it means we have to offer extra fonts, and also do some font-related configurations, which is not easy to do in our CI.
So, I'm closing the issue.
CUMT530849827 commentedon Dec 8, 2025
@seisman Thank you. I successfully solved my problem. I didn't add the gs_option option as required when figur.show (), so the Chinese characters were garbled