Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Headless Chrome can render only fonts available to the Linux runtime that launches it. Install the required font packages or licensed font files in the same container or host environment as Chrome, rebuild Fontconfig’s caches, restart the browser, and verify the selected font with fc-match before capturing again.

Why fonts disappear in Linux screenshots

A Chrome process does not automatically inherit the fonts installed on your development workstation. A container or CI runner may have the browser binary but lack Fontconfig, common font packages, or glyph coverage for the languages on the page. Chrome can still start and return a screenshot; it may silently render a substitute font, change text metrics, or show missing-glyph boxes (often called tofu).

Fontconfig is the system library that provides font configuration and font access for applications. It discovers installed font files and matches requested family, style, weight, and language to an available face. The Fontconfig manual describes fc-cache as scanning font directories and building the font information cache used by Fontconfig applications. That cache, the fonts, and the browser process must all belong to the environment you are actually using for the capture.

Diagnose font discovery before changing the image

1. Rule out a web-font timing problem

First distinguish a missing local font from a web font that simply has not finished loading. In a Puppeteer page, wait for the document’s font loading set before taking the screenshot:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.evaluate(() => document.fonts.ready);
await page.screenshot({ path: 'shot.png', fullPage: true });

Use the real target URL and your normal page setup. document.fonts.ready resolves when the document’s font loading and layout operations are complete; it cannot install an absent system font or guarantee that every external font request succeeded. Inspect whether the screenshot has boxes, visibly different letter shapes, or changed line breaks. Record the precise browser build, Linux distribution and release, CPU architecture, locale, automation library, and container image tag so a local run and CI run can be compared.

2. Query Fontconfig in Chrome’s runtime

Run these commands inside the same container or under the same user account that launches Chrome—not just on the host machine:

fc-list | grep -i 'Your Font Family'
fc-match 'Your Font Family'
fc-match ':lang=ja'
  • fc-list inventories fonts and styles Fontconfig knows about. No matching output is a strong sign the requested family is not installed or is not visible to this runtime.
  • fc-match reports the face Fontconfig would select for a family request. If it returns a different family, Chrome may be falling back rather than using the face the page requests.
  • fc-match ':lang=ja' checks a language-specific match; substitute a relevant language when diagnosing a page using another script.

If the family appears in fc-list but the match is unexpected, inspect the listed family and style names, the requested CSS weight or italic style, language coverage, and Fontconfig configuration. A regular face does not prove that the requested 500 or 600 weight or italic face is available; Chrome may synthesize a style or choose a fallback.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Install fonts and Chrome dependencies in the image

Debian- and Ubuntu-based Docker images

