ScreenshotNeo

BlogHow-to

ScreenshotMachine CLI Not Capturing Indian-Language Text Correctly: Font Fixes

Diagnose missing or broken Indic text by checking where ScreenshotMachine renders the page, then apply the right local font, web-font, or language-setting fix.

By the ScreenshotNeo team4 October 20267 min read

If Indian-language text is missing or malformed in a ScreenshotMachine capture, first find out where the browser renders the page. A local browser or CLI uses fonts installed in its own machine or container; a request to ScreenshotMachine’s hosted API uses the service’s renderer. Installing a font on your laptop can fix the first case, but it does not install that font on a hosted renderer.

The reviewed ScreenshotMachine API documentation describes a hosted HTTP GET API and options such as accept-language, cookies, user-agent, delay, dimensions, selectors, and crop. It does not document a local CLI renderer, a font upload or selection option, or the hosted service’s installed fonts. The CLI package and version also matter, so confirm what executable you are running before applying a fix.

1. Identify where the capture runs

  1. Record the exact command, executable name, package or repository, and version.
  2. Check whether the command makes a request to api.screenshotmachine.com. If so, the actual browser is likely remote; local font installation will not change its font inventory.
  3. If it launches Chromium, Chrome, or another browser on your machine, inspect the environment that launches it. A container, CI runner, or remote worker has its own fonts, even when the command is started from your laptop.
  4. Open the same page in an ordinary browser using the same URL, account, cookies, and relevant locale. Confirm the text is present and rendered correctly there.

Do not assume the word “CLI” means local rendering. The title does not identify a particular CLI package, version, or renderer. If that is unclear, inspect the executable’s help and package documentation or ask its vendor.

2. Identify the script and the failure

“Indian-language text” can mean several scripts, and a font that covers one may not cover another. Test one short sample in the affected script at a time. Compare the screenshot with the browser display and the page’s source text.

  • Missing-glyph boxes or empty characters: the selected font may not contain the required glyphs, or the intended web font may not have loaded.
  • Letters appear separately, in the wrong order, or with broken conjuncts: investigate shaping support as well as font coverage. Installing another font alone may not correct a shaping problem in the rendering stack.
  • English appears but localized content is absent: the site may be serving different content by language, account, or session. This is a content-selection issue, distinct from whether the renderer has a suitable font.

Check the page’s declared web-font requests in browser developer tools. Confirm the font files load successfully, are not blocked, and finish loading before the screenshot is taken.

3. If the browser is local, install fonts in its runtime

Install an Indic-capable font package for the affected script in the precise environment that runs the browser. The following names are examples from Fedora documentation, not universal package names:

Language example Script Fedora package example
Hindi Devanagari lohit-devanagari-fonts
Tamil Tamil lohit-tamil-fonts
Bengali Bengali lohit-bengali-fonts
Gujarati Gujarati lohit-gujarati-fonts
Kannada Kannada lohit-kannada-fonts
Malayalam Malayalam smc-meera-fonts
Telugu Telugu lohit-telugu-fonts

Consult the current package repository for your distribution and release before using a package name. Fedora’s project documentation records Noto becoming the default for Indic scripts in Fedora Linux 39; that dated change does not establish the defaults on every current Fedora image. Debian documentation points to the fonts-indic package family and explains that fontconfig search paths are configurable.

For a Debian-based image, check the repository’s current package details and install the relevant package in the image build. For Fedora, check the current release’s package names and defaults. After installation, refresh the font cache if the distribution’s font tools require it, then restart the browser process so it discovers the fonts. Validate the result in the same container or runner used for capture.

# Debian-family example: confirm package availability for your release first
apt-cache show fonts-indic

# Fedora example: search current repositories for the affected script
 dnf search indic fonts

These commands only help with a browser running in that environment. They are not a way to change fonts on a hosted ScreenshotMachine renderer.

4. If capture is hosted, check language, session, and font loading

