Open luzhiyong1996 opened 22 hours ago
@luzhiyong1996 Hello there! I'm here to help you with any bugs, questions, or contributions. Let me know how I can assist you while we wait for a human maintainer.
There are two similar discussions regarding the issue of Chinese characters not being displayed correctly on the axes of charts generated by the chart creation tool in Dify. You can find these discussions here and here [1][2].
Regarding your issue, it seems like the problem is with the way the set_chinese_font
function checks for available fonts. Your suggested modification to use [fontInfo.name for fontInfo in fontManager.ttflist]
instead of font in fontManager.ttflist
is a good approach. This change ensures that the function checks the names of the fonts in the ttflist
, which should help in correctly identifying and setting the Chinese font.
To continue talking to Dosu, mention @dosu.
You are right, feel free to submit a PR :)
Self Checks
Dify version
0.11.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
The api/core/tools/provider/builtin/chart/chart.py an error occurred in the set chinese font that could not be obtained
✔️ Expected Behavior
Should be modified as:
❌ Actual Behavior
No response