容器下中文问题
This commit is contained in:
parent
ebaa7ce8cd
commit
a7242e6032
2 changed files with 20 additions and 0 deletions
17
README.md
17
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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue