October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Fix Devanagari Text Breaking in Headless Chrome Screenshots

When Devanagari breaks in a headless Chrome screenshot, compare the runtime's installed fonts, loaded webfonts, actual fallback, and browser build before changing CSS.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Devanagari text looks correct in your local browser but breaks in a headless Chrome screenshot, first check the fonts available to the screenshot runtime and whether the intended font has finished loading. A Chrome process can start successfully while lacking a font with the needed glyphs. Compare the exact browser build, container image, font files, and page resources before changing CSS or assuming headless mode itself is at fault.

Why Devanagari can look different in a screenshot

Devanagari is a complex writing system: characters must be shaped into the appropriate glyphs and positions. Chromium uses text shaping and font fallback; if the preferred font lacks Devanagari glyphs, the fallback chosen by the runtime can affect the result. A Linux container may not have the same fonts as your workstation, even when both render the same page in Chrome. Chromium’s RenderText overview describes shaping and missing-glyph handling, and its text-rendering documentation gives background on fallback.

As an Amazon Associate I earn from qualifying purchases.

This is a diagnostic model, not proof of a single cause. Puppeteer’s troubleshooting guide notes that Linux runtime dependencies and additional font files for some character sets may be needed. Launching Chrome successfully does not establish that every font required by a page is installed.

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

Diagnose the screenshot environment in order

  1. Reproduce in the actual runtime

    Run the capture in the same container or deployment image that produces the broken screenshot. Record the Chrome or Chromium version, Puppeteer version, OS image, and installed fonts. A local reproduction on a different machine can conceal a font-coverage or fallback difference.

  2. Check whether the intended font is available and loaded

    If the page relies on a system font, verify that the font is installed in the screenshot runtime. If it uses a webfont, inspect the browser’s network activity and confirm the font request succeeds. A CSS declaration such as font-family: "Your Devanagari Font" selects a name; it does not install that font in a Linux image.

  3. Inspect the font actually used

    Check the computed font-family for the affected text, then determine which font renders the Devanagari characters. A CSS family list can name the intended face while the browser falls back for characters it cannot render. Compare the actual fallback between the local and screenshot environments.

  4. Wait for fonts before capturing

    A screenshot taken before a webfont finishes loading can capture fallback text even if the page later renders correctly. Make font readiness part of the capture sequence. In Puppeteer, for example, wait for document.fonts.ready after navigation:

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

    await page.goto(url, { waitUntil: 'networkidle0' });
    await page.evaluate(() => document.fonts.ready);
    await page.screenshot({ path: 'shot.png', fullPage: true });

    Network idle and font readiness address different timing conditions: a page may still need an explicit font-ready wait. If the site loads fonts dynamically after initial rendering, verify that the affected face is actually ready before capturing.

  5. Keep browser versions and modes comparable

    Test the same page, Chrome build, fonts, and assets in both environments. Current Chrome documentation says unified headless and headful modes share Chrome code starting with Chrome 112; from Chrome 132, the old headless implementation is available separately as chrome-headless-shell. Historical advice about a distinct headless renderer may not apply to unified headless Chrome. See Chrome’s headless mode documentation.

  6. Test fallback substitutions if the font is present

    If the expected font is installed and loads successfully but shaping still looks wrong, test another known Devanagari-capable font and inspect the system’s fontconfig substitutions. A Chrome Help Community report describes a particular Devanagari issue attributed to FreeSans substitution and suggests changing the substitution. It is an anecdotal case, not a universal fix; do not apply it without confirming that the same substitution is involved in your runtime.

    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.
  7. Install fonts for the target distribution

    If a needed font is missing, add an appropriate font package or bundle the font in the image, then rebuild and retest that image. Package names and installation steps depend on the Linux distribution and image, so identify those first rather than copying a command intended for another system. Puppeteer’s troubleshooting guidance can help with Linux dependencies, but it does not specify one correct Devanagari package for every image.

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

What to compare when local and headless output differ

Check Record or compare What a difference may indicate
Browser and automation versions Chrome/Chromium build and Puppeteer version A browser or automation-version difference that should be eliminated before attributing the issue to fonts.
Operating system and fonts Container or OS image and installed font files The runtime may lack the intended font or choose a different fallback.
Page font resources Webfont requests and whether they complete A failed or late font load can leave fallback text in the captured image.
Actual rendering font Computed family and the font used for the Devanagari run A declared family does not establish that it supplied the glyphs; fallback may differ.

These comparisons separate font availability and loading from browser-version or page-resource differences. Chromium’s account of shaping and fallback supports checking the actual font, while Puppeteer’s guidance supports checking the runtime rather than assuming a working Chrome launch means language coverage is complete.

Common symptoms and fixes

  • Boxes or missing glyphs: Verify that a Devanagari-capable font is installed or successfully loaded and that the renderer is not falling back to a face without the required characters.
  • Disconnected, misplaced, or differently shaped characters: Compare the actual fallback and shaping environment across runs; test a known Devanagari-capable font and inspect fontconfig substitutions.
  • Only the first screenshot is broken: Check whether the capture happens before webfont loading completes. Wait for document.fonts.ready and verify the font request succeeded.
  • Local Chrome works, container capture does not: Reproduce inside the deployment image and compare its browser build and installed fonts with the local environment.
  • A font package command fails: Confirm the Linux distribution and package manager first. There is no single package name established for every target image.

Or skip the browser setup

ScreenshotNeo offers a screenshot API and MCP server if you would rather request a capture than maintain your own browser setup. For this particular Devanagari issue, still verify the output against your page and font requirements; the service details here do not establish a specific font package or a guaranteed shaping result.

One-call cURL example (replace the target URL and API key):

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.

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

See the ScreenshotNeo documentation for request options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, no card required.

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

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.