as I using gemini 2.5 pro, and ask it to read chinese charater and draw, it will lead to square box in the plot like:
I notice it try to set the font but I believe it lack these font file in the env
as I using gemini 2.5 pro, and ask it to read chinese charater and draw, it will lead to square box in the plot like:
I notice it try to set the font but I believe it lack these font file in the env
Hello,
Welcome to the Forum!
To begin with, we recommend fine tuning your prompt to be more precise about how you want the model to behave. If that still does not give you the desired results, we will need to analyze the issue further.
For that, we would require a few more details such as whether you are using a chat session or build mode in AI Studio. If you are using a chat session, please also share your configuration.
Hi, I’m building it in aistudio chat session, and test with gemini 2.5 pro, enable the code execution.
the problem is how to set the font for python(excuted code) to display the chinese characters
You could try adding more detailed instructions to your prompt, clearly specifying what you are trying to achieve for the model.
actually I tried, it tried to download the font file, it’s not worked in the code execution env
and the code execution env without network access, and local env without font files that can show the Chinese charater
example prompt
Hello,
Thank you for sharing the details , we were able to reproduce your issue.
At the moment, the Google AI Studio environment does not include Chinese fonts by default, which is causing this problem. We have escalated this to the concerned team as a feature request.
Thank you for your patience.