From a7242e6032035316dbdefcdd43afff34d6d0e7a0 Mon Sep 17 00:00:00 2001 From: tsingliu <410869548@qq.com> Date: Sat, 7 Feb 2026 22:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B9=E5=99=A8=E4=B8=8B=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++++++ src/tools/screenshot.ts | 3 +++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index fa9490d..e5fdc37 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,23 @@ Configure webhooks to receive alerts or reports in your team chat apps. Built-in utility to provide the agent with the current system time, ensuring accurate handling of relative time requests. - **Usage**: "What's the date today?" or "Remind me to check the logs next Monday." +## Docker Support + +### Chinese Font Issues in Screenshots +When running AutoClaw inside a Docker container (especially Alpine or Debian Slim), screenshots of Chinese websites may display text as square boxes ("tofu") due to missing fonts. + +**Solution:** Install CJK (Chinese/Japanese/Korean) fonts in your container. + +**For Debian/Ubuntu:** +```bash +apt-get update && apt-get install -y fonts-noto-cjk fonts-wqy-zenhei +``` + +**For Alpine Linux:** +```bash +apk add font-noto-cjk +``` + ## License MIT diff --git a/src/tools/screenshot.ts b/src/tools/screenshot.ts index 93efda8..208ca83 100644 --- a/src/tools/screenshot.ts +++ b/src/tools/screenshot.ts @@ -64,6 +64,9 @@ export const ScreenshotTool: ToolModule = { await page.goto(args.url, { waitUntil: 'networkidle', timeout: 30000 }); // Inject CSS to force common Chinese fonts + // Note: For Docker environments (Alpine/Debian), ensure fonts are installed. + // Alpine: apk add font-noto-cjk + // Debian/Ubuntu: apt-get install fonts-noto-cjk fonts-wqy-zenhei await page.addStyleTag({ content: ` body, h1, h2, h3, h4, h5, h6, p, span, div, li, a, button, input, textarea {