pygmt icon indicating copy to clipboard operation
pygmt copied to clipboard

Chinese garbled code

Open agentUD opened this issue 1 year ago • 3 comments

Description of the problem

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.

Minimal Complete Verifiable Example

No response

Full error message

No response

System information

PyGMT information:
  version: v0.9.0
System information:
  python: 3.8.17 | packaged by conda-forge | (default, Jun 16 2023, 07:01:59) [MSC v.1929 64 bit (AMD64)]
  executable: D:\SoftWare\Work_SoftWare\miniconda3\envs\Fluent-Qt\python.exe
  machine: Windows-10-10.0.19045-SP0
Dependency information:
  numpy: 1.24.4
  pandas: 1.5.3
  xarray: 2023.1.0
  netCDF4: 1.6.4
  packaging: 23.1
  contextily: None
  geopandas: None
  ghostscript: 9.56.1
GMT library information:
  binary version: 6.4.0
  cores: 12
  grid layout: rows
  image layout:
  library path: D:/SoftWare/Work_SoftWare/miniconda3/envs/Fluent-Qt/Library/bin/gmt.dll
  padding: 2
  plugin dir: D:/SoftWare/Work_SoftWare/miniconda3/envs/Fluent-Qt/Library/bin/gmt_plugins
  share dir: D:/SoftWare/Work_SoftWare/GMT6.4/share
  version: 6.4.0

agentUD avatar May 01 '24 08:05 agentUD

👋 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.

welcome[bot] avatar May 01 '24 08:05 welcome[bot]

@agentUD can you please provided code examples for an incorrectly working PyGMT case and a correctly working GMT case.

yvonnefroehlich avatar May 01 '24 11:05 yvonnefroehlich

Maybe the instructions on these pages can help here:

  • https://docs.gmt-china.org/latest/chinese/windows/
  • https://forum.generic-mapping-tools.org/t/how-can-pygmt-display-chinese-properly-on-windows/2406/4

yvonnefroehlich avatar Jun 02 '24 17:06 yvonnefroehlich