Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fixed Chinese Characters Garbled in GIFs Generated by Pillow on macOS

wuhulala42f0af893508
diff --git a/browser_use/agent/gif.py b/browser_use/agent/gif.py
index c83aa30cd..2572eeb6e 100644
--- a/browser_use/agent/gif.py
+++ b/browser_use/agent/gif.py
@@ -64,6 +64,8 @@ def create_history_gif(
# Try different font options in order of preference
# ArialUni is a font that comes with Office and can render most non-alphabet characters
font_options = [
+ 'PingFang.ttc',
+ 'STHeiti Medium.ttc',
'Microsoft YaHei', # 微软雅黑
'SimHei', # 黑体
'SimSun', # 宋体