CJK Font Rendering
Chinese, Japanese, and Korean font rendering considerations for consistent cross-platform fingerprint protection.
Prerequisites
- BotBrowser binary installed. See INSTALLATION.md.
- A profile file (
.encor.json).
Quick Start
chromium-browser \
--bot-profile="/path/to/profile.enc"Use this as a minimal baseline, then apply the cjk font rendering configuration shown below.
Overview
CJK (Chinese, Japanese, Korean) characters present unique challenges for cross-platform consistency. These writing systems use thousands of distinct glyphs with complex shaping rules. Each operating system ships different CJK fonts with different metrics, different fallback chains, and different rendering behaviors. Text measurement results can vary significantly across platforms.
BotBrowser’s cross-platform font engine addresses this by including embedded CJK font bundles and normalizing text shaping through a built-in shaping engine. The goal is consistent CJK glyph metrics and Canvas text output across Windows, macOS, and Linux hosts.
How It Works
BotBrowser includes the correct CJK font families in its embedded font bundles for each target platform. When a profile specifies a Windows identity, the browser uses the matching Windows CJK fonts regardless of the host OS.
Built-in text shaping and rendering engines produce consistent CJK output across hosts. The embedded font bundles ensure that font fallback follows the same chain on every platform, covering all CJK text rendering surfaces including Canvas.
Common Scenarios
Japanese site with Windows profile on Linux
import { chromium } from "playwright-core";
const browser = await chromium.launch({
executablePath: process.env.BOTBROWSER_EXEC_PATH,
headless: true,
args: [
"--bot-profile=/path/to/windows-profile.enc",
"--proxy-server=socks5://user:pass@jp-proxy.example.com:1080",
"--bot-config-timezone=Asia/Tokyo",
"--bot-config-locale=ja-JP",
"--bot-config-languages=ja-JP,en-US,en",
],
});
const page = await browser.newPage();
await page.goto("https://example.jp");
// Verify on a fingerprint testing site that text metrics match
// the profile's target platform, not the host OS
await browser.close();Chinese site with macOS profile
const browser = await chromium.launch({
executablePath: process.env.BOTBROWSER_EXEC_PATH,
headless: true,
args: [
"--bot-profile=/path/to/macos-profile.enc",
"--proxy-server=socks5://user:pass@cn-proxy.example.com:1080",
"--bot-config-timezone=Asia/Shanghai",
"--bot-config-locale=zh-CN",
"--bot-config-languages=zh-CN,zh,en-US,en",
],
});Verifying CJK consistency across platforms
To verify CJK font consistency:
- Launch BotBrowser with the same profile on different host operating systems (Windows, macOS, Linux).
- Visit a CJK-heavy site or a fingerprint testing tool such as BrowserLeaks or CreepJS .
- Confirm that CJK text rendering metrics are identical across all hosts, matching the profile’s target platform.
Troubleshooting / FAQ
| Problem | Solution |
|---|---|
| CJK characters render as boxes | The profile may not include CJK font bundles. Use a profile version that includes CJK support. |
| Text width differs across platforms | Verify both hosts use the same BotBrowser version and profile. Font engine updates between versions can affect metrics. |
| Mixed CJK/Latin text inconsistency | This typically involves fallback chain differences. Ensure the profile’s font configuration includes appropriate CJK and Latin fonts. |
| Rare Unicode characters render differently | Some rare CJK characters may fall through to system fonts on certain platforms. Report these cases for inclusion in future font bundle updates. |
Next Steps
- Font Fingerprinting. Font protection overview, CLI flags, and noise configuration.
- Cross-Platform Profiles. Full details on profile portability across operating systems.
- Windows on Mac/Linux. Running Windows profiles on non-Windows hosts.
- Advanced Features. Technical details on the font engine.
Related documentation: Advanced Features | Profile Configuration
Legal Disclaimer & Terms of Use • Responsible Use Guidelines . BotBrowser is for authorized fingerprint protection and privacy research only.