Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
CI

How to Fix Missing Fonts in Headless Chrome Screenshots on Linux

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.

If headless Chrome screenshots on Linux show boxes, the wrong typeface, or unexpected text spacing, first check the fonts visible to the exact container or host user running Chrome. Install the missing fonts and browser libraries there, refresh Fontconfig’s cache, restart Chrome, and verify the result with a repeatable test page. A browser that launches successfully does not necessarily have the fonts your page needs.

Why fonts go missing in headless Chrome on Linux

Chrome can use only fonts available to the Linux runtime in which it runs. Fonts on your workstation do not automatically exist in a Docker image or CI runner. When the requested family or a glyph is unavailable, the browser may use a fallback font; the result can be tofu boxes, different letter shapes, or changed line wrapping and element dimensions.

On Linux, Fontconfig discovers installed fonts and helps applications select matching faces. That makes two checks especially useful: fc-list shows fonts Fontconfig knows about, while fc-match reports the face it would select for a family or language. Finding a family somewhere in a project is not enough: it must be installed in a directory Fontconfig reads for the same user and environment that starts Chrome.

Confirm the problem is font discovery

Before changing packages, rule out capture timing. If the page uses web fonts, wait for the browser’s font set to finish loading before taking the screenshot. In Puppeteer, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Dell Optiplex 3060 Desktop Computer | Intel i5-8500 (3.2) | 32GB DDR4 RAM | 1TB SSD Solid State | Built in WiFi | Bluetooth | Windows 11 Professional | Home or Office PC (Renewed)
  • [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
  • [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
  • [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
  • [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
  • [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.evaluate(() => document.fonts.ready);
await page.screenshot({ path: 'font-check.png' });

Network-idle behavior depends on the page, so a site with persistent requests may never become idle. If that is the case, navigate using an appropriate page-load condition for that site, then still await document.fonts.ready before capture. This wait covers fonts requested by the document; it does not install a missing system font.

Record the exact browser build or image, Linux distribution and release, CPU architecture, locale, automation library, and user that launches Chrome. Compare a failing CI capture with a local one using those details. A successful Chrome launch proves only that the browser started, not that Fontconfig found the requested font.

Check what Fontconfig can see and select

Run these commands inside the same container or account used by Chrome:

fc-list | grep -i 'Your Font Family'
fc-match 'Your Font Family'
fc-match ':lang=ja'
  • If fc-list shows no matching family, install its package or copy licensed font files into a Fontconfig-readable directory.
  • If the family appears but fc-match returns another face, inspect the family and style names, requested weight or italic face, language coverage, and Fontconfig configuration.
  • Use a language match such as fc-match ':lang=ja' to check whether a suitable face is available for a script, rather than assuming a Latin font covers it.

Fontconfig’s user guide describes it as a library for system-wide font configuration and application access. Its manual explains that fc-cache scans font directories and builds font information cache files for applications using Fontconfig.

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

Install Linux browser dependencies and script fonts

For Debian- or Ubuntu-based images, begin with the current dependency list for the Chrome or Chromium build you actually use. Puppeteer’s troubleshooting guide includes libfontconfig1, fonts-liberation, FreeType-related runtime dependencies, graphics libraries, and other shared libraries. Its Dockerfile also shows language-specific font packages for scripts including CJK, Thai, Arabic, and Hebrew.

Here is an example Debian/Ubuntu Dockerfile fragment for common script coverage. Package availability and names vary by distribution and release; check the repositories for the base image you have pinned before relying on this exact list.

Rank #2
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKtec WARRANTY - GMKtec offers a 1-year limited GMKtec's warranty for each mini PC, starting from the date of the purchase. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC.
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/*

These example language packages do not guarantee coverage for every character or brand typeface. Identify the scripts actually rendered by your page and verify their glyphs in the resulting capture. For a page that relies on a proprietary or project-specific font, install that font too, provided you have the right to distribute it in the image.

Install browser libraries and fonts in the image that launches Chrome, rather than on a separate build stage or developer workstation. If the runtime uses a non-root account, ensure the needed fonts are readable and that the account’s Fontconfig configuration includes their directory.

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

Add custom fonts and rebuild the cache

For fonts you are licensed to distribute, copy the TTF or OTF files into a font directory and refresh Fontconfig’s cache in the image build:

COPY fonts/*.ttf /usr/local/share/fonts/company/
RUN fc-cache -f -v /usr/local/share/fonts/company

The Fontconfig documentation covers application font directories and cache locations; the fc-cache reference documents the cache utility’s directory scan. For a per-user installation, a typical location is $HOME/.local/share/fonts, provided it is included in the active Fontconfig configuration. Run fc-cache -f -v after adding files.

After the build, check both discovery and selection again. A font file can be present yet fail to match because its internal family/style names differ from the CSS request, or because it lacks the required weight, italic face, or script coverage. Check fc-list output for the styles actually installed and fc-match for the exact family request used by the page.

Restart Chrome and make the fix reproducible

  1. Rebuild or update the same Docker image or host environment used for capture.
  2. Run fc-list and fc-match as the Chrome process’s user, not only as root.
  3. Stop existing Chrome workers and launch a fresh browser process so it reads the updated font state.
  4. Capture a small deterministic test page that names the intended family and includes text in every script your application needs.
  5. Keep that page and its expected visual result in CI so a later image change that removes or changes a font is caught.

Build-time installation is generally easier to reproduce than installing packages during each CI job: it makes the browser, libraries, and fonts part of a versioned image. Pin the browser and image used for capture, and rebuild deliberately when updating them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Linux Mint 22 (Latest Version) Cinnamon Bootable Live USB for PC/Laptop 64-bit
  • Live Boot: Simply plug the USB drive into your computer, select the USB drive as your boot device, and experience Linux Mint without installation. This allows you to test the OS and its features before making any changes to your system.
  • Install Option: Once you've tested and decided to keep Linux Mint, you can easily install it on your computer directly from the USB drive.
  • Pre-installed software like LibreOffice for office tasks, a capable web browser (Firefox), email client (Thunderbird), and multimedia tools. This minimizes the need for additional downloads, saving you time and effort.
  • Resource Efficiency: Designed to run efficiently on a variety of hardware configurations. It demands fewer system resources compared to some other operating systems, making it an excellent choice for older computers or devices with limited hardware specifications.
  • Compatible with PC/Laptop/Desktop brands - Dell, HP, Sony, Lenovo, Samsung, Acer, Toshiba & more. Minimum system requirements 4 GB RAM Dual-Core Processor (2 GHz) 20 GB of free disk space

Choose the right installation approach

Approach Useful when Trade-off to account for
Distro font packages You need common system fonts or broad script coverage available through the selected distribution. Package names and contents can vary by distribution release; verify coverage and pin the image.
Custom licensed font files The page requires a specific company, product, or proprietary family. You must have distribution rights, keep the files readable to Chrome, and install the required styles and weights.
System-wide installation Multiple users or services in the image need the same fonts. Changes affect the shared image environment; rebuild and restart browser processes to apply them.
Per-user installation A non-root capture account needs fonts without a system-wide change. Chrome must run as that same user, and Fontconfig must be configured to read the user font directory.
Image-build installation You want repeatable screenshots across CI runs and deployments. The image must be rebuilt when fonts or browser dependencies change.
Runtime installation A short-lived environment genuinely needs a font chosen only at runtime. It adds setup and cache work to each run and can leave screenshots inconsistent if Chrome starts too soon.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common causes and fixes

Docker screenshot differs from a workstation

The container likely lacks the workstation’s fonts, or Chrome runs as a different user. Install the needed packages or licensed files in the image, run Fontconfig checks inside that image as the capture user, and restart the browser.

Boxes appear only for certain languages

The installed font may not cover the page’s script. Add an appropriate language font package or licensed font with that coverage, then test with representative characters and inspect fc-match ':lang=...' for the relevant language.

The family exists but the screenshot uses another face

Check the CSS spelling against the font’s internal family name and verify that the requested weight and style are installed. A family with only regular weight may not provide the requested 500 or 600 face or italics, leading to fallback or synthesized styling.

Fonts were copied, but Chrome still uses the old result

Run fc-cache -f -v after copying fonts, confirm the directory is in the active configuration, then terminate old Chrome workers and start a new browser process. Compare the environment variables FONTCONFIG_FILE, FONTCONFIG_PATH, and FC_LANG between local and CI execution; Fontconfig supports these configuration and locale influences.

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

Puppeteer reports “Could not find Chrome”

This is a browser-installation problem rather than evidence of a font mismatch. Puppeteer’s installation guidance says its install script downloads Chrome for Testing; package-manager policies that block install scripts can prevent that download. Follow the installation guidance for the chosen Puppeteer setup, then separately install and verify Linux font dependencies.

Playwright uses a different browser than expected

Playwright can download its managed Chromium or use branded Chrome or Edge. Its browser documentation explains the available browser choices. Pin the intended browser and install it during the image build; do not depend on whichever browser happens to be installed on a developer workstation.

Rank #4
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
  • Model: Dell OptiPlex 7050 Small Form Factor (SFF)
  • Processor: Intel Core i7-7700 3.60 GHz
  • Memory: 32GB DDR4 Ram
  • Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
  • Operating System: Windows 11 Pro (64-bit)

A fix works locally but not in CI

Compare the image, distribution release, architecture, capture user, locale, and Fontconfig environment. Verify fonts from inside the CI runtime itself; a successful check on the host says nothing about a separate container’s font inventory.

Or skip the browser setup

If you need a screenshot without maintaining a Linux browser image, ScreenshotNeo offers a screenshot API and MCP server for developers. A GET request can return a PNG, JPEG, WebP, or PDF; the example below requests WebP. See the ScreenshotNeo API documentation for the available parameters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://stripe.com 
  -o shot.webp

ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. 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 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Frequently Asked Questions

Can a font installed on my computer be used by Chrome in Docker?

Not unless the font is also made available to the container runtime that launches Chrome.

Does waiting for document.fonts.ready install a missing font?

No. It waits for the document’s font loading to settle; system fonts still need to be installed and discoverable by Fontconfig.

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

Which command shows the font Chrome is likely to select?

Use fc-match with the requested family, or a language query such as fc-match ':lang=ja', inside the same runtime as Chrome.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.