For a hosted API capture, first determine whether the page itself sends the right content and web font to the remote browser. ScreenshotMachine documents an accept-language parameter that sets the Accept-Language header on the request to the page. That can influence language negotiation; it does not install a font or guarantee glyph shaping.

Use the documented controls only for the problem they address:

  • accept-language: request the language variant the page should serve.
  • Cookies: supply the relevant session or consent state if the page requires it.
  • User-agent: reproduce content that varies by browser or device.
  • Delay: allow late page content or web-font loading to finish before capture.
  • Dimensions, selector, and crop: control what is captured; they do not add font coverage.

If the web font loads in a normal browser but the hosted capture still lacks glyphs or shaping, ask ScreenshotMachine support about its current renderer’s Indic font coverage and shaping behavior. The reviewed API documentation does not establish that inventory or provide a font-upload option, so an API-side font fix cannot be promised from those docs.

5. Compare a minimal test

  1. Choose one affected script and a short sample already present on a test page.
  2. Capture that page in the ordinary browser and save the output for comparison.
  3. For local rendering, repeat in the exact container or CI image after installing the script-appropriate fonts.
  4. For hosted rendering, repeat with the correct language header, cookies, and enough delay for the site’s font request to finish.
  5. Compare missing glyphs separately from broken shaping, and keep the URL, viewport, session, and text sample constant.

This isolates whether the issue is the page’s content, a failed web-font request, the local runtime’s font inventory, or the hosted renderer. It is a diagnostic method, not a claim about ScreenshotMachine’s internal implementation.

Common errors and fixes

Symptom or mistake Likely cause What to do
Installed fonts on laptop, capture unchanged The browser runs in a container, CI worker, or hosted service. Install fonts in the actual local runtime, or investigate the hosted renderer separately.
Hindi works but Tamil does not Different scripts need appropriate glyph coverage. Identify the failing script and check its package or web-font coverage specifically.
Characters show, but conjuncts or order are broken Shaping behavior may be at fault, rather than simple glyph coverage. Compare another browser/runtime and raise the shaping case with the renderer provider if hosted.
Header changes but text remains wrong Accept-Language affects language negotiation, not installed fonts. Check both served content and font availability as separate issues.
Text works after waiting, but not in screenshot The page’s web font or localized content loads after capture begins. Confirm the font request completes and use an appropriate documented delay where available.
Old package instructions fail Names and defaults vary by distribution and release. Search the current repositories and distribution documentation; do not copy a package name across distributions.

Performance, reliability, and cost considerations

Local font installation changes the runtime image and may increase its size; add only the script coverage the application needs, then retain the change in the container or CI image definition so it survives rebuilds. Restarting the browser after font installation avoids relying on a process that began before the new fonts were available.

Hosted captures avoid maintaining a local browser image, but the reviewed ScreenshotMachine API documentation does not specify Indic font coverage or a font upload control. Verify the hosted result with a small representative capture before relying on it. The sources reviewed provide no Indic rendering success rate or performance benchmark, so no numeric reliability or speed claim is warranted.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return an image or PDF; see the API documentation. As with any hosted capture, confirm that your target script renders correctly on your actual page before depending on the output.

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

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

FAQ

Does ScreenshotMachine CLI use my system fonts?

That depends on the exact CLI and whether it launches a local browser or sends a request to the hosted API. The reviewed vendor API docs do not document a local CLI renderer or hosted font inventory.

Will setting Accept-Language fix missing Hindi or Tamil glyphs?

It can affect which localized content the site serves. It does not add fonts or guarantee correct script shaping.

Should I set a UTF-8 locale?

Check encoding and locale if text is corrupted before rendering, but do not treat a locale setting as a substitute for script-capable fonts or shaping. Older Indic HOWTO material predates modern browser stacks and is not a current installation recipe.

Which font package should I install?

Choose based on the affected script and current distribution repositories. The Fedora names above are distribution-specific examples; Debian documentation identifies the fonts-indic family.