Puppeteer’s official troubleshooting guidance includes libfontconfig1 and fonts-liberation among the requirements to consider. Its Docker guidance also shows language-specific font packages. The exact names and availability depend on the distribution and release, so confirm package names for the base image and browser build you pin. For a Debian/Ubuntu-based image, an example is:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
RUN apt-get update && apt-get install -y --no-install-recommends 
    ca-certificates fonts-liberation libfontconfig1 
    fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg 
    fonts-kacst fonts-freefont-ttf 
 && rm -rf /var/lib/apt/lists/*

The example covers several scripts: Japanese, Chinese, Thai, Arabic-related coverage, and broader Unicode glyphs. It is not a universal font set. Install packages that cover the actual scripts and faces your pages require; adding a Latin font alone will not solve missing CJK or other non-Latin glyphs. Puppeteer’s official dependency list also includes FreeType-related runtime and graphics libraries needed by Chrome, so use the current troubleshooting list for your selected browser and image rather than treating the font line above as the complete Chrome dependency set.

Copy licensed custom fonts

If the page depends on a proprietary family or a company font not available as a distribution package, copy only font files you have permission to distribute. Add them while building the image, then refresh the cache:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
COPY fonts/*.ttf /usr/local/share/fonts/company/
RUN fc-cache -f -v /usr/local/share/fonts/company

Fontconfig supports application-provided font directories; fc-cache scans the selected directory and creates cache files. If you install fonts for a non-root account instead, use a directory configured for that user, such as $HOME/.local/share/fonts, run fc-cache -f -v as that user, and launch Chrome under that same account. A font copied into root’s home directory will not necessarily be visible to a separate unprivileged Chrome user.

Build reproducibility into the image

Prefer installing packages and copying licensed fonts during the Docker image build instead of modifying a running container by hand. That makes the browser, dependencies, and fonts travel together when CI creates a fresh container. Pin the browser and base image to the versions your project uses, and rebuild when you intentionally update them. Keep a small deterministic test page or fixture in CI that exercises the target family, weights, and scripts; a missing package can then be caught when the image changes rather than after a visual regression.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Refresh caches, restart Chrome, and verify the result

  1. Install the fonts and dependencies in the image or account that runs Chrome.
  2. Rebuild Fontconfig’s cache with fc-cache -f -v (or the targeted directory command above) after adding font files.
  3. Start a fresh browser process. Terminate existing Chrome workers and relaunch the automation job; an already-running browser may continue using the old font state.
  4. Recheck discovery: run fc-list and fc-match again inside the runtime as the Chrome user.
  5. Capture a deterministic test page after document.fonts.ready, including the required language scripts and styles. Compare the output with the expected family, glyphs, and line wrapping.

If the result still differs, compare environment variables and identity between local and CI. Fontconfig recognizes overrides such as FONTCONFIG_FILE, FONTCONFIG_PATH, and locale-sensitive FC_LANG. The Puppeteer Dockerfile sets LANG=en_US.UTF-8 and installs broad language font packages; use a UTF-8 locale appropriate to your page and check that the process inherits it.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Choose the right installation approach

Approach Best fit Trade-off to check
Distribution font packages Common open font families and language coverage in a Linux image Package names and available versions vary by distro release; keep the package list with the image build.
Custom licensed font files A site depends on a specific proprietary or company face Confirm redistribution rights, install all needed styles, and keep the files in a Fontconfig-visible directory.
System-wide installation Multiple users or processes in one image need the same fonts Requires image-level setup and cache refresh; a user-specific setup may be more appropriate in restricted environments.
Per-user installation A non-root automation account needs fonts without system-wide changes Chrome must run as that same user, and the font directory must be in its active Fontconfig configuration.
Build-time installation Repeatable Docker and CI captures Image rebuilds are needed when fonts or packages change, but the runtime no longer depends on manual setup.
Runtime installation Short-lived diagnosis or environments where image changes are not available Easy to omit from a fresh runner, and requires cache refresh plus a fresh Chrome process.

A managed browser service can reduce the work of maintaining your own browser image, but check whether you can provide the exact fonts and control the capture environment you need. For reproducible branded output or language-specific pages, self-hosting the browser with its fonts in the image may remain necessary.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failure modes and fixes

Chrome starts, but screenshots show fallback glyphs

A successful launch only proves Chrome could run; it does not prove the font is installed. Run fc-list and fc-match in the Chrome container and user context. Install the missing package or licensed files, refresh the cache, restart the browser, and retest.

The font is listed, but the screenshot uses another face

Check the exact family and style metadata with fc-list, then test the requested family with fc-match. Confirm that the needed weight, italic face, and script coverage are present and that a Fontconfig override is not changing discovery. If only regular Latin coverage was installed, add fonts that cover the page’s actual scripts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The fix works locally but not in Docker or CI

The font may exist on the workstation but not in the image or runner, or Chrome may run under a different user. Move installation into the image build, ensure the browser runs as the account whose fonts were installed, and compare locale and FONTCONFIG_* variables. Test from inside the built image, not from the host shell.

The change has no effect after installing fonts

Rebuild the Fontconfig cache and terminate existing Chrome processes before capturing again. Font caches are consumed at application startup, so a long-lived browser worker can retain old state even after files have been copied.

Puppeteer reports “Could not find Chrome”

This is a browser installation problem, not evidence of a missing font. Puppeteer’s install script downloads Chrome for Testing; package-management policies that block install scripts can prevent that download. Install the expected browser during the image build using your chosen Puppeteer setup, and verify that the automation library points to that installed browser.

Playwright uses a different browser than expected

Playwright can use its managed Chromium download or branded Chrome/Edge. Pin which browser your project uses and install it during the image build; do not assume the browser on a developer workstation is the one available in CI. Then install and verify fonts in that browser’s Linux runtime.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

If you need a screenshot without maintaining a Chrome image, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; the parameter names used by other screenshot APIs also work. The example below saves a WebP capture of the page:

curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://example.com 
  -o shot.webp

See the ScreenshotNeo API documentation for setup and options. Before capture, ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and whether it was billed in X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free, and every feature is on every plan. Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.